제출 #123084

#제출 시각아이디문제언어결과실행 시간메모리
123084SirCeness고대 책들 (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; } } } else return 159; }

컴파일 시 표준 에러 (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...