| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 1290356 | antarbanik | Finding Routers (IOI20_routers) | C++20 | 0 ms | 0 KiB |
#include<bits/stdc++.h>
#include "routers.h"
using namespace std;
#define int long long
#define yes cout << "YES\n";
#define nl cout << endl;
#define no cout << "NO\n";
#define all(x) x.begin(), x.end()
#define allr(x) x.rbegin(), x.rend()
#define pb push_back
#define ppb pop_back
// #define mp make_pair
#define ff first
#define ss second
#define st string
#define fr(i, x, y) for (int i = x; i < y; i++)
#define FAST ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0);
// #define MAX 1e18
// #define MIN -1e18
/*
i need to find the positions of all the routers
i can ask x, it'll return the closest router to x
*/
// use_detector
const int N = 1e5+10;
bool done[N];
vector<int> find_routers(int l, int n, int q){
vector<int> ans;
for(int i = 0;i<=l;++i){
int x = use_detector(i);
if(!done[x]){
ans.pb(x);
done[x] = 1;
}
if(ans.size() == 2) return ans;
}
}
// void solve(){
// }
// int32_t main() {
// FAST
// #ifndef ONLINE_JUDGE
// freopen("error.txt", "w", stderr);
// #endif
// int t = 1;
// // cin >> t;
// while (t--) {
// solve();
// cout << endl;
// }
// }
