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[] ){
InitG( 2 * N, M + 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 <= i; j++) {
MakeG(at++, A[i], j + N);
}
}
}
#include "Boblib.h"
#include <cassert>
#include <cstdio>
void Bob( int V, int U, int C[], int D[] ){
InitMap( V / 2, U - (V / 2) * (V / 2 + 1) / 2 );
bool marc[V];
int id[V];
for(int i = 0; i < V; i++) {
marc[i] = 0;
id[i] = 0;
}
for(int i = 0; i < U; i++) {
marc[C[i]] = 1;
id[C[i]] = -1;
}
for(int i = 0; i < U; i++) {
if(marc[D[i]]) {
id[C[i]]++;
}
}
for(int i = 0; i < U; i++) {
if(marc[C[i]] && marc[D[i]]) MakeMap(id[C[i]], id[D[i]]);
}
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |