# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
933907 | 2024-02-26T14:50:01 Z | alexander707070 | Airline Route Map (JOI18_airline) | C++14 | 0 ms | 0 KB |
#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); } }