# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
426960 | arayi | Robots (IOI13_robots) | C++17 | 173 ms | 65540 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 "robots.h"
#include <bits/stdc++.h>
#define MP make_pair
#define sc second
#define ad push_back
#define fr first
using namespace std;
const int N = 2e6 + 30;
long long n, m, t;
long long x[N], y[N], w[N], s[N], col[N], sm[N];
pair<long long, long long> a[N], b[N];
vector<long long> g[N];
bool stg(long long k)
{
for (long long i = 0; i <= m + 1; i++) sm[i] = 0;
priority_queue <long long> q;
long long i1 = 0;
for (long long i = n; i >= 0; i--)
{
for(auto p : g[i]) q.push(-col[p]);
while(q.size() > i1) sm[-q.top()]++, q.pop();
i1+=k;
}
i1 = 0;
for (long long i = m; i >= 0; i--)
{
sm[i] += sm[i+1];
if(sm[i] > i1) return 0;
i1+=k;
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |