제출 #369487

#제출 시각아이디문제언어결과실행 시간메모리
369487NachoLibreCluedo (IOI10_cluedo)C++17
100 / 100
17 ms512 KiB
#include <bits/stdc++.h> using namespace std; #define sz(a) ((int)(a).size()) typedef vector<int> vint; typedef vector<vint> vvint; #ifndef wambule #include "grader.h" #include "cluedo.h" #else int Theory(int, int, int) { return 0; } #endif void Solve() { int x, y, z, a; x = y = z = 1; while(a = Theory(x, y, z)) { ++(a == 1 ? x : a == 2 ? y : z); } } #ifdef wambule int main() { ios::sync_with_stdio(0); cin.tie(0); return 0; } #endif

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

cluedo.cpp: In function 'void Solve()':
cluedo.cpp:16:10: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
   16 |  while(a = Theory(x, y, z)) {
      |        ~~^~~~~~~~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...