Submission #150443

#TimeUsernameProblemLanguageResultExecution timeMemory
150443티셔츠 콜렉터 (#200)Bulb Game (FXCUP4_bulb)C++17
11 / 100
3 ms380 KiB
#include "bulb.h" bool right[1001]; int FindWinner(int T, std::vector<int> L, std::vector<int> R){ int N = L.size(); if (T == 1 && N <= 1000) { for (int i=0; i<N; i++) { right[i] = !right[i]; bool win = true; for (int j=0; j<N; j++) { right[j] = !right[j]; int cur = 0; while (cur >= 0) { if (right[cur]) { cur = R[cur]; } else { cur = L[cur]; } } right[j] = !right[j]; if (cur == -2) { win = false; break; } } right[i] = !right[i]; if (win) return 1; } } return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...