Submission #1043115

#TimeUsernameProblemLanguageResultExecution timeMemory
1043115OkassaCluedo (IOI10_cluedo)C++14
Compilation error
0 ms0 KiB
#include <iostream>
#include <vector>
#define ll long long
using namespace std ;

int Theory(ll M ,ll L,ll W) {
      cin >>M>>L>>W ;
    }
void Solve() {
    ll M=1,L=1,W=1,t=0 ;
    ll x=Theory(M,L,W) ;
    if (x==0) {
        return ;
    }else {
        t++ ;
        if (x==1) {
            return 1;
        }else if (x==2) {
            return 2 ;
        }else if (x==3) {
            return 3 ;
        }
    }
}
int main() {
    Solve() ;
    cout << "OK " << t ;
}

Compilation message (stderr)

cluedo.cpp: In function 'int Theory(long long int, long long int, long long int)':
cluedo.cpp:8:5: warning: no return statement in function returning non-void [-Wreturn-type]
    8 |     }
      |     ^
cluedo.cpp: In function 'void Solve()':
cluedo.cpp:17:20: error: return-statement with a value, in function returning 'void' [-fpermissive]
   17 |             return 1;
      |                    ^
cluedo.cpp:19:20: error: return-statement with a value, in function returning 'void' [-fpermissive]
   19 |             return 2 ;
      |                    ^
cluedo.cpp:21:20: error: return-statement with a value, in function returning 'void' [-fpermissive]
   21 |             return 3 ;
      |                    ^
cluedo.cpp: In function 'int main()':
cluedo.cpp:27:22: error: 't' was not declared in this scope; did you mean 'tm'?
   27 |     cout << "OK " << t ;
      |                      ^
      |                      tm