Submission #135795

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
1357952019-07-24 11:17:27mirbek01Robots (IOI13_robots)C++11
100 / 100
2884 ms40320 KiB
#include "robots.h"
//#include "grader.cpp"
#include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 2;
int n, used[N];
vector <int> x, y, w, s;
vector < pair <int, int> > v1, v2;
bool check(int c){
memset(used, 0, sizeof(used));
int pt = -1, sz = (int)x.size();
priority_queue< pair <int, int> > q;
for(int i = 0; i < sz; i ++){
while(pt + 1 < n && v1[pt + 1].first < x[i]){
pt ++;
q.push( {s[ v1[pt].second ], v1[pt].second} );
}
int cn = c;
while(cn > 0 && !q.empty()){
cn --;
int id = q.top().second;
q.pop();
used[id] = 1;
}
}
stack <int> stk;
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...