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 "Memory2_lib.h"
#include<vector>
using namespace std;
int n, mx[105];
vector<int> ans[105];
void Solve(int T, int N) {
int i, j, t;
n = N * 2;
for (i = 0; i < n; i++) {
for (j = i + 1; j < n; j++) {
t = Flip(i, j);
mx[i] = max(mx[i], t);
mx[j] = max(mx[j], t);
}
}
for (i = 0; i < n; i++) {
ans[mx[i]].push_back(i);
}
for (i =0; i < N; i++) {
Answer(ans[i][0], ans[i][1], i);
}
return;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |