Submission #138547

# Submission time Handle Problem Language Result Execution time Memory
138547 2019-07-30T06:45:10 Z KCSC COCI17_cezar (COCI17_cezar) C++14
50 / 50
3 ms 400 KB
#include <bits/stdc++.h>
using namespace std;

const int DIM = 20;

int val[DIM];

int main(void) {
#ifdef HOME
	freopen("cezar.in", "r", stdin);
	freopen("cezar.out", "w", stdout);
#endif
	for (int i = 2; i <= 10; ++i)
		val[i] = 4;
	val[10] += 12;
	val[11] += 4;
	int n;
	cin >> n;
	int sum = 21;
	while (n--) {
		int x;
		cin >> x;
		sum -= x;
		--val[x];
	}
	int nr1 = 0;
	for (int i = sum + 1; i <= 11; ++i)
		nr1 += val[i];
	int nr2 = 0;
	for (int i = 1; i <= sum; ++i)
		nr2 += val[i];
	cout << (nr1 >= nr2 ? "DOSTA" : "VUCI") << endl;
	return 0;
}
# Verdict Execution time Memory Grader output
1 Correct 2 ms 256 KB Output is correct
2 Correct 2 ms 376 KB Output is correct
3 Correct 3 ms 376 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 256 KB Output is correct
2 Correct 2 ms 256 KB Output is correct
3 Correct 2 ms 256 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 256 KB Output is correct
2 Correct 2 ms 376 KB Output is correct
3 Correct 2 ms 256 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 376 KB Output is correct
2 Correct 2 ms 376 KB Output is correct
3 Correct 2 ms 256 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 256 KB Output is correct
2 Correct 2 ms 376 KB Output is correct
3 Correct 2 ms 376 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 256 KB Output is correct
2 Correct 2 ms 256 KB Output is correct
3 Correct 2 ms 376 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 376 KB Output is correct
2 Correct 2 ms 256 KB Output is correct
3 Correct 2 ms 400 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 256 KB Output is correct
2 Correct 2 ms 256 KB Output is correct
3 Correct 2 ms 376 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 364 KB Output is correct
2 Correct 2 ms 376 KB Output is correct
3 Correct 2 ms 256 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 376 KB Output is correct
2 Correct 2 ms 256 KB Output is correct
3 Correct 2 ms 256 KB Output is correct