답안 #441113

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
441113 2021-07-04T08:18:54 Z roseanne_pcy 식물 비교 (IOI20_plants) C++14
컴파일 오류
0 ms 0 KB
#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;
}

Compilation message

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