전체 글28 11279 최대힙 Heap의 기본 개념인 Binary search를 활용해 문제를 풀어 보았다 import sys import heapq from collections import deque input = sys.stdin.readline N = int(input()) heap = [] for i in range(N): n = int(input()) if n == 0 : if len(heap) == 0 : print(0) else: print(heap.pop(-1)) else: if len(heap) == 0 : heap.append(n) else: left = 0 right = len(heap)-1 while left n : right = mid -1 else: left = mid + 1 heap.insert(left,.. 2022. 7. 11. Background 실행 명령어 nohup {command} > {log save file name } & ex) nohup python pipeline_methods_test.py > find_frequency.out & 2022. 7. 11. Process 확인 명령어 ps -ef ex) Python 확인 ps -ef | grep python 2022. 7. 11. 파일 개수 파악 Linux 명령어 ls -l | grep ^- | wc -l 2022. 7. 11. 이전 1 2 3 4 5 ··· 7 다음