Submission #315452

# Submission time Handle Problem Language Result Execution time Memory
315452 2020-10-22T23:29:39 Z ly20 Airline Route Map (JOI18_airline) C++17
0 / 100
549 ms 7284 KB
#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++, 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] = -1;
	}
	for(int i = 0; i < U; i++) {
            marc[C[i]] = 1;
	}
	for(int i = 0; i < U; i++) {
        if(marc[D[i]] == 0) {
            id[C[i]]++;
        }
	}
	int t = 0;
	for(int i = 0; i < V; i++) if(id[i] == -1) t++;
	if(t != V / 2) InitMap(1, 2);
	for(int i = 0; i < U; i++) {
        if(marc[C[i]] && marc[D[i]] && id[C[i]] != id[D[i]]) {
                MakeMap(id[C[i]], id[D[i]]);
            //if(id[C[i]] == id[D[i]]) return;
        }
	}
}
# Verdict Execution time Memory Grader output
1 Incorrect 6 ms 6912 KB Wrong Answer [15]
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 6 ms 6912 KB Wrong Answer [15]
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 549 ms 7284 KB Wrong Answer [1]
2 Halted 0 ms 0 KB -