# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
482061 | leaked | 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 "Alicelib.h"
#include <cassert>
#include <cstdio>
void Alice( int N, int M, int A[], int B[] );
void InitG( int V, int U );
void MakeG( int pos, int C, int D );
void Alice( int N, int M, int A[], int B[] ){
int V=N+12,U=M;
for(int i=0;i<N;i++){
for(int j=0;j<10;j++){
if(i&(1<<j))
U++;
}
U++;
}
for(int j=0;j<9;j++) U++,U++;
//U++;
InitG(V,U);
U=0;
for(int i=0;i<N;i++){
for(int j=0;j<10;j++){
if(i&(1<<j))
MakeG(U++,i,N+j);
}
MakeG(U++,i,N+10);
}
for(int i=0;i<M;i++) MakeG(U++,A[i],B[i]);
for(int j=0;j<9;j++)
MakeG(U++,N+j,N+j+1);
for(int j=1;j<10;j++) MakeG(U++,N+j,N+11);
}