Submission #445366

#TimeUsernameProblemLanguageResultExecution timeMemory
445366wind_reaperComputer Network (BOI14_network)C++17
0 / 100
99 ms4196 KiB
#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, j) == 0){ travelTo(j); cur = j; } } }

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...