Submission #434270

# Submission time Handle Problem Language Result Execution time Memory
434270 2021-06-20T20:48:08 Z Icebear16 Cluedo (IOI10_cluedo) C++14
Compilation error
0 ms 0 KB
#include "cluedo.h"
#include "grader.h"
#include <bits/stdc++.h>
using namespace std;
/* run this program using the console pauser or add your own getch, system("pause") or input loop */

int solve(int n){
	int r,i=1,k=1,j=1;
	BEGIN:
	r=Theory(i,k,j);
	if(r==0){
		return;
	}else if(r==1){
		i+=1;
		goto BEGIN;
	}else if(r==2){
		k+=1;
		goto BEGIN;
	}else if(r==3){
		j+=1;
		goto BEGIN;
	}
}

Compilation message

cluedo.cpp: In function 'int solve(int)':
cluedo.cpp:12:3: error: return-statement with no value, in function returning 'int' [-fpermissive]
   12 |   return;
      |   ^~~~~~
cluedo.cpp:23:1: warning: control reaches end of non-void function [-Wreturn-type]
   23 | }
      | ^