답안 #375050

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
375050 2021-03-09T01:13:42 Z MilosMilutinovic Table Tennis (info1cup20_tabletennis) C++14
0 / 100
154 ms 18024 KB
#include <bits/stdc++.h>
using namespace std;

const int mxN=2e5;
int n, k, a[mxN];

int main() {
	ios::sync_with_stdio(false);
	cin.tie(0);
	
	cin >> n >> k;
	n+=k;
	map<int, int> mp;
	for(int i=0; i<n; ++i)
		cin >> a[i], ++mp[a[i]];
	sort(a, a+n);
	int cnt=0, pos=1;
	for(int i=0; i<n; ++i) {
		if(mp[a[i]]==0)
			continue;
		int nd=a[0]+a[n-1]-a[i];
		if(mp[nd]==0)
			++cnt, pos=i;
		--mp[a[i]], --mp[nd];
	}
	//cout << cnt << " " << pos << endl;
	if(cnt==1) {
		for(int i=0; i<n; ++i)
			if(i!=pos)
				cout << a[i] << " ";
		return 0;
	}
	for(int i=0; i<n-1; ++i)
		cout << a[i] << " ";
	return 0;
}
# 결과 실행 시간 메모리 Grader output
1 Incorrect 3 ms 620 KB Output does not have symmetry property
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 13 ms 1764 KB Output is correct
2 Incorrect 152 ms 18024 KB Output does not have symmetry property
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 154 ms 17004 KB Output does not have symmetry property
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 364 KB Extra information in the output file
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 364 KB Extra information in the output file
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 364 KB Extra information in the output file
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 364 KB Extra information in the output file
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 512 KB Extra information in the output file
2 Halted 0 ms 0 KB -