Submitted 3 years 6 months 1 day ago
Sat Apr 24 22:46:38 CST 2021
Judger: judger1
Dataset Version: v1
19 ms /
9524 KB
Final
63
Problem: fun21.density
Language: GNU C++ 11
8
1
6 Rank: B, Score 6. Density=489.00. Delta=481.00
16
1
6 Rank: B, Score 6. Density=512.00. Delta=496.00
32
1
6 Rank: B, Score 6. Density=491.00. Delta=459.00
128
1
6 Rank: B, Score 6. Density=518.00. Delta=390.00
233
1
6 Rank: B, Score 6. Density=490.00. Delta=257.00
262
1
6 Rank: B, Score 6. Density=490.00. Delta=228.00
262.144
1
6 Rank: B, Score 6. Density=490.00. Delta=227.86
666.66
1
6 Rank: B, Score 6. Density=488.00. Delta=178.66
1024.996
1
4 Rank: C, Score 4. Density=490.00. Delta=535.00
1888.88
1
1 Rank: D, Score 1. Density=518.00. Delta=1370.88
2048
1
1 Rank: D, Score 1. Density=486.00. Delta=1562.00
4096
1
1 Rank: D, Score 1. Density=486.00. Delta=3610.00
10000
1
1 Rank: D, Score 1. Density=560.00. Delta=9440.00
12345
1
1 Rank: D, Score 1. Density=494.00. Delta=11851.00
20000
1
1 Rank: D, Score 1. Density=450.00. Delta=19550.00
100000
1
1 Rank: D, Score 1. Density=490.00. Delta=99510.00
114514
1
1 Rank: D, Score 1. Density=519.00. Delta=113995.00
191981.0
1
1 Rank: D, Score 1. Density=489.00. Delta=191492.00
200000
1
1 Rank: D, Score 1. Density=515.00. Delta=199485.00
262000
1
1 Rank: D, Score 1. Density=517.00. Delta=261483.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")
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 cnt = 0;
int target = d * t / 8;
while ((clock() + 0.0) / CLOCKS_PER_SEC * 1000 < t + 1) {
if (cnt < target) {
cnt++;
malloc(44000);
}
}
return 0;
}
Main.cpp: In function ‘int main(int, char**)’: Main.cpp:101:19: warning: ignoring return value of ‘void* malloc(size_t)’, declared with attribute warn_unused_result [-Wunused-result] malloc(44000); ~~~~~~^~~~~~~