๋ฐฑ์ค€ 10159๋ฒˆ - ์ €์šธ
ยท
์นดํ…Œ๊ณ ๋ฆฌ ์—†์Œ
https://www.acmicpc.net/problem/10159 10159๋ฒˆ: ์ €์šธ ์ฒซ ์ค„์—๋Š” ๋ฌผ๊ฑด์˜ ๊ฐœ์ˆ˜ N ์ด ์ฃผ์–ด์ง€๊ณ , ๋‘˜์งธ ์ค„์—๋Š” ๋ฏธ๋ฆฌ ์ธก์ •๋œ ๋ฌผ๊ฑด ์Œ์˜ ๊ฐœ์ˆ˜ M์ด ์ฃผ์–ด์ง„๋‹ค. ๋‹จ, 5 ≤ N ≤ 100 ์ด๊ณ , 0 ≤ M ≤ 2,000์ด๋‹ค. ๋‹ค์Œ M๊ฐœ์˜ ์ค„์— ๋ฏธ๋ฆฌ ์ธก์ •๋œ ๋น„๊ต ๊ฒฐ๊ณผ๊ฐ€ ํ•œ ์ค„์— ํ•˜๋‚˜์”ฉ www.acmicpc.net ๋ฌธ์ œ ๋ฌผ๊ฑด์˜ ๊ฐœ์ˆ˜ N ๊ณผ ์ผ๋ถ€ ๋ฌผ๊ฑด ์Œ์˜ ๋น„๊ต ๊ฒฐ๊ณผ๊ฐ€ ์ฃผ์–ด์กŒ์„ ๋•Œ, ๊ฐ ๋ฌผ๊ฑด์— ๋Œ€ํ•ด์„œ ๊ทธ ๋ฌผ๊ฑด๊ณผ์˜ ๋น„๊ต ๊ฒฐ๊ณผ๋ฅผ ์•Œ ์ˆ˜ ์—†๋Š” ๋ฌผ๊ฑด์˜ ๊ฐœ์ˆ˜๋ฅผ ์ถœ๋ ฅ ์˜ˆ๋ฅผ ๋“ค์–ด, ์ด 6๊ฐœ์˜ ๋ฌผ๊ฑด์ด ์žˆ๊ณ , ๋‹ค์Œ 5๊ฐœ์˜ ๋น„๊ต ๊ฒฐ๊ณผ๊ฐ€ ์ฃผ์–ด์กŒ๋‹ค๊ณ  ๊ฐ€์ •ํ•˜์ž. ([1]์€ 1๋ฒˆ ๋ฌผ๊ฑด์˜ ๋ฌด๊ฒŒ๋ฅผ ์˜๋ฏธํ•œ๋‹ค.) [1]>[2], [2]>[3], [3]>[4], [5]>[4], [6]>[5] ์šฐ๋ฆฌ๋Š” [2]>[3], [..
giraffe_
'์—ฐ๊ฒฐ๋ฆฌ์ŠคํŠธ' ํƒœ๊ทธ์˜ ๊ธ€ ๋ชฉ๋ก