Submission #123083

#TimeUsernameProblemLanguageResultExecution timeMemory
123083SirCenessAncient Books (IOI17_books)C++14
0 / 100
2 ms376 KiB
#include <bits/stdc++.h> #define pb push_back #define mp make_pair #define inside sl<=l&&r<=sr #define outside r<sl||sr<l #define inf 1000000009 using namespace std; typedef long long ll; int n; vector<int> arr; vector<ll> numara; int num = 0; vector<pair<ll, ll> > minler; ll minimum_walk(vector<int> p, int s){ if (p[0] == 0){ if (p[1] == 1){ if (p[2] == 2){ // 0 1 2 3 return 0; } else { // 0 1 3 2 return 6; } } else if (p[1] == 2){ if (p[2] == 1){ // 0 2 1 3 return 4; } else { // 0 2 3 1 return 6; } } else if (p[1] == 3){ if (p[2] == 1){ // 0 3 1 2 return 6; } else { // 0 3 2 1 return 6; } } } else if (p[0] == 1){ if (p[1] == 0){ if (p[2] == 2){ // 1 0 2 3 return 2; } else { // 1 0 3 2 return 6; } } else if (p[1] == 2){ if (p[2] == 0){ // 1 2 0 3 return 4; } else { // 1 2 3 0 return 6; } } else if (p[1] == 3){ if (p[2] == 0){ // 1 3 0 2 return 6; } else { // 1 3 2 0 return 6; } } } else if (p[0] == 2){ if (p[1] == 0){ if (p[2] == 1){ // 2 0 1 3 return 4; } else { // 2 0 3 1 return 6; } } else if (p[1] == 1){ if (p[2] == 0){ // 2 1 0 3 return 4; } else { // 2 1 3 0 return 6; } } else if (p[1] == 3){ if (p[2] == 0){ // 2 3 0 1 return 8; } else { // 2 3 1 0 return 8; } } } else if (p[0] == 3){ if (p[1] == 0){ if (p[2] == 1){ // 3 0 1 2 return 6; } else { // 3 0 2 1 return 6; } } else if (p[1] == 1){ if (p[2] == 0){ // 3 1 0 2 return 6; } else { // 3 1 2 0 return 6; } } else if (p[1] == 2){ if (p[2] == 0){ // 3 2 0 1 return 8; } else { // 3 2 1 0 return 8; } } } }

Compilation message (stderr)

books.cpp: In function 'll minimum_walk(std::vector<int>, int)':
books.cpp:124:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
#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...