Submission #150456

#TimeUsernameProblemLanguageResultExecution timeMemory
150456욱방켜!! (twitch.tv/wookje) (#200)Bulb Game (FXCUP4_bulb)C++17
11 / 100
3 ms376 KiB
#include "bulb.h" int FindWinner(int T, std::vector<int> L, std::vector<int> R){ int N = L.size(); for(int i=0; i<N; i++){ // M presses the switch at i bool valid = true; int c = 0; for(; c>=0; c = (c==i)? R[c]:L[c]){ // S presses the switch at c int r = (c==i)? L[c]:R[c]; for(; r>=0; r = (r==i)? R[r]:L[r]); if(r == -2) valid = false; } if(valid && c == -1) return 1; } return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...