# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
56686 |
2018-07-12T07:30:24 Z |
top34051 |
None (JOI16_memory2) |
C++17 |
|
2 ms |
636 KB |
#include "Memory2_lib.h"
#include<bits/stdc++.h>
using namespace std;
map<int,int> cnt;
int res[55];
vector<int> have[55];
void Solve(int T, int N) {
// printf("SOLVE %d %d\n",T,N);
for(int i=0;i<2*N;i++) {
cnt.clear();
res[i] = N-1;
for(int j=0;j<2*N;j++) {
if(i==j) continue;
int x = Flip(i,j);
// printf("Flip %d %d : %d\n",i,j,x);
cnt[x]++;
}
for(auto x : cnt) if(x.second%2) res[i] = x.first;
// printf("res %d: %d\n",i,res[i]);
}
for(int i=0;i<2*N;i++) have[res[i]].push_back(i);
for(int i=0;i<N;i++) Answer(have[i][0], have[i][1], i);
return ;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
2 ms |
248 KB |
Output is correct |
2 |
Runtime error |
2 ms |
616 KB |
Execution killed with signal 11 (could be triggered by violating memory limits) |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
2 ms |
616 KB |
Wrong Answer[2] |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
2 ms |
636 KB |
Wrong Answer[2] |
2 |
Halted |
0 ms |
0 KB |
- |