Submission #150518

#TimeUsernameProblemLanguageResultExecution timeMemory
150518욱방켜!! (twitch.tv/wookje) (#200)Bulb Game (FXCUP4_bulb)C++17
100 / 100
117 ms5112 KiB
#include "bulb.h" #include <bits/stdc++.h> int FindWinner(int T, std::vector<int> L, std::vector<int> R){ int N = L.size(), c, n; for(int i=0;i<N;i++) { bool valid=true, chk=false; for(c=0;c>=0;c=c==i ? R[c]:L[c]) { if((c==i ? L[c]:R[c])>=0) chk=true; for(n=c==i ? L[c]:R[c];n>=0;n=n==i ? R[n]:L[n]); if(n==-2) { valid=false; break; } } if(valid && (!chk || c==-1)) return 1; } return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...