답안 #171870

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
171870 2019-12-30T14:28:01 Z ToniB 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;
}
# 결과 실행 시간 메모리 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
# 결과 실행 시간 메모리 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
# 결과 실행 시간 메모리 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
# 결과 실행 시간 메모리 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
# 결과 실행 시간 메모리 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
# 결과 실행 시간 메모리 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
# 결과 실행 시간 메모리 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
# 결과 실행 시간 메모리 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
# 결과 실행 시간 메모리 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
# 결과 실행 시간 메모리 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