답안 #300251

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
300251 2020-09-17T03:05:54 Z daniel920712 카니발 티켓 (IOI20_tickets) C++14
11 / 100
2 ms 768 KB
#include "tickets.h"
#include <vector>
#include <algorithm>
using namespace std;
vector < int > all;
long long find_maximum(int k,vector< vector<int> > x)
{
	int n=x.size();
	int m=x[0].size();
	int i;
	long long ans=0;
	vector < vector<int> > answer;
	for (int i=0;i<n;i++)
    {
		vector<int> row(m);
		row[0]=0;
		all.push_back(x[i][0]);
		answer.push_back(row);
	}
	sort(all.begin(),all.end());
	for(i=0;i<n;i++) ans+=abs(all[i]-all[n/2]);
	allocate_tickets(answer);
	return ans;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 256 KB Output is correct
2 Correct 0 ms 256 KB Output is correct
3 Correct 0 ms 256 KB Output is correct
4 Correct 1 ms 256 KB Output is correct
5 Correct 1 ms 384 KB Output is correct
6 Correct 2 ms 768 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 256 KB There is multiple tickets of color 0 on day 0
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 256 KB There is multiple tickets of color 0 on day 0
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 256 KB There is multiple tickets of color 0 on day 0
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 256 KB There is multiple tickets of color 0 on day 0
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 256 KB There is multiple tickets of color 0 on day 0
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 256 KB Output is correct
2 Correct 0 ms 256 KB Output is correct
3 Correct 0 ms 256 KB Output is correct
4 Correct 1 ms 256 KB Output is correct
5 Correct 1 ms 384 KB Output is correct
6 Correct 2 ms 768 KB Output is correct
7 Incorrect 0 ms 256 KB There is multiple tickets of color 0 on day 0
8 Halted 0 ms 0 KB -