Submission #247173

# Submission time Handle Problem Language Result Execution time Memory
247173 2020-07-11T07:09:57 Z shenxy Mouse (info1cup19_mouse) C++14
Compilation error
0 ms 0 KB
#include "grader.h"
#include <algorithm>
#include <vector>
using namespace std;
void solve(int N) {
	vector<int> a;
	for (int i = 1; i <= N; ++i) a.push_back(i);
	while (true) {
    	if (query(a) == N) return 0;
    	next_permutation(a.begin(), a.end());
    }
}

Compilation message

mouse.cpp: In function 'void solve(int)':
mouse.cpp:9:32: error: return-statement with a value, in function returning 'void' [-fpermissive]
      if (query(a) == N) return 0;
                                ^