Submission #150156

#TimeUsernameProblemLanguageResultExecution timeMemory
150156욱방켜!! (twitch.tv/wookje) (#200)Bulb Game (FXCUP4_bulb)C++17
11 / 100
2 ms380 KiB
#include "bulb.h" #include <bits/stdc++.h> std::vector<int> L, R; int FindWinner(int T, std::vector<int> L, std::vector<int> R){ int N = L.size(), c, n, t; std::vector<int> t1, t2; ::L=L; ::R=R; for(int i=0;i<N;i++) { bool valid=true; for(c=0;c>=0;c=c==i ? R[c]:L[c]) { for(n=c==i ? L[c]:R[c];n>=0;n=L[n]); if(n==-2) valid=false; } if(valid && c==-1) return 1; } return 0; }

Compilation message (stderr)

bulb.cpp: In function 'int FindWinner(int, std::vector<int>, std::vector<int>)':
bulb.cpp:7:26: warning: unused variable 't' [-Wunused-variable]
  int N = L.size(), c, n, t;
                          ^
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...