๐ฅ Gold4https://www.acmicpc.net/problem/13975 โ 1์ฐจํ์ดimport sysfrom collections import dequeinput = sys.stdin.readlinen=int(input())for _ in range(n): m=int(input()) nums=sorted(list(map(int,input().strip().split()))) queue=deque(nums) result=0 while len(queue)>=1: if len(queue)==1: print(result) break temp=queue[0]+queue[1] ..
๐ฅ Silver3https://www.acmicpc.net/problem/1021 โ
์ ๋ตํ์ดimport sysfrom collections import dequeinput = sys.stdin.readlinen, m = map(int, input().split())num_list = list(map(int, input().split()))# 2๋ฒ๊ณผ 3๋ฒ ์ค ์ด๋ ๋ฐฉ๋ฒ์ ๊ฒฐ์ ํ ์ง-> ์ค๊ฐ ์ธ๋ฑ์ค๋ฅผ ๊ธฐ์ค์ผ๋ก ํด๋น index๊ฐ ๊ฐ๊น์ด์ชฝ์ผ๋กq = deque([i for i in range(1, n + 1)])result = 0for num in num_list: while True: # ๋งจ์ ์์๊ฐ ๋น ์ ธ๋๊ฐ์์๋์ง ํ์ธ if q[0] == num: q...
๐ฅ Silver3https://www.acmicpc.net/problem/1966 โ
์ ๋ตํ์ด# ์ธ์=๋งจ์์์ ์ ๊ฑฐ์, # list(stack)๋ pop(0)=O(n)# Queue๋ popleft()=O(1) -> Queue ์ฌ์ฉ# ์ฒซ๋ฒ์งธ ์์๊ฐ queue์์ max๊ฐ์ด์ฌ์ผ ์ถ๋ ฅ์ด ๊ฐ๋ฅimport sysfrom collections import dequeinput=sys.stdin.readlinen=int(input())find=Falsefor _ in range(n): q=deque() #queue ์์ฑ n,target=map(int,input().split()) priority=list(map(int,input().split())) for idx,p in enume..
[Lv1] ๊ฐ์ ์ซ์๋ ์ซ์ด function solution(arr) { const answer = [arr[0]]; //์ฒซ๋ฒ์งธ ์์๋ ํญ์ ํฌํจ for(let i=1;iarr[i]!==arr[i+1]) } ์ ํ์ฑ: 71.9, ํจ์จ์ฑ: 28.1 [Lv2] ๊ธฐ๋ฅ๊ฐ๋ฐ function solution(progresses, speeds) { var answer = []; const work=[] //1. ์์
์ผ ๋ฐฐ์ด ์์ฑ for(let i=0;i< progresses.length;i++){ let left=100-progresses[i]; left=Math.ceil(left/speeds[i]) work.push(left) } //2. ์ํ let deploy=work[0]; let count=0; for(let..
'ํ' ํ๊ทธ์ ๊ธ ๋ชฉ๋ก
๋จ์ถํค
๋ด ๋ธ๋ก๊ทธ
๋ด ๋ธ๋ก๊ทธ - ๊ด๋ฆฌ์ ํ ์ ํ |
Q
Q
|
์ ๊ธ ์ฐ๊ธฐ |
W
W
|
๋ธ๋ก๊ทธ ๊ฒ์๊ธ
๊ธ ์์ (๊ถํ ์๋ ๊ฒฝ์ฐ) |
E
E
|
๋๊ธ ์์ญ์ผ๋ก ์ด๋ |
C
C
|
๋ชจ๋ ์์ญ
์ด ํ์ด์ง์ URL ๋ณต์ฌ |
S
S
|
๋งจ ์๋ก ์ด๋ |
T
T
|
ํฐ์คํ ๋ฆฌ ํ ์ด๋ |
H
H
|
๋จ์ถํค ์๋ด |
Shift + /
โง + /
|
* ๋จ์ถํค๋ ํ๊ธ/์๋ฌธ ๋์๋ฌธ์๋ก ์ด์ฉ ๊ฐ๋ฅํ๋ฉฐ, ํฐ์คํ ๋ฆฌ ๊ธฐ๋ณธ ๋๋ฉ์ธ์์๋ง ๋์ํฉ๋๋ค.