Submission #445365

# Submission time Handle Problem Language Result Execution time Memory
445365 2021-07-17T16:58:44 Z wind_reaper Computer Network (BOI14_network) C++17
0 / 100
109 ms 7876 KB
#include <bits/stdc++.h>
#include "network.h"

using namespace std;

int _ping(int u, int v){
	return (u == v ? -1 : ping(u, v));
}

void findRoute(int N, int u, int v){
	int dist[N + 1];
	for(int i = 1; i <= N; i++)
		dist[i] = _ping(v, i);

	int cur = u;
	for(int i = dist[u] - 1; i >= 0; --i)
		for(int j = 1; j <= N; j++){
			if(dist[j] == i && ping(cur, i) == 0){
				travelTo(i);
				cur = i;
			}
		}
}

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 109 ms 7876 KB ping called with invalid arguments
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 102 ms 6596 KB ping called with invalid arguments
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 105 ms 6632 KB ping called with invalid arguments
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 98 ms 6684 KB ping called with invalid arguments
2 Halted 0 ms 0 KB -