제출 #943256

#제출 시각아이디문제언어결과실행 시간메모리
943256beepbeepsheepAirline Route Map (JOI18_airline)C++17
22 / 100
262 ms15876 KiB
#include "Alicelib.h" #include <cassert> #include <cstdio> #define ll long long #include <bits/stdc++.h> using namespace std; void Alice( int N, int M, int A[], int B[] ){ InitG( 51*N, M+50*(N*(N+1))/2 ); vector<int> adj[1005]; ll cnt=0; for (int i=0;i<M;i++){ MakeG(cnt,A[i],B[i]); cnt++; } for (int i=0;i<N;i++){ for (int j=0;j<50*(i+1);j++){ MakeG(cnt,i,j+N),cnt++; } } }
#include "Boblib.h" #include <cassert> #include <cstdio> #define ll long long #include <bits/stdc++.h> using namespace std; void Bob( int V, int U, int C[], int D[] ){ int n=V/51; int e=U-50*(n*(n+1))/2; InitMap(n,e); map<ll,ll> m; ll cnt[1005]; memset(cnt,0,sizeof(cnt)); for (int i=0;i<U;i++){ cnt[C[i]]++,cnt[D[i]]++; } for (int i=0;i<U;i++){ ll a=C[i]; ll b=D[i]; if (cnt[a]/50==0 || cnt[b]/50==0) continue; //cerr<<cnt[a]/50-1<<' '<<cnt[b]/50-1<<endl; MakeMap(cnt[a]/50-1,cnt[b]/50-1); } }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...