# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
287498 | infinite_iq | Seats (IOI18_seats) | C++14 | 384 ms | 32632 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 <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] ) ;
# | 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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |