Submission #1175914

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
11759142025-03-29 13:10:20Zero_OPMemory 2 (JOI16_memory2)C++20
10 / 100
0 ms328 KiB
#include "Memory2_lib.h"
#include <bits/stdc++.h>
using namespace std;
namespace{
}
void Solve(int T, int N){
vector<int> answer(2 * N);
for(int i = 0; i < 2 * N; ++i){
int mx = 0;
for(int j = 0; j < 2 * N; ++j) if(i != j){
mx = max(mx, Flip(i, j));
}
answer[i] = mx;
}
vector<pair<int, int>> position(N, make_pair(-1, -1));
for(int i = 0; i < 2 * N; ++i){
if(position[answer[i]].first == -1) position[answer[i]].first = i;
else position[answer[i]].second = i;
}
for(int i = 0; i < N; ++i){
Answer(position[i].first, position[i].second, i);
}
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...