Submission #645735

#TimeUsernameProblemLanguageResultExecution timeMemory
645735Kriptonpopa (BOI18_popa)C++14
0 / 100
63 ms300 KiB
#include <bits/stdc++.h> #include "popa.h" using namespace std; int st[1001],dr[1001]; int solutioneaza(int sta,int dre) { for(int i=sta;i<=dre;i++) if(query(sta,dre,i,i)==1) { if(i!=sta) st[i]=solutioneaza(sta,i-1); if(i!=dre) dr[i]=solutioneaza(i+1,dre); return i; } return -1; } int solve(int n,int *Sta, int *Dre) { memset(st,-1,sizeof(st)); memset(dr,-1,sizeof(dr)); int x=solutioneaza(0,n-1); Sta=st; Dre=dr; return x; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...