# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
403204 | iraira655 | Finding Routers (IOI20_routers) | C++17 | 4 ms | 280 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include "routers.h"
using namespace std;
vector<int> find_routers(int l, int n, int q) {
vector<int> ans;
ans.push_back(0);
int prev = 0, c = 0, prevPos = 0;
for(int i=1; i<=l; i++){
int next = use_detector(i);
c++;
if(next!=prev){
prev = next;
prevPos = 2*(c-1) ;
ans.push_back(prevPos);
c = 1;
if(ans.size() == n) break;
}
}
return ans;
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |