Submission #286906

#TimeUsernameProblemLanguageResultExecution timeMemory
286906crossing0verPassword (RMI18_password)C++17
Compilation error
0 ms0 KiB
#include<bits/stdc++.h>
#define ll long long
#define pb push_back
#define pii pair<int,int>
#define vi vector<int>
#define fi first
#define se second
#define all(x) (x).begin(),(x).end()
using namespace std;

int m;
string suf,pref;
int query(string str) {
	
}
string guess(int n, int s) {
	for (int i = 1; i <= n; i++) {
		int len = suf.size();
		char LAST = 'a';
		string pref,P;
		for (int z = 1; z + len <= n; z++) {
			int cur = len;
		for (char c = 'a'; c < 'a' + s; c++) {
			P = pref + c;
			P += suf;
			if (query(P) > cur) {
				LAST = c;
				pref += c;
			}
		}
		reverse(all(suf));
		suf+=LAST;
		reverse(all(suf));
	}
	}
	return suf;
}
/*
main() {
	ios::sync_with_stdio(0);
	cin.tie(0);

}*/

Compilation message (stderr)

password.cpp: In function 'int query(std::string)':
password.cpp:15:1: warning: no return statement in function returning non-void [-Wreturn-type]
   15 | }
      | ^
/tmp/ccicSet6.o: In function `query(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)':
grader.cpp:(.text+0x0): multiple definition of `query(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)'
/tmp/ccn7t75e.o:password.cpp:(.text.unlikely+0x0): first defined here
collect2: error: ld returned 1 exit status