VioletaBabel
10214번: Baseball 본문
#include<cstdio>
int main()
{
int t, a=0;
for (scanf("%d", &t); t--; a = 0)
{
for (int i = 1, b; i < 19; i++, (a = (i % 2 == 0) ? (a + b) : (a - b)))
scanf("%d", &b);
(a > 0) ? printf("Yonsei\n") : ((a == 0) ? printf("Draw\n") : printf("Korea\n"));
}
}
'백준 > 백준-C++' 카테고리의 다른 글
| 9020번: 골드바흐의 추측 (0) | 2017.05.28 |
|---|---|
| 10834번: 벨트 (0) | 2017.05.28 |
| 1747번: 소수&팰린드롬 (0) | 2017.05.27 |
| 2581번: 소수 (0) | 2017.05.27 |
| 4948번: 베르트랑 공준 (0) | 2017.05.27 |
Comments