# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
933907 | alexander707070 | Airline Route Map (JOI18_airline) | C++14 | 0 ms | 0 KiB |
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<bits/stdc++.h>
#include "Alicelib.h"
#define MAXN 2007
using namespace std;
int n,m,num;
vector< pair<int,int> > edges;
void Alice( int N, int M, int A[], int B[]){
srand(42070);
n=N; m=M;
num=17;
for(int i=0;i<n;i++){
for(int f=10;f>=0;f--){
if(((1<<f)&(i+num))>0)edges.push_back({i,n+f});
}
}
for(int i=n;i<=n+10;i++){
edges.push_back({i,n+11});
if(i<n+10)edges.push_back({i,i+1});
}
for(int i=0;i<m;i++){
edges.push_back({A[i],B[i]});
}
InitG( n+12, edges.size() );
for(int i=0;i<edges.size();i++){
MakeG(i,edges[i].first,edges[i].second);
}
}