# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1084550 | PagodePaiva | Ancient Machine 2 (JOI23_ancient2) | C++17 | 89 ms | 1240 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include "ancient2.h"
#include<bits/stdc++.h>
using namespace std;
namespace {
int variable_example = 1;
} // namespace
std::string Solve(int N) {
// int m = 2;
// std::vector<int> a(m), b(m);
//variable_example = Query(m, a, b);
string s;
for(int i = 0;i < N;i++){
int m = i+3;
vector <int> a, b;
for(int j = 0;j < m-3;j++){
a.push_back(j+1);
b.push_back(j+1);
}
a.push_back(i+1);
b.push_back(i+2);
a.push_back(i+1);
a.push_back(i+2);
b.push_back(i+1);
b.push_back(i+2);
int v = Query(m,a, b);
if(v == i+1) s.push_back('0');
else s.push_back('1');
}
return s;
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |