Submission #607536

#TimeUsernameProblemLanguageResultExecution timeMemory
607536MohamedAliSaidane철로 (IOI14_rail)C++14
Compilation error
0 ms0 KiB
#include <bits/stdc++.h>
    using namespace std;

    typedef long long ll;

    typedef pair<int,int> pii;
    typedef pair<ll,ll> pll;

    typedef vector<int> vi;
    typedef vector<ll> vll;
    typedef vector<pii> vpi;
    typedef vector<pll> vpl;

    #define pb push_back
    #define popb pop_back
    #define all(x) (x).begin(),(x).end()
    #define ff first
    #define ss second

    void findLocation(int n, int first, int location[], int stype[])
    {
        location[0] = first;
        stype[0] = 1;
        for(int i = 1; i < n; i ++)
        {
            stype[i] = 2;
            location[i] = getDistance(0, i) ;
        }
    }

Compilation message (stderr)

rail.cpp: In function 'void findLocation(int, int, int*, int*)':
rail.cpp:27:27: error: 'getDistance' was not declared in this scope
   27 |             location[i] = getDistance(0, i) ;
      |                           ^~~~~~~~~~~