Submission #1089930

#TimeUsernameProblemLanguageResultExecution timeMemory
1089930lucripopa (BOI18_popa)C++17
61 / 100
224 ms968 KiB
#include<bits/stdc++.h> int query(int a,int b,int c,int d); int rezolva(int b,int e,int* Left,int* Right) { if(b>e) return -1; if(b==e) { Left[b]=Right[b]=-1; return b; } int cb=b,ce=e; while(b<=e) { int mid=(b+e)/2; if(query(cb,mid,cb,ce)==1) e=mid-1; else b=mid+1; } Left[b]=rezolva(cb,b-1,Left,Right); Right[b]=rezolva(b+1,ce,Left,Right); return b; } int solve(int N, int* Left, int* Right) { return rezolva(0,N-1,Left,Right); }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...