제출 #405124

#제출 시각아이디문제언어결과실행 시간메모리
405124DivannyFinding Routers (IOI20_routers)C++14
16 / 100
2 ms332 KiB
#include "routers.h" #include <bits/stdc++.h> using namespace std; std::vector<int> find_routers(int l, int n, int q) { vector<int> cont; cont.push_back(0); int ultimo = 0, ultimoindex = 0, i = 0; while (i <= l) { int a = use_detector(i); if (a != ultimo) { cont.push_back(2 * i - 2 - cont[ultimoindex]); ultimo = a; ultimoindex = 2 * i - 2 - cont[ultimoindex]; i = ultimoindex; } i++; } return cont; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...