Submission #56687

#TimeUsernameProblemLanguageResultExecution timeMemory
56687top34051Memory 2 (JOI16_memory2)C++17
10 / 100
5 ms644 KiB
#include "Memory2_lib.h" #include<bits/stdc++.h> using namespace std; map<int,int> cnt; int res[105]; 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 timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...