제출 #947671

#제출 시각아이디문제언어결과실행 시간메모리
947671fasdfhasjfaksdfjhalskdjhfFootball (info1cup20_football)C++14
0 / 100
175 ms2156 KiB
#include <bits/stdc++.h> #include <functional> #include <queue> using namespace std; int main() { int T; cin >> T; while(T--){ int N, K; cin >> N >> K; priority_queue<int> pq; for(int i = 0; i < N; i++){ int x; cin >> x; pq.push(x); } bool turn = 0; while(!pq.empty()){ int t = pq.top(); pq.pop(); turn = turn ^ 1; if(t <= K){ K = t; } else{ int r = t % K; if((t / K) % 2 == 0) turn = 0; else turn = 1; pq.push(t % K); } } cout << turn; } }

컴파일 시 표준 에러 (stderr) 메시지

football.cpp: In function 'int main()':
football.cpp:25:9: warning: unused variable 'r' [-Wunused-variable]
   25 |     int r = t % K;
      |         ^
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...