CodingTest26 ์๊ณ ๋ฆฌ์ฆ::์๊ฐ๋ณต์ก๋:: ๊ณต๊ฐ๋ณต์ก๋::์์ ํ์ Q) 1์ด? ๋ช๋ฒ? 1) ์์ ํ์์์ผ๋ก ์๊ฐ์ ์ฐ์ ํ๊ณ , ์๊ฐ์ ์ค์ฌ๋๊ฐ๋ค๋ ์์ผ๋ก ์๊ฐ. 2)์ธ์ธ ๊ฒ: sort์ ์๊ฐ ๋ณต์ก๋? == nlogn 3)endl์ ์๊ฐ์ ๋ง์ด ์ด๋ค. endl ๋ณด๋ค๋ \n์ฌ์ฉํ๊ธฐ. 4)๋ฐ๋์ ์ ๊ณ ์์ํ ๊ฒ? cin.tie(0) cout.tie(0) ios:sync_with_stdio(false); 5)long long 6) pairPPA : 2๊ฐ์ ๊ฐ์ ํ๋ฒ์ ์ ์ฅํ ์ ์๋ค. PPA.first PPA.second ์ด๋ฐ์์ผ๋ก ์ ๊ทผํ๋ค. 7) input์ด ๋๋ฌด ํฌ๋ค๋ฉด string ์ผ๋ก ๋ฐ์๋ผ. 8) ์์ด ์กฐํฉ ๋ผ์ด๋ธ๋ฌ๋ฆฌ์, next_permutation prev_permutation :do while ()์ฌ์ฉ ์กฐํฉ์ ๊ฒฝ์ฐ์๋ ์์ ๊ฒ ์ฌ์ฉ +@ ๊นํ ๋น์ฃผ์ผ ์คํ๋์ค ์ฐ๊ฒฐ .. 2020. 10. 17. c++ :: ์ฝํ ::๋ฐฑ์ค ์๊ณ ๋ฆฌ์ฆ ์ ์ง ํ๋ฉด์ -1 1] ์์์ ์ดํ ์๋ฆฌ์, ๋๋ ์ ์ฒด ์๋ฆฌ์ ์ค์ ์ ๋ํ์ฌ. https://semaph.tistory.com/7 setf ์ดํ์ cout.precision(n) ํ๋ฉด ์์์ ์๋ ์๋ฆฌ์์ ๊ธธ์ด ์ค์ ์ด๊ณ , ๊ทธ๋ฅ cout.precision(n) ์ด๋ฉด ์ ์ฒด ์๋ฆฌ์ ์ค์ ์ด๋ค. cout.unsetf(ios::fixed); cout.setf(ios::fixed); cout.precision(9); cout > a; int aa = a; cout 2020. 10. 17. ์ด์ 1 2 3 ๋ค์