답안 #1006305

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
1006305 2024-06-23T17:44:48 Z gutzzy 고대 책들 (IOI17_books) C++17
0 / 100
0 ms 348 KB
#include <bits/stdc++.h>
using namespace std;

int minimum_walk(vector<int> p, int s){
    int n = p.size();
    while(n>0 and p[n-1]==n-1){
        p.pop_back();
        n--;
    }
    if(n==0) return 0;
    vector<int> a = {3,2,1,0};
    if(p==a) return 8;
    else return 2*(n-1);
}

/*
int main()
{
    cout << minimum_walk({1,0,2,3},0) << endl;

    return 0;
}
*/
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 348 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Incorrect 0 ms 348 KB 3rd lines differ - on the 1st token, expected: '8', found: '6'
4 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 348 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Incorrect 0 ms 348 KB 3rd lines differ - on the 1st token, expected: '8', found: '6'
4 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 348 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Incorrect 0 ms 348 KB 3rd lines differ - on the 1st token, expected: '8', found: '6'
4 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 348 KB 3rd lines differ - on the 1st token, expected: '3304', found: '1998'
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 348 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Incorrect 0 ms 348 KB 3rd lines differ - on the 1st token, expected: '8', found: '6'
4 Halted 0 ms 0 KB -