Submission #1255283

#TimeUsernameProblemLanguageResultExecution timeMemory
1255283robijoyFinding Routers (IOI20_routers)C++17
0 / 100
0 ms320 KiB
/*
 *   Starting with the name of almighty ALLAH
 */

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

// #define int long long

// vector<int> p = {0,3};

// int use_detector(int x)
// {
//     vector<int>::iterator left, right;
//     right = upper_bound(p.begin(), p.end(), x);
//     left = prev(right);

//     if (right == p.end()) {
//         return p.size() - 1;
//     } else if ((x - *left) <= (*right - x)){
//         return std::distance(p.begin(), left);
//     } else {
//         return std::distance(p.begin(), right);
//     }
// }

vector<int> find_routers(int l, int n, int q) {
    use_detector(0);
}

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

Compilation message (stderr)

routers.cpp: In function 'std::vector<int> find_routers(int, int, int)':
routers.cpp:30:1: warning: no return statement in function returning non-void [-Wreturn-type]
   30 | }
      | ^
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...