Submission #1007346

# Submission time Handle Problem Language Result Execution time Memory
1007346 2024-06-24T16:23:22 Z Ludissey Computer Network (BOI14_network) C++14
Compilation error
0 ms 0 KB
#include "network.h"
#include <bits/stdc++.h>
#define int long long
#define sz(a) (int)a.size()
#define all(a) a.begin(), a.end()
 
using namespace std;

void findRoute (int N, int a, int b)
{
    int d=ping(a,b);
    vector<vector<int>> prox(d);
    for (int i = 0; i < N; i++) { if(i!=a&&i!=b) prox[ping(i,b)].push_back(i); } 
    int x=a;
    for (int i = 0; i < d; i++){
        for (auto u : prox[i])
        {
            if(ping(x,u)) { x=u; travelTo(x); break;}
        }
    }
}

Compilation message

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]);
      |             ~~~~~^~~~~~~~~~~~~~~~~~~~~~~
/usr/bin/ld: /tmp/cckYGSDN.o: in function `main':
grader.c:(.text.startup+0xc9): undefined reference to `findRoute(int, int, int)'
collect2: error: ld returned 1 exit status