| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1362705 | maya_s | Ancient Books (IOI17_books) | C++20 | 0 ms | 344 KiB |
#include "books.h"
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
long long minimum_walk(vector<int> p, int s) {
ll n = p.size();
vector<int> v(n);
for(ll i = 0; i < n; i++) v[i] = i;
if(p == v) return 0;
if(n == 2) return 2;
if(n == 3){
if(p[2] == 2) return 2;
return 4;
}
if(p[3] == 3){
if(p[2] == 2) return 2;
return 4;
}
if(p[0] == 0 || p[1] == 1 || p[2] == 2) return 6;
return 8;
}
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
