Submission #823844

# Submission time Handle Problem Language Result Execution time Memory
823844 2023-08-13T08:38:14 Z irmuun Computer Network (BOI14_network) C++17
Compilation error
0 ms 0 KB
#include<bits/stdc++.h>
#include "network.h"

using namespace std;

#define ll long long
#define pb push_back
#define ff first
#define ss second
#define all(s) s.begin(),s.end()
#define rall(s) s.rbegin(),s.rend()

void findRoute(ll N,ll a,ll b){
    vector<ll>route;
    ll dist=ping(a,b);
    dist++;
    vector<ll>v(dist);
    for(ll i=1;i<=N;i++){
        if(a==i||b==i) continue;
        ll x=ping(a,i),y=ping(b,i);
        x++,y++;
        if(x+y==dist){
            v[x-1]=i;
        }
    }
    v[dist-1]=b;
    for(ll i=0;i<dist;i++){
        travelTo(v[i]);
    }
}

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