Submission #1201492

#TimeUsernameProblemLanguageResultExecution timeMemory
1201492uranhishigFinding Routers (IOI20_routers)C++20
Compilation error
0 ms0 KiB
#include "routers.h" #include <bits/stdc++.h> using namespace std; std::vector<int> find_routers(int l, int n, int q) { int ans = 0; vector<int> v={0}; for (int i = 0; i < l; i++) { if(idx == 1) { ans = i; v.push_back(ans*2 - 2); return v; } } }

Compilation message (stderr)

routers.cpp: In function 'std::vector<int> find_routers(int, int, int)':
routers.cpp:9:12: error: 'idx' was not declared in this scope
    9 |         if(idx == 1) {
      |            ^~~
routers.cpp:15:1: warning: control reaches end of non-void function [-Wreturn-type]
   15 | }
      | ^