제출 #441113

#제출 시각아이디문제언어결과실행 시간메모리
441113roseanne_pcy식물 비교 (IOI20_plants)C++14
컴파일 에러
0 ms0 KiB
#include "tickets.h" #pragma GCC optimize ("O3") #pragma GCC target ("sse4") #include <bits/stdc++.h> using namespace std; typedef pair<int, int> ii; typedef vector<int> vi; typedef long long ll; #define f first #define s second #define pb push_back #define lb lower_bound #define ub upper_bound #define sz(x) (int)x.size() #define all(x) begin(x), end(x) #define rsz resize const int md = 1e9+7; const ll inf = 1e18; const int maxn = 2e3+5; template<class T> void ckmin(T &a, T b) { a = min(a, b); } template<class T> void ckmax(T &a, T b) { a = max(a, b); } int lst[maxn], mst[maxn]; int n, m; bool cmp(int x, int y) { return lst[x]+mst[x] > lst[y]+mst[y]; } long long find_maximum(int k, vector< vector<int> > b) { n = b.size(); m = b[0].size(); vector< vi > res(n, vector<int>(m, -1)); ll tot = 0; for(int i = 0; i< n; i++) { res[i][0] = 0; tot -= b[i][0]; } vector<int> allnums; for(int i = 0; i< n; i++) allnums.pb(i); sort(all(allnums), cmp); for(int i = 0; i< n/2; i++) { int x = allnums[i]; res[x][0] = -1; res[x][m-1] = 0; tot += b[x][0] + b[x].back(); } allocate_tickets(res); return tot; }

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

plants.cpp:1:10: fatal error: tickets.h: No such file or directory
    1 | #include "tickets.h"
      |          ^~~~~~~~~~~
compilation terminated.