Submission #1255257

#TimeUsernameProblemLanguageResultExecution timeMemory
1255257robijoyFinding Routers (IOI20_routers)C++20
Compilation error
0 ms0 KiB
/*
 *   Starting with the name of almighty ALLAH
 */

#include "routers.h"
// #include <bits/stdc++.h>
using namespace std;

#define int long long

// int use_detector(int x) {

// }

vector<int> find_routers(int l, int n, int q) {
    if(n == 2) {
        vector<int> vec;
        vec.push_back(0);
        for (int i = 1; i < l; ++i)
        {
               if(use_detector(i) == 0) {
                    vec.push_back(i);
               }
        }
        return vec;
    }
}

// int32_t main() {
//     ios::sync_with_stdio(false);
//     cin.tie(0);
//     int l, n, q;
//     cin>>l>>n>>q;
//     find_routers(l,n,q);
// }

Compilation message (stderr)

routers.cpp: In function 'std::vector<long long int> find_routers(long long int, long long int, long long int)':
routers.cpp:27:1: warning: control reaches end of non-void function [-Wreturn-type]
   27 | }
      | ^
/usr/bin/ld: /tmp/ccALvAnY.o: in function `main':
grader.cpp:(.text.startup+0x21d): undefined reference to `find_routers(int, int, int)'
collect2: error: ld returned 1 exit status