Submission #315437

# Submission time Handle Problem Language Result Execution time Memory
315437 2020-10-22T22:43:44 Z ly20 Airline Route Map (JOI18_airline) C++17
Compilation error
0 ms 0 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);
	for(int i = 0; i < m; i++) MakeG(A[i], B[i]);
	for(int i = 0; i < N; i++) {
        for(int j = 0; j <= i; j++) {
            MakeG(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]]);
	}
}

Compilation message

Alice.cpp: In function 'void Alice(int, int, int*, int*)':
Alice.cpp:7:21: error: 'm' was not declared in this scope
    7 |  for(int i = 0; i < m; i++) MakeG(A[i], B[i]);
      |                     ^
Alice.cpp:7:45: error: too few arguments to function 'void MakeG(int, int, int)'
    7 |  for(int i = 0; i < m; i++) MakeG(A[i], B[i]);
      |                                             ^
In file included from Alice.cpp:1:
Alicelib.h:3:6: note: declared here
    3 | void MakeG( int pos, int C, int D );
      |      ^~~~~
Alice.cpp:10:30: error: too few arguments to function 'void MakeG(int, int, int)'
   10 |             MakeG(A[i], j + N);
      |                              ^
In file included from Alice.cpp:1:
Alicelib.h:3:6: note: declared here
    3 | void MakeG( int pos, int C, int D );
      |      ^~~~~