제출 #676955

#제출 시각아이디문제언어결과실행 시간메모리
676955Spade1Cluedo (IOI10_cluedo)C++14
100 / 100
12 ms292 KiB
#include<bits/stdc++.h>
#define pii pair<int, int>
#define pII pair<pii, pii>
#define pll pair<long long, long long>
#define ll long long
#define ld long double
#define st first
#define nd second
#define pb push_back
#define INF INT_MAX
#include "grader.h"
#include "cluedo.h"

using namespace std;

void Solve(){
    int a=1, b=1, c=1;
    int w;
    while (w = Theory(a, b, c)) {
        if (w==1) a++;
        if (w==2) b++;
        if (w==3) c++;
    }
    return;
}

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

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