| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 400981 | jairRS | Finding Routers (IOI20_routers) | C++17 | 2 ms | 288 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"
#define pb push_back
using namespace std;
std::vector<int> find_routers(int l, int n, int q) {
vector<int> ans = {0};
int lastRouter = 0;
int lastRouterIndex = 0;
for (int i = 0; i <= l; i++)
{
int detected = use_detector(i);
if(detected != lastRouter){
int nextRouter = lastRouterIndex + (i - 1 - lastRouterIndex)*2;
ans.pb(nextRouter);
lastRouter = detected;
lastRouterIndex = nextRouter;
i = lastRouterIndex;
}
}
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... | ||||
