전체 글625 leetcode : 1327. List the Products Ordered in a Period leetcode : 1327. List the Products Ordered in a Period[leetcode : 1327. List the Products Ordered in a Period]다이어그램erDiagram Products { int product_id PK varchar product_name varchar product_category }2월에 판매된 제품들 중, 매출이 100 넘는 제품의 이름과 매출 출력하기 문제 풀이MySQL-- Solution 1with feb_sales as ( select *, sum(unit) as amount from orders where order_date between '2020-02-.. 2025. 1. 23. leetcode : 1321. Restaurant Growth leetcode : 1321. Restaurant Growth[leetcode : 1321. Restaurant Growth]다이어그램erDiagram Transactions { int customer_id PK varchar name date visited_on PK int amount }목표이동평균, 이동합(?)을 구하는 문제 문제 풀이MySQL-- Solution 1with sales_day as ( select visited_on, sum(amount) as amount from customer group by visited_on order by visited_on),moving_avg as ( select v.. 2025. 1. 22. leetcode : 1280. Students and Examinations leetcode : 1280. Students and Examinations[leetcode : 1280. Students and Examinations]다이어그램erDiagram Students { int student_id PK varchar student_name } Subjects { varchar subject_name PK } Examinations { int student_id FK varchar subject_name FK } Students ||--o{ Examinations: "has" Subjects ||--o{ Examinations: "includes"목표각 학생의 과목 수강 .. 2025. 1. 21. [파이썬] 백준 23286 : 허들 넘기 (골드3) [파이썬] 백준 23286 : 허들 넘기 (골드3)https://www.acmicpc.net/problem/23286풀이방향성 생각현재까지 통과한 간선 중 최대값을 힙에 담아서 다익스트라. 전체코드파이썬import heapq as hqimport sysinput = lambda : sys.stdin.readline().rstrip()INF = sys.maxsizeN,M,T = map(int,input().split())G = [[] for _ in range(M+1)]for _ in range(M): a,b,cost = map(int,input().split()) G[a].append((b,cost))def di(start): V = [INF]*(M+1) V[start] = 0 .. 2025. 1. 21. 이전 1 ··· 15 16 17 18 19 20 21 ··· 157 다음