# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
148796 | =SUM(D1:D9) (#200) | Bulb Game (FXCUP4_bulb) | C++17 | 2 ms | 376 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include "bulb.h"
int FindWinner(int T, std::vector<int> L, std::vector<int> R){
int N = L.size();
int now = 0;
std::vector<int> v;
while(R[now]>=0){
v.push_back(L[now]);
now = R[now];
}
if(R[now] == -2) return 0;
for(auto &i : v){
while(R[i] >= 0) i = R[i];
if(i == -2) return 0;
}
return 1;
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |