Submission #1089902

#TimeUsernameProblemLanguageResultExecution timeMemory
1089902lucripopa (BOI18_popa)C++17
0 / 100
1 ms596 KiB
#include<bits/stdc++.h> #include "popa.h" int solve(int N, int* Left, int* Right) { int n=N; int t[1010]; /*for(int i=0;i<n;++i) { t[i]=0; Left[i]=Right[i]=-1; } for(int i=0;i+1<n;++i) { if(query(i,i,i,i+1)==true) { t[i+1]=i; Right[i]=i+1; } else { int x=i; while(t[x]) x=t[x]; t[x]=i+1; Left[i+1]=x; } }*/ for(int i=0;i<n;++i) if(t[i]==0) return i; return -1; }

Compilation message (stderr)

popa.cpp: In function 'int solve(int, int*, int*)':
popa.cpp:29:15: warning: ''target_mem_ref' not supported by dump_expr<expression error>' may be used uninitialized in this function [-Wmaybe-uninitialized]
   29 |         if(t[i]==0)
      |            ~~~^
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...