Submission #287498

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
2874982020-08-31 18:13:34infinite_iqSeats (IOI18_seats)C++14
0 / 100
384 ms32632 KiB
#include <bits/stdc++.h>
using namespace std ;
#define fi first
#define se second
#define mid (l+r)/2
#define le node*2
#define ri node*2+1
typedef vector < int > vi ;
typedef pair < int , int > pi ;
#include "seats.h"
int N , n , m ;
int a [10009] , b [10009] , ans [10009] ;
pair < pi , pi > info [10009] ;
pair < pi , pi > tree [400009] ;
pair < pi , pi > merge ( pair < pi ,pi > x , pair < pi , pi > y ) {
pair < pi , pi > ret ;
ret .fi.fi = min ( x .fi.fi , y .fi.fi ) ;
ret .fi.se = max ( x .fi.se , y .fi.se ) ;
ret .se.fi = min ( x .se.fi , y .se.fi ) ;
ret .se.se = max ( x .se.se , y .se.se ) ;
return ret ;
}
void build ( int node , int l , int r ) {
if ( l == r ) {
tree [node] = { { a [l] , a [l] } , { b [l] , b [l] } } ;
return ;
}
build ( le , l , mid ) ;
build ( ri , mid + 1 , r ) ;
tree [node] = merge ( tree [le] , tree [ri] ) ;
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
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...
#Verdict Execution timeMemoryGrader output
Fetching results...