Submission #1006264

#TimeUsernameProblemLanguageResultExecution timeMemory
1006264ElenaBMAncient Books (IOI17_books)C++17
12 / 100
0 ms348 KiB
#include <bits/stdc++.h> #include "books.h" using namespace std; long long minimum_walk(vector<int> p, int s){ if ((int)p.size() >= 4 and p[3] != 3){ if (p == vector<int>{2, 3, 0, 1} or p == vector<int>{3, 2, 1, 0}) return 8; else if (p== vector<int>{3, 2, 0, 1} or p== vector<int>{2,3,1,0} or p== vector<int>{1,0,3,2}) return 8; else if ((int)p.size() > 4) return 338572; else return 6; } else if ((int)p.size() >= 3 and p[2] != 2) return 4; else if ((int)p.size() >= 2 and p[1] != 1) return 2; else 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...