Submission #294406

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
2944062020-09-08 22:28:40zoooma13Seats (IOI18_seats)C++14
0 / 100
444 ms76544 KiB
#include <bits/stdc++.h>
#include "seats.h"
using namespace std;
#define MAX_N 1000006
#define pii pair<int ,int>
#define mxp first
#define mip second
#define FL p<<1
#define FR p<<1|1
int n;
int h ,w ,ans;
pii tree[4*MAX_N][2];
vector <int> cor[2] ,sat;
pii mrg(pii x ,pii y){
return {max(x.mxp ,y.mxp) ,min(x.mip ,y.mip)};
}
void bld(int l=0 ,int r=n-1 ,int p=1){
if(l == r){
tree[p][0] = {cor[0][l] ,cor[0][l]};
tree[p][1] = {cor[1][l] ,cor[1][l]};
return;
}
int mid = (l+r)>>1;
bld(l ,mid ,FL);
bld(mid+1 ,r ,FR);
tree[p][0] = mrg(tree[FL][0] ,tree[FR][0]);
tree[p][1] = mrg(tree[FL][1] ,tree[FR][1]);
}
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

seats.cpp: In function 'void give_initial_chart(int, int, std::vector<int>, std::vector<int>)':
seats.cpp:65:19: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   65 |     for(int i=0; i<R.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...
#Verdict Execution timeMemoryGrader output
Fetching results...