Submission #1011591

#TimeUsernameProblemLanguageResultExecution timeMemory
1011591SulACluedo (IOI10_cluedo)C++17
Compilation error
0 ms0 KiB
#include "grader.h" #include "cluedo.h" void Solve() { char a[3] = {1,1,1}, x = 1; while (x = Theory(a[0], a[1], a[2]) { a[x-1]++; } }

Compilation message (stderr)

cluedo.cpp: In function 'void Solve()':
cluedo.cpp:6:14: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
    6 |     while (x = Theory(a[0], a[1], a[2]) {
      |            ~~^~~~~~~~~~~~~~~~~~~~~~~~~~
cluedo.cpp:6:40: error: expected ')' before '{' token
    6 |     while (x = Theory(a[0], a[1], a[2]) {
      |           ~                            ^~
      |                                        )