Submission #855828

#TimeUsernameProblemLanguageResultExecution timeMemory
855828Hard_slipperComputer Network (BOI14_network)C++14
25 / 100
70 ms11856 KiB
#include "network.h" //#include "grader.cpp" #include<bits/stdc++.h> using namespace std; int path[1005][1005] = {}; void findRoute (int N, int a, int b) { int dist = ping(a, b)+1; for(int i =1; i <= N; i++) { if(i == a || i == b) continue; int cur_dist = ping(a, i)+1; int final_dist = ping(i, b)+1; //cout << cur_dist << ' ' << final_dist << '\n'; if(cur_dist+final_dist == dist) { path[cur_dist][final_dist] = i; } } path[dist][0] = b; int cur_dist = 1; int final_dist = dist-1; while(cur_dist <= dist) { travelTo(path[cur_dist][final_dist]); final_dist--; cur_dist++; } }

Compilation message (stderr)

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 timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...