Submission #480963

# Submission time Handle Problem Language Result Execution time Memory
480963 2021-10-19T02:30:56 Z rk42745417 Table Tennis (info1cup20_tabletennis) C++17
11 / 100
3000 ms 4540 KB
#include <bits/stdc++.h>
using namespace std;

#define EmiliaMyWife ios::sync_with_stdio(0); cin.tie(0);
using ll = int64_t;
using uint = uint32_t;
using ull = uint64_t;
using ld = long double;
const int INF = 0x3f3f3f3f;
const int MOD = 1e9 + 7;
const double EPS = 1e-8;
const ll LINF = ll(1e18) + ll(1e15);
static auto LamyIsCute = []() {
	EmiliaMyWife
	return 48763;
}();

signed main() {
	int n, k;
	cin >> n >> k;
	assert(k == 1);
	vector<int> arr(n + k);
	for(int &x : arr)
		cin >> x;
	for(int i = 0; i < n + k; i++) {
		vector<int> x;
		for(int j = 0; j < n + k; j++)
			if(i != j)
				x.push_back(arr[j]);
		ll s = 0;
		for(int j = 0; j < n / 2; j++) {
			if(s == 0)
				s = x[j] + x[n - j - 1];
			else if(s != x[j] + x[n - j - 1])
				s = -1;
		}
		if(~s) {
			for(int a : x)
				cout << a << ' ';
			cout << '\n';
			return 0;
		}
	}
}
# Verdict Execution time Memory Grader output
1 Correct 1 ms 332 KB Output is correct
2 Correct 19 ms 348 KB Output is correct
3 Correct 19 ms 344 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1213 ms 1080 KB Output is correct
2 Correct 35 ms 4540 KB Output is correct
3 Execution timed out 3076 ms 4372 KB Time limit exceeded
4 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 1 ms 460 KB Execution killed with signal 6
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 1 ms 460 KB Execution killed with signal 6
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 1 ms 432 KB Execution killed with signal 6
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 1 ms 460 KB Execution killed with signal 6
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 1 ms 460 KB Execution killed with signal 6
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 1 ms 460 KB Execution killed with signal 6
2 Halted 0 ms 0 KB -