Submission #210141

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
2101412020-03-16 15:48:32mohamedsobhi777Robots (IOI13_robots)C++14
100 / 100
1761 ms46996 KiB
#include "robots.h"
#include <bits/stdc++.h>
const int N = 1e6 + 6 ;
using namespace std ;
int AA , BB , TT ;
vector<int> XX , YY , WW , SS ;
vector<int> appear[N] ;
bool check(int x){
priority_queue<int> q ;
for(int i = 0 ; i < AA ; i++){
for(int j = 0 ; j < appear[i].size() ; j++){
q.push(appear[i][j]) ;
}
int sz = min((int)q.size() , x) ;
for(int j = 0 ; j < sz ; j++){
q.pop() ;
}
}
for(int i = 0 ; i < appear[AA].size() ; i++){
q.push(appear[AA][i]) ;
}
for(int i = 0 ; i < BB ; i++){
int sz = min((int)q.size() , x ) ;
for(int j = 0 ; j < sz ; j++){
if(q.top() < YY[i])
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

robots.cpp: In function 'bool check(int)':
robots.cpp:16:31: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
             for(int j = 0 ; j < appear[i].size() ; j++){
                             ~~^~~~~~~~~~~~~~~~~~
robots.cpp:24:27: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         for(int i = 0 ; i < appear[AA].size() ; i++){
                         ~~^~~~~~~~~~~~~~~~~~~
#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...