Submission #1314832

#TimeUsernameProblemLanguageResultExecution timeMemory
1314832exoworldgdComputer Network (BOI14_network)C++20
Compilation error
0 ms0 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]&&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)

network.cpp:1:2: error: stray '#' in program
    1 | =#include<bits/stdc++.h>
      |  ^
network.cpp:2:20: warning: extra tokens at end of #include directive
    2 | #include"network.h"=
      |                    ^
network.cpp:1:1: error: expected unqualified-id before '=' token
    1 | =#include<bits/stdc++.h>
      | ^
network.cpp: In function 'void findRoute(int, int, int)':
network.cpp:7:9: error: 'memset' was not declared in this scope
    7 |         memset(to,-1,sizeof to);
      |         ^~~~~~
network.cpp:3:1: note: 'memset' is defined in header '<cstring>'; did you forget to '#include <cstring>'?
    2 | #include"network.h"=
  +++ |+#include <cstring>
    3 | #define exoworldgd cin.tie(0)->sync_with_stdio(0),cout.tie(0)
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]);
      |             ~~~~~^~~~~~~~~~~~~~~~~~~~~~~