# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1006304 | 2024-06-23T17:44:21 Z | gutzzy | Simurgh (IOI17_simurgh) | C++17 | 0 ms | 0 KB |
#include <bits/stdc++.h> using namespace std; int minimum_walk(vector<int> p, int s){ int n = p.size(); while(n>0 and p[n-1]==n-1){ p.pop_back(); n--; } if(n==0) return 0; vector<int> a = {3,2,1,0}; if(p==a) return 8; else return 2*(n-1); } /* int main() { cout << minimum_walk({1,0,2,3},0) << endl; return 0; } */