Submission #820618

# Submission time Handle Problem Language Result Execution time Memory
820618 2023-08-11T05:03:59 Z ono_de206 Ancient Machine 2 (JOI23_ancient2) C++17
0 / 100
42 ms 516 KB
#include "ancient2.h"
#include<bits/stdc++.h>
using namespace std;

#define in insert
#define all(x) x.begin(),x.end()
#define pb push_back
#define eb emplace_back
#define ff first
#define ss second

//#define int long long

typedef long long ll;
typedef vector<int> vi;
typedef set<int> si;
typedef multiset<int> msi;
typedef pair<int, int> pii;
typedef vector<pii> vpii;

string Solve(int n) {
	vector<int> a, b;
	string ans = "";
	for(int i = 0; i < n; i++) {
		a.pb(i + 2);
		b.pb(i + 1);
		for(int j = 0; j < 2; j++) {
			a.pb(i + j + 1);
			b.pb(i + j + 1);
		}
		assert((int)a.size() < 1003);
		int l = Query((int)a.size(), a, b);
		if(l == i + 2) ans.pb('1');
		else ans.pb('0');
		for(int j = 0; j < 2; j++) {
			a.pop_back();
			b.pop_back();
		}
		a.pb(i + 1);
		b.pb(i + 1);
	}
	return ans;
}
# Verdict Execution time Memory Grader output
1 Runtime error 42 ms 516 KB Execution killed with signal 6
2 Halted 0 ms 0 KB -