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;
int s = ans.size();
if(s == n) break;
}
}
return ans;
}
# | 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... |