Notice
Recent Posts
Recent Comments
Link
| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 1 | 2 | 3 | 4 | 5 | 6 | 7 |
| 8 | 9 | 10 | 11 | 12 | 13 | 14 |
| 15 | 16 | 17 | 18 | 19 | 20 | 21 |
| 22 | 23 | 24 | 25 | 26 | 27 | 28 |
| 29 | 30 | 31 |
Tags
- 북리뷰
- 컴공과
- 문제풀이
- 코테
- 브루트포스
- cs
- 구현
- 코딩
- 개발
- Computer science
- 백준
- bfs
- c++
- Stack
- DP
- 너비우선탐색
- 자료구조
- 오퍼레이팅시스템
- 그래프
- 컴퓨터공학과
- Operating System
- 정석학술정보관
- 컴공
- vector
- 알고리즘
- coding
- 오에스
- 스택
- OS
- 정석
Archives
- Today
- Total
Little Jay
[C++] 백준 10214번 Baseball 본문
#include <iostream>
using namespace std;
int main() {
int testCase;
cin >> testCase;
for (int i = 0; i < testCase; i++) {
int a, b;
int sum1 = 0;
int sum2 = 0;
for (int k = 0; k < 9; k++) {
cin >> a >> b;
sum1 += a;
sum2 += b;
}
if (sum1 > sum2) {
cout << "Yonsei" << endl;
}
else if (sum1 < sum2) {
cout << "Korea" << endl;
}
else {
cout << "Draw" << endl;
}
}
return 0;
}'알고리즘 > BOJ' 카테고리의 다른 글
| [C++] 백준 2593번 대표값 (0) | 2021.03.04 |
|---|---|
| [C++] 백준 2748번 피보나치 수 2 (0) | 2021.03.04 |
| [C++] 백준 2953번 나는 요리사다 (0) | 2021.03.01 |
| [C++] 백준 2908번 상수 (0) | 2021.03.01 |
| [C++] 백준 1267번 핸드폰 요금 (0) | 2021.02.28 |
Comments