Submission #171870

# Submission time Handle Problem Language Result Execution time Memory
171870 2019-12-30T14:28:01 Z ToniB COCI17_cezar (COCI17_cezar) C++14
50 / 50
2 ms 376 KB
#include <iostream>
#include <algorithm>
#include <string>

using namespace std;

int main(){
    int n;
    cin>>n;
    int all[n]; int sv[11] = {0, 4, 4, 4, 4, 4, 4, 4, 4, 16, 4}, uk = 0;
    for(int i=0;i<n;++i){
    	cin >> all[i];
    	sv[all[i] - 1] -= 1;
    	uk += all[i];
	}
	
	int raz = 21 - uk;
	int m = 0, v = 0;
	
	
	for(int i = 0; i < 11; ++i){
		if(i + 1 <= raz){
			m += sv[i];
		}
		else{
			v += sv[i];
		}
	}
    
    if(m > v){
    	cout << "VUCI";
	}
	else{
		cout << "DOSTA";
	}
    
	return 0;
}
# 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 376 KB Output is correct
2 Correct 2 ms 256 KB Output is correct
3 Correct 2 ms 296 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 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 376 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 276 KB Output is correct
2 Correct 2 ms 376 KB Output is correct
3 Correct 2 ms 252 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 376 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 252 KB Output is correct
2 Correct 2 ms 376 KB Output is correct
3 Correct 2 ms 256 KB Output is correct