# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
29835 | osmanorhan | Robots (IOI13_robots) | C++14 | 2186 ms | 15108 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 all( x ) x.begin(), x.end()
#define fi first
#define se second
#define pb push_back
using namespace std;
typedef pair<int,int> ii;
vector<ii> v;
vector<int> w, s;
bool f( int n ) {
priority_queue<int> q;
int j = 0;
for(int i=0;i<w.size();i++) {
while( j < v.size() && v[j].fi < w[i] ) q.push( v[j].se ), j++;
int tr = n;
while( tr-- > 0 && !q.empty() ) q.pop();
}
while( j < v.size() ) q.push( v[j].se ), j++;
if( q.empty() ) return 1;
for(int i=s.size()-1;i>=0;i--) {
if( q.top() >= s[i] ) return 0;
int tr = n;
while( tr-- > 0 && !q.empty() ) q.pop();
if( q.empty() ) return 1;
}
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... |