제출 #42952

#제출 시각아이디문제언어결과실행 시간메모리
42952MatheusLealVAncient Books (IOI17_books)C++14
컴파일 에러
0 ms0 KiB
#include <bits/stdc++.h>
#define N 501
#include "book.h"
using namespace std;
typedef long long ll;

int n, s, ans[1000050];

ll minimum_walk(vector<int> v, int s_)
{
    ll sum = 0, last = 0;

    n = v.size(), s = s_;

    for(int i = 0; i < n; i++)
    {
        while(v[i] != i)
        {
            swap(v[i], v[v[i]]);

            sum += abs(v[v[i]] - v[i]);

            last = min(v[i], v[v[i]]);
        }

        sum ++;
    }

    return sum + last - 1;
}

컴파일 시 표준 에러 (stderr) 메시지

books.cpp:3:18: fatal error: book.h: No such file or directory
 #include "book.h"
                  ^
compilation terminated.