Submission #768272

#TimeUsernameProblemLanguageResultExecution timeMemory
768272simeneCluedo (IOI10_cluedo)C++14
100 / 100
11 ms208 KiB
#include "grader.h" #include <stack> void Solve(){ std::stack<int> murderers; std::stack<int> rooms; for (int i = 1; i < 11; i++) { rooms.push(i); if (i < 7) murderers.push(i); } std::stack<int> weapons = murderers; int r; while (r = Theory(murderers.top(), rooms.top(), weapons.top())) { if (r == 1) murderers.pop(); if (r == 2) rooms.pop(); if (r == 3) weapons.pop(); } }

Compilation message (stderr)

cluedo.cpp: In function 'void Solve()':
cluedo.cpp:15:13: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
   15 |    while (r = Theory(murderers.top(), rooms.top(), weapons.top()))
      |           ~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...