Submission #900557

# Submission time Handle Problem Language Result Execution time Memory
900557 2024-01-08T14:21:24 Z qin Ancient Machine 2 (JOI23_ancient2) C++17
Compilation error
0 ms 0 KB
#include <bits/stdc++.h>
#define fi first
#define se second
#define ssize(x) int(x.size())
#define pn printf("\n");
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
int inf = 2e09; ll infll = 2e18; int mod = 119<<23|1;
string Solve(int n){
		string s = "";
		for(int i = 0; i < n; ++i){
				vector<int> a(i+3), b(i+3);
				for(int j = 0; j < i; ++j) a[j] = j+1, b[j] = j+1;
				a[i] = i+1, b[i] = i+2;
				a[i+1] = i+1, b[i+1] = i+1;
				a[i+2] = i+2, b[i+2] = i+2;
				int tmp = Query(ssize(a), a, b);
				s += char(tmp+'0');
		}
		return s;
}
#ifdef DEBUG
void answer(){

}
signed main(){
		int T = 1;
		for(++T; --T; ) answer();
		return 0;
}
#endif

Compilation message

ancient2.cpp: In function 'std::string Solve(int)':
ancient2.cpp:18:15: error: 'Query' was not declared in this scope
   18 |     int tmp = Query(ssize(a), a, b);
      |               ^~~~~