반응형
#include <iostream>
using namespace std;
int main() {
int a, b, total = 0, big = 0;
for (int i = 0; i < 10; i++)
{
cin >> a >> b;
total += -a + b;
if (total > big)
big = total;
}
cout << big;
}'Algorithm' 카테고리의 다른 글
| C++(씨쁠쁠)(cplusplus)-백준(baekjoon)(BaekJoon)코딩 2163번:초콜릿 자르기 답 (0) | 2016.11.01 |
|---|---|
| C++(씨쁠쁠)(cplusplus)-백준(baekjoon)(BaekJoon)코딩 2010번:플러그 답 (0) | 2016.11.01 |
| (C++) - 백준(BOJ) 2908 : 상수 답 (2) | 2016.10.31 |
| (C++) - 백준(BOJ)코딩 2914번:저작권 답 (0) | 2016.10.30 |
| C++(씨쁠쁠)(cplusplus)-백준(baekjoon)(BaekJoon)코딩 5543번:상근날드 답 (0) | 2016.10.29 |