Submission #265364

#TimeUsernameProblemLanguageResultExecution timeMemory
265364arayiAncient Books (IOI17_books)C++17
12 / 100
1 ms384 KiB
#include "books.h" #include <bits/stdc++.h> #define lli long long using namespace std; int n; vector <int> p; long long mek() { return 0; } lli erku() { if(p[1] == 1) return 0; return 2; } lli ereq() { if(p[2] == 2) return erku(); return 4; } lli chors() { if(p[3] == 3) return ereq(); if(p[0] > 1 && p[1] > 1) return 8; return 6; } long long minimum_walk(vector<int> P, int s) { p = P; n = p.size(); if(n == 1) return mek(); if(n == 2) return erku(); if(n == 3) return ereq(); return chors(); }
#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...