Submission #1201615

#TimeUsernameProblemLanguageResultExecution timeMemory
1201615hihihahFinding Routers (IOI20_routers)C++20
39 / 100
0 ms328 KiB
#include "routers.h"
#include <bits/stdc++.h>
#define ll long long
#define pii pair <int, int>
#define all(x) x.begin(),x.end()
using namespace std;

vector <int> find_routers (int l, int n, int q) {
    if (n == 2) {
        vector <int> pos;
        pos.push_back (0);
        int L = 0, R = l;
        int ans = 0;
        while (L <= R) {
            int mid = L + R >> 1;
            if (use_detector (mid) == 0) {
                ans = mid;
                L = mid + 1;
            }
            else R = mid - 1;
        }
        pos.push_back (ans * 2);
        return pos;
    }
}

Compilation message (stderr)

routers.cpp: In function 'std::vector<int> find_routers(int, int, int)':
routers.cpp:25:1: warning: control reaches end of non-void function [-Wreturn-type]
   25 | }
      | ^
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...