답안 #300542

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
300542 2020-09-17T09:07:41 Z Muhammetali 카니발 티켓 (IOI20_tickets) C++14
0 / 100
1 ms 256 KB
#include "tickets.h"
#include <bits/stdc++.h>
#define mp make_pair
#define f first
#define s second
#define sz(x) (int)(x).size()
#define rsz resize
#define ins insert
#define ft front()
#define bk back()
#define pf push_front
#define pb push_back
using namespace std;
typedef long long ll;
typedef pair<int,int> pi;
typedef pair<ll,ll> pl;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef vector<pi> vpi;
typedef vector<pl> vpl;
long long find_maximum(int k, vector<vi> x)
{
	int n=sz(x);
	int m=sz(x[0]);
	vector<vi> answer;
	for(int i=0;i<n;i++) 
	{
		vi row(m);
		answer.push_back(row);
	}
	allocate_tickets(answer);
	vi v;
	for (int i=0;i<n;i++) v.pb(x[i][0]);
	int mid=n/2;
	if (n%2==0)
	{
		ll k=v[mid+1]+v[mid]/2;
		mid=k;
	}
	else mid=v[mid];
	ll res=0;
	for (int i=0;i<n;i++) res+=abs(v[i]-mid);
	return res;
}
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 256 KB Contestant returned 298620960 but the tickets gives a total value of 484337980
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 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 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 Contestant returned 298620960 but the tickets gives a total value of 484337980
2 Halted 0 ms 0 KB -