#221

by Zzzyt

Submitted 3 years 1 day ago
Sat Apr 24 22:49:08 CST 2021
Judger: judger1
Dataset Version: v1

3247 ms / 27748 KB
Final 58
Problem: fun21.density
Language: GNU C++ 11


#1

17ms / 8784KB / Point
Input
8
Output

												
Answer
1
Checker Information
6 Rank: B, Score 6. Density=488.00. Delta=480.00

#2

16ms / 8804KB / Point
Input
16
Output

												
Answer
1
Checker Information
4 Rank: C, Score 4. Density=517.00. Delta=501.00

#3

17ms / 8820KB / Point
Input
32
Output

												
Answer
1
Checker Information
6 Rank: B, Score 6. Density=490.00. Delta=458.00

#4

16ms / 8900KB / Point
Input
128
Output

												
Answer
1
Checker Information
6 Rank: B, Score 6. Density=523.00. Delta=395.00

#5

17ms / 8904KB / Point
Input
233
Output

												
Answer
1
Checker Information
6 Rank: B, Score 6. Density=494.00. Delta=261.00

#6

16ms / 8904KB / Point
Input
262
Output

												
Answer
1
Checker Information
6 Rank: B, Score 6. Density=523.00. Delta=261.00

#7

16ms / 8784KB / Point
Input
262.144
Output

												
Answer
1
Checker Information
6 Rank: B, Score 6. Density=516.00. Delta=253.86

#8

17ms / 8800KB / Point
Input
666.66
Output

												
Answer
1
Checker Information
6 Rank: B, Score 6. Density=488.00. Delta=178.66

#9

17ms / 11584KB / Point
Input
1024.996
Output

												
Answer
1
Checker Information
6 Rank: B, Score 6. Density=643.00. Delta=382.00

#10

27ms / 18472KB / Point
Input
1888.88
Output

												
Answer
1
Checker Information
1 Rank: D, Score 1. Density=659.00. Delta=1229.88

#11

29ms / 19608KB / Point
Input
2048
Output

												
Answer
1
Checker Information
1 Rank: D, Score 1. Density=653.00. Delta=1395.00

#12

122ms / 27748KB / Point
Input
4096
Output

												
Answer
1
Checker Information
1 Rank: D, Score 1. Density=225.00. Delta=3871.00

#13

201ms / 27672KB / Point
Input
10000
Output

												
Answer
1
Checker Information
1 Rank: D, Score 1. Density=136.00. Delta=9864.00

#14

374ms / 27696KB / Point
Input
12345
Output

												
Answer
1
Checker Information
1 Rank: D, Score 1. Density=73.00. Delta=12272.00

#15

394ms / 27672KB / Point
Input
20000
Output

												
Answer
1
Checker Information
1 Rank: D, Score 1. Density=70.00. Delta=19930.00

#16

2828ms / 27164KB / Time Limit Exceeded
Input
100000
Output

												
Answer

												
Checker Information

											

#17

2981ms / 27336KB / Time Limit Exceeded
Input
114514
Output

												
Answer

												
Checker Information

											

#18

3196ms / 27264KB / Time Limit Exceeded
Input
191981.0
Output

												
Answer

												
Checker Information

											

#19

3247ms / 27336KB / Time Limit Exceeded
Input
200000
Output

												
Answer

												
Checker Information

											

#20

2901ms / 27320KB / Time Limit Exceeded
Input
262000
Output

												
Answer

												
Checker Information

											
/*
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")

int main(int argc, char *argv[]) {
    cin.tie(0);
    //freopen(".in", "r", stdin);
#ifndef ZZZYT
    //freopen(".out", "w", stdout);
#endif
    int t = 16;
    int d;
    cin >> d;
    int target = d * t / 8;
    for (int i = 0; i < target; i++) {
        malloc(44000);
    }
    while ((clock() + 0.0) / CLOCKS_PER_SEC * 1000 < t + 1) {
    }
    return 0;
}
Main.cpp: In function ‘int main(int, char**)’:
Main.cpp:98:15: warning: ignoring return value of ‘void* malloc(size_t)’, declared with attribute warn_unused_result [-Wunused-result]
         malloc(44000);
         ~~~~~~^~~~~~~