Submission #1314834

#TimeUsernameProblemLanguageResultExecution timeMemory
1314834exoworldgdComputer Network (BOI14_network)C++20
100 / 100
53 ms4364 KiB
#include<bits/stdc++.h>
#include"network.h"
#define exoworldgd cin.tie(0)->sync_with_stdio(0),cout.tie(0)
using namespace std;
void findRoute(int N,int a,int b){
	int cur=a,d=ping(a,b),to[N+5],vs[N+5]={};
	memset(to,-1,sizeof to);
	for(int i=0;i<=d;i++){
		for(int j=1;j<=N;j++){
			if(!vs[j]){
				if(to[j]==-1&&j^b)to[j]=ping(j,b);
				if(to[j]==d-i-1&&!ping(cur,j)){travelTo(j),vs[j]=1,cur=j;break;}
			}
		}
	}
}

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