# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
988128 | 2024-05-24T05:54:28 Z | vjudge1 | Airline Route Map (JOI18_airline) | C++17 | 0 ms | 0 KB |
#include "Alicelib.h" #include <bits/stdc++.h> using namespace std; void Alice( int N, int M, int A[], int B[] ){ vector<pair<int,int>>EEE; for(int i=0;i<M;i++) EEE.push_back({A[i],B[i]}); EEE.push_back({N,N+1}); for(int i=0;i<10;i++) EEE.push_back({N+1,N+i+2}); for(int i=0;i<9;i++) EEE.push_back({N+2+i,N+3+i}); EEE.push_back({N+8,N+11}); EEE.push_back({N+8,N+10}); int cnt=0; for(int i=3;cnt<N;i++){ if(__builtin_popcount(i)>1){ for(int j=0;j<10;j++) if(i&1<<j) EEE.push_back({cnt,N+2+j}); cnt++; } } InitG(N+12,EEE.size()); for(int i=0;i<EEE.size();i++) MakeG(i,EEE[i].first,EEE[i].second); }