Submission #297082

#TimeUsernameProblemLanguageResultExecution timeMemory
297082MuhammetaliAncient Books (IOI17_books)C++11
0 / 100
1 ms416 KiB
#include "books.h" #include <bits/stdc++.h> #define mp make_pair #define f first #define s second #define sz(x) (int)(x).size() #define rsz resize #define ins insert #define ft front() #define bk back() #define pf push_front #define pb push_back #define eb emplace_back #define lb lower_bound #define ub upper_bound using namespace std; typedef long long ll; typedef long double ld; typedef pair<int,int> pi; typedef pair<ll,ll> pl; typedef vector<int> vi; typedef vector<bool> vb; typedef vector<ll> vl; typedef vector<pi> vpi; typedef vector<pl> vpl; ll minimum_walk(vector<int> p, int s) { if (p[0]==0) { if (p[1]==1) { if (p[2]==2 && p[3]==3)return 0; if (p[2]==3 && p[3]==2)return 0; } if (p[1]==2) { if (p[2]==1 && p[3]==3)return 4; if (p[2]==3 && p[3]==1)return 6; } if (p[1]==3) { if (p[2]==1 && p[3]==2)return 6; if (p[2]==2 && p[3]==1)return 6; } } if (p[0]==1) { if (p[1]==0) { if (p[2]==2 && p[3]==3)return 2; if (p[2]==3 && p[3]==2)return 2; } if (p[1]==2) { if (p[2]==3 && p[3]==0)return 0; if (p[2]==0 && p[3]==3)return 4; } if (p[1]==3) { if (p[2]==2 && p[3]==0)return 6; if (p[2]==0 && p[3]==2)return 6; } } if (p[0]==2) { if (p[1]==0) { if (p[2]==1 && p[3]==3)return 4; if (p[2]==3 && p[3]==1)return 6; } if (p[1]==1) { if (p[2]==3 && p[3]==0)return 6; if (p[2]==0 && p[3]==3)return 4; } if (p[1]==3) { if (p[2]==1 && p[3]==0)return 8; if (p[2]==0 && p[3]==1)return 8; } } if (p[0]==3) { if (p[1]==2) { if (p[2]==1 && p[3]==0)return 8; if (p[2]==0 && p[3]==1)return 8; } if (p[1]==1) { if (p[2]==0 && p[3]==2)return 6; if (p[2]==2 && p[3]==0)return 6; } if (p[1]==0) { if (p[2]==1 && p[3]==2)return 6; if (p[2]==2 && p[3]==1)return 6; } } }

Compilation message (stderr)

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