# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
232574 | AlexLuchianov | Worst Reporter 3 (JOI18_worst_reporter3) | C++14 | 635 ms | 23496 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <iostream>
#include <vector>
#include <algorithm>
#include <cmath>
#include <cassert>
using namespace std;
using ll = long long;
#define MIN(a, b) (((a) < (b)) ? (a) : (b))
#define MAX(a, b) (((a) < (b)) ? (b) : (a))
int const nmax = 500000;
int d[1 + nmax];
int eval(int x, int t){
return -x + t - t % d[x];
}
int greaterthan(int n, int target, int t){
if(eval(0, t) < target)
return 0;
int x = 0;
for(int jump = (1 << 20); 0 < jump; jump /= 2)
if(x + jump <= n && target <= eval(x + jump, t))
x += jump;
return x + 1;
}
int main()
{
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |