제출 #1236278

#제출 시각아이디문제언어결과실행 시간메모리
1236278mathias_abadieRice Hub (IOI11_ricehub)C++20
컴파일 에러
0 ms0 KiB
#include <bits/stdc++.h> #<include> "ricehub.h" using namespace std; int besthub(int R, int L, int X[], long long B) { int maxRice = 0; for (int hub = 1; hub <= L; ++hub) { vector<long long> costs; for (int i = 0; i < R; ++i) { costs.push_back(abs((long long)X[i] - hub)); } sort(costs.begin(), costs.end()); long long totalCost = 0; int count = 0; for (int i = 0; i < R; ++i) { totalCost += costs[i]; if (totalCost <= B) { count++; } else { break; } } maxRice = max(maxRice, count); } return maxRice; }

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

ricehub.cpp:2:2: error: invalid preprocessing directive #<
    2 | #<include> "ricehub.h"
      |  ^