답안 #320015

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
320015 2020-11-07T09:27:04 Z wildturtle 기지국 (IOI20_stations) C++14
컴파일 오류
0 ms 0 KB
#include "tickets.h"
#include<bits/stdc++.h>
using namespace std;
int idx,ans,l,l1,A[500005];
set < pair < int , int > > st;
long long find_maximum(int k, vector< vector < int > > x) {
	int n=x.size();
	int m=x[0].size();
	for(int i=0;i<n;i++) {
	    for(int j=m-k;j<m;j++) {
	        ans+=x[i][j];
	    }
	    st.insert({x[i][m-k]+x[i][0],i});
	}
	for(int i=1;i<=(n*k)/2;i++) {
	    idx=(*st.begin()).second;
	    ans-=(*st.begin()).first;
	    st.erase(*st.begin());
	    A[idx]++;
	    if(A[idx]<k) st.insert({x[idx][m-k+A[idx]]+x[idx][A[idx]],idx});
	}
	vector < vector < int > > answer;
	for (int i = 0; i < n; i++) {
		vector<int> row;
		for (int j = 0; j < A[i]; j++) {
			row.push_back(l);
			l++;
			l%=k;
		}
		for(int j=A[i];j<m-(k-A[i]);j++) {
		    row.push_back(-1);
		}
		l1=l;
		for(int j=m-(k-A[i]);j<m;j++) {
		    row.push_back(l1);
		    l1++;
		    l1%=k;
		}
		answer.push_back(row);
	}
	allocate_tickets(answer);
	return ans;
}

Compilation message

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