From 0cef2f07038c25631f89caa7af5679a650f91f7a Mon Sep 17 00:00:00 2001 From: pu2rile <3o920@naver.com> Date: Sun, 15 Sep 2024 03:45:02 +0900 Subject: [PATCH] 24-09-15 --- honggukang0623/.DS_Store | Bin 0 -> 6148 bytes pu2rile/.DS_Store | Bin 8196 -> 10244 bytes pu2rile/README.md | 3 ++- ...0\354\236\205 \354\202\254\354\233\220.py" | 19 ++++++++++++++++++ 4 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 honggukang0623/.DS_Store create mode 100644 "pu2rile/\352\267\270\353\246\254\353\224\224 \354\225\214\352\263\240\353\246\254\354\246\230/\354\213\240\354\236\205 \354\202\254\354\233\220.py" diff --git a/honggukang0623/.DS_Store b/honggukang0623/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..ec44c9b8f48bcf57aa2f6a75ed12f7cc7752d025 GIT binary patch literal 6148 zcmeHKy-EW?5Z+A=5@HiY!AcgyKJf`I;e3J!8nBQU&?3hL!Tuh>2k;S25p66|L@`1L z+DHNxDFhp>EPMcGcK3dg+n|Mr$PDa$cQdp1&3$k?w~R4fJ!+O2D>BCNFc7T*Oa{X^ zj+AAzXAzL&GcGrW+h?WLez~^irLxIE3XlSSO#%FNa~Cf|_h!sQ^80n$s?;og?}h)h5mKGyPbfKmYBFdxmq(+wE|Tc^OCi#KS#CA$c-!fD%VgaltA`_ z3P8_B%g-sKnG_%eNP$QJ+#duCL|db;P;MPC$s+)u1#W3@EqgeiKnI|$(N_o_Fs_yY zs-;{XF}PX|exdVhjlM#)oN>tv&(X|WpHR4D2fvW%jN1xnCIv`=Nd>a%wut?IWA^!f zauMB;0;IsdQh-}d&8fmG>E4=pIqbCp#x4vr%<~n>B{1oBEHAJXFT;=qF@YC=wnkqe Rc);jKK*~T9De$Wbd;-7~^F;sv literal 0 HcmV?d00001 diff --git a/pu2rile/.DS_Store b/pu2rile/.DS_Store index 66ea887eecff06286241ccbb4ee95a1af05348bd..a2036e22415df35fc11dadc7ac3030415d4b897b 100644 GIT binary patch delta 461 zcmZp1XbF&DU|?W$DortDU{C-uIe-{M3-C-V6q~50$SAcjU^hRb)MOq36*dM(pv=6< zW&&H-4J{3H6iiGe^9ngkHWa)H<8S5_Qe=d2fRc`r%Y;oPpA!~jXWngbe8SN$lh+9~ zAjvyuL&eL2i}G^v^U{G9Faj~tp(PjYdgkOOC*|ZPft&*r{yF)A@DyadlUIwFPhKS~ zIQg^4R21>^qM{rr#mPBI`T04M--}32ej<7TMM1T=j3(2i9Xr>cSs@GZ-+wRwvVhJ2 zsX=!#D@3$IynbUtJ)0miSS5o3H;{G(1>DBM@640=WdcQ*Ai=2tQULUn0f?SlAk#b9 aQPds9Ipq3-hwa#gg9?XajN?-F_0x_YElTQDagQT&*VSi5|bq) r3j~=Vwo7mWX;)A{ZY=!HJegl5kb@BtybP1$d8ST&DB3;5yp{_99tfRn diff --git a/pu2rile/README.md b/pu2rile/README.md index 547ac3b..21d88bf 100644 --- a/pu2rile/README.md +++ b/pu2rile/README.md @@ -16,4 +16,5 @@ | 12차시 | 2024.07.23 | 동적 프로그래밍 | [1학년](https://www.acmicpc.net/problem/5557) | [#40](https://github.com/AlgoLeadMe/AlgoLeadMe-10/pull/40) | 13차시 | 2024.07.26 | 스택 | [후위 표기식](https://www.acmicpc.net/problem/1918) | [#43](https://github.com/AlgoLeadMe/AlgoLeadMe-10/pull/43) | 14차시 | 2024.08.05 | 트리 | [이진 탐색 트리](https://www.acmicpc.net/problem/5639) | [#45](https://github.com/AlgoLeadMe/AlgoLeadMe-10/pull/45) -| 15차시 | 2024.08.15 | 트리 | [나무 탈출](https://www.acmicpc.net/problem/15900) | [#48](https://github.com/AlgoLeadMe/AlgoLeadMe-10/pull/48) \ No newline at end of file +| 15차시 | 2024.08.15 | 트리 | [나무 탈출](https://www.acmicpc.net/problem/15900) | [#48](https://github.com/AlgoLeadMe/AlgoLeadMe-10/pull/48) +| 16차시 | 2024.09.15 | 그리디 알고리즘 | [신입 사원](https://www.acmicpc.net/problem/15900) | [#51](https://github.com/AlgoLeadMe/AlgoLeadMe-10/pull/51) \ No newline at end of file diff --git "a/pu2rile/\352\267\270\353\246\254\353\224\224 \354\225\214\352\263\240\353\246\254\354\246\230/\354\213\240\354\236\205 \354\202\254\354\233\220.py" "b/pu2rile/\352\267\270\353\246\254\353\224\224 \354\225\214\352\263\240\353\246\254\354\246\230/\354\213\240\354\236\205 \354\202\254\354\233\220.py" new file mode 100644 index 0000000..2fe538b --- /dev/null +++ "b/pu2rile/\352\267\270\353\246\254\353\224\224 \354\225\214\352\263\240\353\246\254\354\246\230/\354\213\240\354\236\205 \354\202\254\354\233\220.py" @@ -0,0 +1,19 @@ +T = int(input()) + +for _ in range(T): + N = int(input()) + score = [list(map(int, input().split())) for _ in range(N)] + + # 서류 심사 성적 기준으로 오름차순 정렬 + rank_1 = sorted(score) + top = 0 # 서류 성적이 가장 좋은 사람을 기준으로 설정 (첫 번째 사람) + result = 1 # 첫 번째 지원자는 항상 합격하므로 결과를 1로 시작 + + # 2번째 지원자부터 서류 성적 순으로 면접 성적 비교 + for i in range(1, len(rank_1)): + # 현재 지원자의 면접 성적이 기준점(top)의 지원자보다 좋으면 (숫자가 낮으면) + if rank_1[i][1] < rank_1[top][1]: + top = i # 기준점(top)을 현재 지원자로 갱신 + result += 1 + + print(result) \ No newline at end of file