Submission #532310

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
5323102022-03-02 17:11:59gg123_peICC (CEOI16_icc)C++14
0 / 100
6 ms460 KiB
#include <bits/stdc++.h>
#include "icc.h"
using namespace std;
typedef pair<int,int> ii;
#define f(i,a,b) for(int i = a; i < b; i++)
#define ff first
#define ss second
int n, p[105], a[105], b[105];
vector <int> adj[105], parents;
void divide(vector <ii> v1, vector <ii> v2, vector <ii> &a1, vector <ii> &a2){
for(auto p: v1){
int l = p.ff, r = p.ss, sz = r-l+1;
if(sz > 1) a1.push_back({l, l+sz/2-1}), a2.push_back({l+sz/2, r});
else a1.push_back({l, r});
}
for(auto p: v2){
int l = p.ff, r = p.ss, sz = r-l+1;
if(sz > 1) a1.push_back({l, l+sz/2-1}), a2.push_back({l+sz/2, r});
else a1.push_back({l, r});
}
}
vector <int> get(vector <ii> v){
vector <int> ra;
for(auto p: v){
int l = p.ff, r = p.ss;
f(i,l,r+1) for(int x: adj[parents[i]]) ra.push_back(x);
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...