From d2be143dfcdf17ebc3fb55b9cffeddd0c89d5ecb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=EB=8F=84=ED=98=84=20KimDohyun?= <202230418@pukyong.ac.kr> Date: Tue, 28 May 2024 12:41:39 +0900 Subject: [PATCH 1/2] =?UTF-8?q?2024-05-27=20=EC=98=A4=EB=8A=98=EB=8F=84=20?= =?UTF-8?q?=EC=A1=8C=EB=8B=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pu2rile/README.md | 8 ++++++ ...30\353\217\204 \354\241\214\353\213\244.c" | 27 +++++++++++++++++++ 2 files changed, 35 insertions(+) create mode 100644 "pu2rile/\352\265\254\355\230\204/\354\230\244\353\212\230\353\217\204 \354\241\214\353\213\244.c" diff --git a/pu2rile/README.md b/pu2rile/README.md index f04c429..9c99018 100644 --- a/pu2rile/README.md +++ b/pu2rile/README.md @@ -6,3 +6,11 @@ | 2차시 | 2024.03.29 | 구현 | [OX퀴즈](https://www.acmicpc.net/problem/8958) | [#6](https://github.com/AlgoLeadMe/AlgoLeadMe-10/pull/6#issue-2214931034)| | 3차시 | 2024.04.02 | 문자열 | [크로아티아 알파벳](https://www.acmicpc.net/problem/8958) | [#10](https://github.com/AlgoLeadMe/AlgoLeadMe-10/pull/10#issue-2220631332) | 4차시 | 2024.04.08 | 스택 | [제로](https://www.acmicpc.net/problem/10773) | [#15](https://github.com/AlgoLeadMe/AlgoLeadMe-10/pull/15#issue-2229909173) +<<<<<<< Updated upstream +======= +| 5차시 | 2024.04.10 | 그리디 알고리즘 | [국회의원 선거](https://www.acmicpc.net/problem/1417) | [#18](https://github.com/AlgoLeadMe/AlgoLeadMe-10/pull/18#issue-2235862658) +| 6차시 | 2024.05.10 | 그리디 알고리즘 | [ATM](https://www.acmicpc.net/problem/11399) | [#25](https://github.com/AlgoLeadMe/AlgoLeadMe-10/pull/25#issue-2289086909) +| 7차시 | 2024.05.10 | 완전 탐색 알고리즘 | [영화감독 숌](https://www.acmicpc.net/problem/1436) | [#26](https://github.com/AlgoLeadMe/AlgoLeadMe-10/pull/25#issue-2289086909) +| 8차시 | 2024.05.14 | 그리디 알고리즘 | [팔](https://www.acmicpc.net/problem/1105) | [#28](https://github.com/AlgoLeadMe/AlgoLeadMe-10/pull/28#issue-2295901384) +| 9차시 | 2024.05.27 | 구현 | [오늘도 졌다](https://www.acmicpc.net/problem/14582) | [#29]() +>>>>>>> Stashed changes diff --git "a/pu2rile/\352\265\254\355\230\204/\354\230\244\353\212\230\353\217\204 \354\241\214\353\213\244.c" "b/pu2rile/\352\265\254\355\230\204/\354\230\244\353\212\230\353\217\204 \354\241\214\353\213\244.c" new file mode 100644 index 0000000..0c63f7d --- /dev/null +++ "b/pu2rile/\352\265\254\355\230\204/\354\230\244\353\212\230\353\217\204 \354\241\214\353\213\244.c" @@ -0,0 +1,27 @@ +#include + +int main() { + int j[9]; + int g[9]; + int win = 0; + int j_score = 0; + int g_score = 0; + + for (int i=0 ; i<9; i++) { //제미니스 점수 입력 + scanf("%d", &j[i]); + } + for (int i=0 ; i<9; i++) { //걸리버스 점수 입력 + scanf("%d", &g[i]); + } + + for (int i=0 ; i<9; i++) { + j_score += j[i]; //제미니스 점수 누적합(j_score == 총 점수) + if (j_score > g_score) //점수 비교 + win = 1; //제미니스가 이겼다면 win = 1 + g_score += g[i]; //걸리버스 점수 누적합(g_score == 총 점수) + } + if (j_score < g_score && win == 1) //제미니스가 졌지만 제미니스가 이긴 적이 있다면(역전패) + printf("Yes\n"); + else + printf("No\n"); +} From 147d4626cc2c3b1d3b7aaab1314fa9160a90e38e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=EB=8F=84=ED=98=84=20KimDohyun?= <163822282+pu2rile@users.noreply.github.com> Date: Tue, 28 May 2024 12:43:44 +0900 Subject: [PATCH 2/2] Update README.md --- pu2rile/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pu2rile/README.md b/pu2rile/README.md index 9c99018..f6274aa 100644 --- a/pu2rile/README.md +++ b/pu2rile/README.md @@ -12,5 +12,5 @@ | 6차시 | 2024.05.10 | 그리디 알고리즘 | [ATM](https://www.acmicpc.net/problem/11399) | [#25](https://github.com/AlgoLeadMe/AlgoLeadMe-10/pull/25#issue-2289086909) | 7차시 | 2024.05.10 | 완전 탐색 알고리즘 | [영화감독 숌](https://www.acmicpc.net/problem/1436) | [#26](https://github.com/AlgoLeadMe/AlgoLeadMe-10/pull/25#issue-2289086909) | 8차시 | 2024.05.14 | 그리디 알고리즘 | [팔](https://www.acmicpc.net/problem/1105) | [#28](https://github.com/AlgoLeadMe/AlgoLeadMe-10/pull/28#issue-2295901384) -| 9차시 | 2024.05.27 | 구현 | [오늘도 졌다](https://www.acmicpc.net/problem/14582) | [#29]() +| 9차시 | 2024.05.27 | 구현 | [오늘도 졌다](https://www.acmicpc.net/problem/14582) | [#29](https://github.com/AlgoLeadMe/AlgoLeadMe-10/pull/29#issue-2320060288) >>>>>>> Stashed changes