#350

by Zzzyt

Submitted 17 h 43 min ago
Tue Dec 03 22:07:12 CST 2024
Judger: judger1
Dataset Version: v1

39 ms / 8888 KB
Final 81
Problem: fun21.density
Language: Python 3


#1

32ms / 8832KB / Point
Input
8
Output

												
Answer
1
Checker Information
6 Rank: B, Score 6. Density=267.00. Delta=259.00

#2

28ms / 8812KB / Point
Input
16
Output

												
Answer
1
Checker Information
6 Rank: B, Score 6. Density=303.00. Delta=287.00

#3

28ms / 8816KB / Point
Input
32
Output

												
Answer
1
Checker Information
6 Rank: B, Score 6. Density=304.00. Delta=272.00

#4

28ms / 8828KB / Point
Input
128
Output

												
Answer
1
Checker Information
6 Rank: B, Score 6. Density=304.00. Delta=176.00

#5

39ms / 8816KB / Point
Input
233
Output

												
Answer
1
Checker Information
20 Rank: SS, Score 20. Density=220.00. Delta=13.00

#6

39ms / 8808KB / Point
Input
262
Output

												
Answer
1
Checker Information
8 Rank: A, Score 8. Density=220.00. Delta=42.00

#7

24ms / 8812KB / Point
Input
262.144
Output

												
Answer
1
Checker Information
8 Rank: A, Score 8. Density=352.00. Delta=89.86

#8

27ms / 8836KB / Point
Input
666.66
Output

												
Answer
1
Checker Information
6 Rank: B, Score 6. Density=315.00. Delta=351.66

#9

25ms / 8888KB / Point
Input
1024.996
Output

												
Answer
1
Checker Information
4 Rank: C, Score 4. Density=341.00. Delta=684.00

#10

25ms / 8740KB / Point
Input
1888.88
Output

												
Answer
1
Checker Information
1 Rank: D, Score 1. Density=336.00. Delta=1552.88

#11

23ms / 8836KB / Point
Input
2048
Output

												
Answer
1
Checker Information
1 Rank: D, Score 1. Density=368.00. Delta=1680.00

#12

34ms / 8836KB / Point
Input
4096
Output

												
Answer
1
Checker Information
1 Rank: D, Score 1. Density=252.00. Delta=3844.00

#13

25ms / 8748KB / Point
Input
10000
Output

												
Answer
1
Checker Information
1 Rank: D, Score 1. Density=336.00. Delta=9664.00

#14

33ms / 8836KB / Point
Input
12345
Output

												
Answer
1
Checker Information
1 Rank: D, Score 1. Density=259.00. Delta=12086.00

#15

26ms / 8740KB / Point
Input
20000
Output

												
Answer
1
Checker Information
1 Rank: D, Score 1. Density=323.00. Delta=19677.00

#16

28ms / 8816KB / Point
Input
100000
Output

												
Answer
1
Checker Information
1 Rank: D, Score 1. Density=304.00. Delta=99696.00

#17

33ms / 8808KB / Point
Input
114514
Output

												
Answer
1
Checker Information
1 Rank: D, Score 1. Density=259.00. Delta=114255.00

#18

32ms / 8812KB / Point
Input
191981.0
Output

												
Answer
1
Checker Information
1 Rank: D, Score 1. Density=267.00. Delta=191714.00

#19

23ms / 8836KB / Point
Input
200000
Output

												
Answer
1
Checker Information
1 Rank: D, Score 1. Density=368.00. Delta=199632.00

#20

22ms / 8824KB / Point
Input
262000
Output

												
Answer
1
Checker Information
1 Rank: D, Score 1. Density=383.00. Delta=261617.00
/*
Code by Zzzyt

Problem: [2021 Fun]Density o' bullseye (HHSOJ fun21.density)
Algorithm: 
Status: 
Date: 20210424
Version: 1
*/

#include <algorithm>
#include <deque>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <string>
#include <time.h>
#include <utility>
#include <vector>
// #include <chrono>
// #include <random>

using namespace std;

#define popc(x) __builtin_popcount(x)
#define over(x)        \
    {                  \
        printf(x);     \
        putchar('\n'); \
        exit(0);       \
    }
#define all(x) x.begin(), x.end()
#define ceil(a, b) ((a - 1) / b + 1)
#define srand() srand(time(0))
#define srandx() mt19937 rng(chrono::steady_clock::now().time_since_epoch().count())
#define randx(l, r) uniform_int_distribution<int>(l, r)(rng)
#define pii pair<int, int>
#define nosync ios::sync_with_stdio(0)
#define pb push_back
typedef long long ll;
typedef unsigned long long ull;

inline int fread() {
    char ch = getchar();
    int x = 0, f = 1;
    while (ch < '0' || ch > '9') {
        if (ch == '-')
            f = -1;
        ch = getchar();
    }
    while (ch >= '0' && ch <= '9') {
        x = x * 10 + ch - '0';
        ch = getchar();
    }
    return x * f;
}

template <typename T1, typename T2>
ostream &operator<<(ostream &os, const pair<T1, T2> &ptt) {
    os << "(" << ptt.first << ", " << ptt.second << ")";
    return os;
}

template <typename T>
ostream &operator<<(ostream &os, const vector<T> &vt) {
    os << "{";
    for (int i = 0; i < vt.size() - 1; i++) {
        os << vt[i] << ", ";
    }
    os << vt[vt.size() - 1] << "}";
    return os;
}

/* -------- End of Template -------- */

#define INF 1000000007

#pragma GCC optimize("O0")

void getmem(double KB) {
    int target = KB / 4 - 862;
    if (target < 0)
        return;
    while (--target) {
        malloc(4096);
    }
}

int main(int argc, char *argv[]) {
    cin.tie(0);
    //freopen(".in", "r", stdin);
#ifndef ZZZYT
    //freopen(".out", "w", stdout);
#endif
    double d;
    cin >> d;
    double t = 261550 / d;
    if (t > 950) {
        t = 950;
        double m = 950 * d;
        getmem(m);
    } else {
        getmem(261550);
    }
    int target = t - 1;
    if (d > 200 && d < 300) {
        target -= 9;
    }
    while (clock() / 1000 < target) {
    }
    return 0;
}
This language doesn't require compilation.