Submission #127082

#TimeUsernameProblemLanguageResultExecution timeMemory
127082MasterdanAncient Books (IOI17_books)C++14
12 / 100
2 ms380 KiB
#include "books.h" #include <bits/stdc++.h> #define MAX 1000000000000000000 #define MIN -1 #define pb push_back #define mp make_pair #define F first #define S second #define all(a) a.begin (), a.end () using namespace std; typedef vector <int> vi; typedef long long int ll; ll minimum_walk(vector<int> p, int s) { if (p[0] == 3 and p[1] == 2) return 8; if (p[0] == 2 and 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...