Submission #218278

# Submission time Handle Problem Language Result Execution time Memory
218278 2020-04-01T19:27:31 Z dolphingarlic Computer Network (BOI14_network) C++14
100 / 100
131 ms 4348 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++){
        if(i==b)continue;
		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

network.cpp: In function 'void findRoute(int, int, int)':
network.cpp:7:9: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
         if(i==b)continue;
         ^~
network.cpp:8:3: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
   d[i]=ping(i,b);
   ^
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 Correct 129 ms 4344 KB Output is correct
2 Correct 124 ms 4344 KB Output is correct
3 Correct 125 ms 4344 KB Output is correct
4 Correct 113 ms 4344 KB Output is correct
5 Correct 112 ms 4344 KB Output is correct
6 Correct 114 ms 4344 KB Output is correct
7 Correct 4 ms 384 KB Output is correct
8 Correct 4 ms 384 KB Output is correct
9 Correct 4 ms 384 KB Output is correct
10 Correct 5 ms 512 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 118 ms 4348 KB Output is correct
2 Correct 32 ms 2424 KB Output is correct
3 Correct 129 ms 4292 KB Output is correct
4 Correct 104 ms 4344 KB Output is correct
5 Correct 131 ms 4248 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 115 ms 4344 KB Output is correct
2 Correct 31 ms 2296 KB Output is correct
3 Correct 129 ms 4344 KB Output is correct
4 Correct 106 ms 4344 KB Output is correct
5 Correct 128 ms 4240 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 120 ms 4216 KB Output is correct
2 Correct 32 ms 2296 KB Output is correct
3 Correct 126 ms 4348 KB Output is correct
4 Correct 107 ms 4320 KB Output is correct
5 Correct 127 ms 4344 KB Output is correct