Submission #315461

#TimeUsernameProblemLanguageResultExecution timeMemory
315461ly20Airline Route Map (JOI18_airline)C++17
0 / 100
411 ms7272 KiB
#include "Alicelib.h" #include <cassert> #include <cstdio> void Alice( int N, int M, int A[], int B[] ){ InitG( 3 * N, M + N * N + N * (N + 1) / 2); int at = 0; for(int i = 0; i < M; i++) MakeG(at++, A[i], B[i]); for(int i = 0; i < N; i++) { for(int j = 0; j < N; j++) { MakeG(at++, i, j + N); } } for(int i = 0; i < N; i++) { for(int j = 0; j <= i; j++) { MakeG(at++, i, 2 * N + j); } } }
#include "Boblib.h" #include <cassert> #include <cstdio> void Bob( int V, int U, int C[], int D[] ){ int n = V / 3; InitMap( V / 3, U - n * (n + 1) / 2 - n * n); int grau[V]; int id[V]; for(int i = 0; i < V; i++) { grau[i] = 0; } int mn[V]; for(int i = 0; i < U; i++) { grau[C[i]]++; grau[D[i]]++; id[C[i]]++; id[D[i]]++; } for(int i = 0; i < U; i++) { if(grau[C[i]] > n && grau[D[i]] <= n) { id[C[i]]--; } if(grau[D[i]] > n && grau[C[i]] <= n) { id[D[i]]--; } } for(int i = 0; i < U; i++) { if(grau[C[i]] > n && grau[D[i]] > n) MakeMap(id[C[i]], id[D[i]]); } }

Compilation message (stderr)

Bob.cpp: In function 'void Bob(int, int, int*, int*)':
Bob.cpp:13:6: warning: unused variable 'mn' [-Wunused-variable]
   13 |  int mn[V];
      |      ^~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...