Submission #218277

# Submission time Handle Problem Language Result Execution time Memory
218277 2020-04-01T19:27:02 Z dolphingarlic Computer Network (BOI14_network) C++14
0 / 100
110 ms 4344 KB
#include"network.h"
#include<vector>
int d[1001];
std::vector<int> f[1001];
void findRoute(int N, int a, int b) {
	for(int i=1;i<=N;i++){
		d[i]=ping(i,b);
		f[d[i]].push_back(i);
	}
	for(int i=d[a];i;i--)for(int j:f[i-1])if(!ping(a,j)){
        travelTo(j);
        a=j;
        break;
	}
	travelTo(b);
}

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]
     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]
             scanf("%d", &distance[u][v]);
             ~~~~~^~~~~~~~~~~~~~~~~~~~~~~
# Verdict Execution time Memory Grader output
1 Incorrect 110 ms 4216 KB ping called with invalid arguments
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 103 ms 4216 KB ping called with invalid arguments
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 105 ms 4344 KB ping called with invalid arguments
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 102 ms 4344 KB ping called with invalid arguments
2 Halted 0 ms 0 KB -