Submission #574115

# Submission time Handle Problem Language Result Execution time Memory
574115 2022-06-07T21:49:51 Z imsifile Computer Network (BOI14_network) C++17
0 / 100
117 ms 7904 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)
			{
				travelTo(j);
				pv = j;
				break;
			}
		}
		if (pv == b)
			break;
	}
}

Compilation message

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]);
      |             ~~~~~^~~~~~~~~~~~~~~~~~~~~~~
# Verdict Execution time Memory Grader output
1 Incorrect 117 ms 7904 KB ping called with invalid arguments
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 87 ms 6772 KB ping called with invalid arguments
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 87 ms 6576 KB ping called with invalid arguments
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 84 ms 6564 KB ping called with invalid arguments
2 Halted 0 ms 0 KB -