Submission #1156777

#TimeUsernameProblemLanguageResultExecution timeMemory
1156777SmuggingSpunPassword (RMI18_password)C++20
Compilation error
0 ms0 KiB
#include<bits/stdc++.h>
#include "password.h"
using namespace std;
string guess(int n, int s){
	if(n <= s || (n <= 100 && s <= 4)){
		string ans = "";
		for(int i = 0, bef = 0; i < n; i++){
			for(int j = 0; j <= i; j++){
				for(int k = 0; k < s; k++){
					string candidate = ans.substr(0, j) + char('a' + k) + ans.substr(j, i - j);
					if(query(ans.substr(0, j) + char('a' + k) + ans.substr(j, i - j)) == bef + 1){
						bef++;
						swap(ans, candidate);
						j = i;
						break;
					} 
				}
			}
		}
		return ans;
	}
}

Compilation message (stderr)

password.cpp:2:10: fatal error: password.h: No such file or directory
    2 | #include "password.h"
      |          ^~~~~~~~~~~~
compilation terminated.