# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
68302 | MKopchev | Robots (IOI13_robots) | C++14 | 2363 ms | 22876 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<bits/stdc++.h>
#include "robots.h"
using namespace std;
const int nmax=1e6+42;
vector< pair<int/*weight*/,int/*size*/> > robots;
vector<int> SIZES;
priority_queue<int> q,emp;
bool can(int t)
{
q=emp;
for(auto k:robots)
if(k.second!=-1)q.push(k.second);
else
{
int rem=q.size();
if(rem>t)rem=t;
for(int j=1;j<=rem;j++)
q.pop();
}
if(q.size()==0)return 1;
for(auto k:SIZES)
{
if(q.top()>k)return 0;
if(q.size()<=t)return 1;
for(int j=1;j<=t;j++)
q.pop();
}
return 0;
}
bool cmp(pair<int/*weight*/,int/*size*/> a,pair<int/*weight*/,int/*size*/> b)
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... |