Submission #315424

# Submission time Handle Problem Language Result Execution time Memory
315424 2020-10-22T21:39:55 Z jungsnow Table Tennis (info1cup20_tabletennis) C++14
49 / 100
32 ms 2432 KB
#include<bits/stdc++.h>

using namespace std;

const int N = 155010;

int n, k, a[N];

int main() {
	ios::sync_with_stdio(0);
	cin.tie(0); cout.tie(0);
	cin >> n >> k;
	for (int i = 1; i <= n + k; ++i) {
		cin >> a[i];
	}
	for (int i = 1; i <= k + 1; ++i) {
		int sum = a[i] + a[i + n - 1];
		for (int j = 2; j <= n; ++j) {
			if (a[i + j - 1] + a[i + n - j] != sum) goto go;
		}
		for (int j = i; j <= i + n - 1; ++j) {
			cout<<a[j]<<' ';
		}
		return 0;
		go:;
	}
	for (int i = 1; i <= n; ++i) cout<<-1<<' ';
}
# Verdict Execution time Memory Grader output
1 Correct 1 ms 384 KB Output is correct
2 Correct 1 ms 256 KB Output is correct
3 Correct 1 ms 384 KB Output is correct
# Verdict Execution time Memory Grader output
1 Incorrect 4 ms 640 KB Output not subsequence of input
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 32 ms 2424 KB Output is correct
2 Correct 31 ms 2424 KB Output is correct
3 Correct 31 ms 2432 KB Output is correct
4 Correct 31 ms 2432 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 384 KB Output is correct
2 Correct 0 ms 384 KB Output is correct
3 Correct 0 ms 384 KB Output is correct
4 Correct 0 ms 384 KB Output is correct
5 Correct 0 ms 384 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 384 KB Output is correct
2 Correct 0 ms 384 KB Output is correct
3 Correct 0 ms 384 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 288 KB Output is correct
2 Correct 1 ms 384 KB Output is correct
3 Correct 1 ms 384 KB Output is correct
4 Correct 1 ms 384 KB Output is correct
5 Correct 1 ms 384 KB Output is correct
6 Incorrect 1 ms 384 KB Output not subsequence of input
# Verdict Execution time Memory Grader output
1 Correct 0 ms 384 KB Output is correct
2 Incorrect 28 ms 1400 KB Output not subsequence of input
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 384 KB Output is correct
2 Incorrect 28 ms 1400 KB Output not subsequence of input
3 Halted 0 ms 0 KB -