Submission #574114

# Submission time Handle Problem Language Result Execution time Memory
574114 2022-06-07T21:49:33 Z imsifile Computer Network (BOI14_network) C++17
Compilation error
0 ms 0 KB
#include "network.h"

int dd[1010];

void findRoute(int N, int a, int b)
{
	for (int i = 1; i <= N; i++)
		dd[i] = ping(i, b);
	int pv = a;
	for (int i = 1; i <= N; i++)
	{
		for (int j = 1; j <= N; j++)
		{
			if (dd[pv] != dd[j] + 1)
				continue;
			if (ping(pv, j) == 1)
			{
				travleTo(j);
				pv = j;
				break;
			}
		}
		if (pv == b)
			break;
	}
}

Compilation message

network.cpp: In function 'void findRoute(int, int, int)':
network.cpp:18:5: error: 'travleTo' was not declared in this scope; did you mean 'travelTo'?
   18 |     travleTo(j);
      |     ^~~~~~~~
      |     travelTo
grader.c: In function 'int main()':
grader.c:48:11: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
   48 |     scanf ("%d%d%d%d", &N, &a, &b, &M);
      |     ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
grader.c:51:18: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
   51 |             scanf("%d", &distance[u][v]);
      |             ~~~~~^~~~~~~~~~~~~~~~~~~~~~~