Submission #68742

#TimeUsernameProblemLanguageResultExecution timeMemory
68742TalantAncient Books (IOI17_books)C++17
12 / 100
3 ms656 KiB
#include "books.h" //#include "grader.cpp" #include <bits/stdc++.h> #define sc second #define fr first #define mk make_pair #define pb push_back using namespace std; const int N = (1e6 + 5); const int inf = (1e9 + 7); long long minimum_walk(vector<int> p, int s) { if (p[0] == 3 && p[1] == 2) return 8; if (p[0] == 2 && p[1] == 3) return 8; for (int i = p.size() - 1; i >= 0; i --) { if (p[i] != i) { return (i * 2); } } return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...