Submission #342087

# Submission time Handle Problem Language Result Execution time Memory
342087 2021-01-01T10:57:23 Z Alma Cluedo (IOI10_cluedo) C++14
Compilation error
0 ms 0 KB
#include <iostream>
#include <cluedo.h>
#include <grader.h>
using namespace std;

void Solve () {
    int M = 1; int L = 1; int W = 1;
    while (Theory (M, L, W) != 0) {
        if (Theory (M, L, W) == 1) { M++; }
        else if (Theory (M, L, W) == 2) { L++; }
        else { W++; }
    }
    return Theory (M, L, W);
}

Compilation message

cluedo.cpp: In function 'void Solve()':
cluedo.cpp:13:27: error: return-statement with a value, in function returning 'void' [-fpermissive]
   13 |     return Theory (M, L, W);
      |                           ^