K

@kimjuha19

컨베이어 벨트 위의 로봇 공정 (ai)

Python
2 hours ago
from collections import deque def solution(N, K, durabilities): belt = deque(durabilities) robots = deque([False] * N) step = 0 while True: step += 1

스마트 그리드 전력 피크치 분산 (ai)

Python
2 hours ago
def solution(schedules): schedules.sort(key=lambda x: (x[1], x[0])) count = 0 end_time = -1 for start, end in schedules: if start >= end_time: count += 1 end_time = end

가상 자산 보안 네트워크 그룹 분석(ai)

Python
2 hours ago
def solution(n, connections): parent = list(range(n)) def find(x): if parent[x] != x: parent[x] = find(parent[x]) return parent[x] def union(a, b): pa = find(a)

로봇 탐사선 화물 이동 최적화(ai)

Python
3 hours ago
from collections import deque def solution(warehouse): M = len(warehouse) N = len(warehouse[0]) visited = [[False] * N for _ in range(M)] queue = deque() queue.append((0, 0, 1))

자율주행 센서 데이터 필터링(ai)

Python
3 hours ago
from bisect import bisect_left def solution(sensor_data): lis = [] for num in sensor_data: idx = bisect_left(lis, num) if idx == len(lis): lis.append(num)

드론 배송 최단 지연 시간 산출(ai)

Python
3 hours ago
import heapq def solution(N, routes): graph = [[] for _ in range(N)] for start, end, cost in routes: graph[start].append((end, cost)) INF = float('inf') distance = [INF] * N

한정판 굿즈 적재 최적화(ai)

Python
3 hours ago
def solution(goods, max_weight): dp = [0] * (max_weight + 1) for weight, value in goods: for w in range(max_weight, weight - 1, -1): dp[w] = max(dp[w], dp[w - weight] + value) return dp[max_weight]

태양광 패널 최대 연속 발전 효율(ai)

Python
3 hours ago
def solution(efficiencies): current = efficiencies[0] maximum = efficiencies[0] for i in range(1, len(efficiencies)): current = max(efficiencies[i], current + efficiencies[i]) maximum = max(maximum, current) return

마케팅 캠페인 구간 매출 분석(ai)

Python
3 hours ago
def solution(daily_sales, periods): prefix = [0] for sale in daily_sales: prefix.append(prefix[-1] + sale) answer = [] for start, end in periods: answer.append(prefix[end + 1] - prefix[start])

스마트 팩토리 공정 라인 제어(ai)

Python
5 hours ago
def solution(sensor_state, switches): for switch in switches: sensor_state ^= switch return sensor_state sensor_state = 9 switches = [3, 6]

고객 센터 대기 시간 계산

C
2 days ago
#include <stdio.h> int queue[100]; int f = 0; int r = 0; void enque(int x){ queue[r++] = x; }

최근 방문 기록 관리

C
3 days ago
#include <stdio.h> int queue[100]; int f = 0; int r = 0; void enque(int x){ queue[r++] = x; }

요세푸스 문제(2)

C
3 days ago
#include <stdio.h> int docs[100] = {}; int f = 0; int r = 0; void enque(int x){ docs[r++] = x; }

요세푸스 문제(1)

C
3 days ago
#include <stdio.h> int docs[100] = {}; int f = 0; int r = 0; void enque(int x){ docs[r++] = x; }

카드 섞기

C
3 days ago
#include <stdio.h> int docs[100] = {}; int f = 0; int r = 0; void enque(int x){ docs[r++] = x; }

프린터 인쇄 대기열

C
3 days ago
#include <stdio.h> #include <string.h> char* docs[100] = {}; int f = 0; int r = 0; void enque(char* x){ docs[r++] = x; }

회전된 정렬 배열에서 최솟값 찾기

Python
3 days ago
rotated = [4, 5, 6, 7, 0, 1, 2] left = 0 right = len(rotated) - 1 while left < right: mid = (left + right) // 2 if rotated[mid] > rotated[right]: left = mid + 1

성적 우수자 선발 다중 조건 정렬

Python
3 days ago
students = [[1001, 80, 90], [1002, 90, 80], [1003, 70, 80]] students.sort(key=lambda x: (-x[1], x[2], x[0])) answer = [] for i in range(len(students)): answer.append(students[i][0]) print(answer)

아나그램 단어 판별

Python
3 days ago
wordA = "Listen" wordB = "Silent" wordA = wordA.lower() wordB = wordB.lower() arr = [] for i in wordA: arr += i

회의실 배정 최적화

Python
3 days ago
meetings = [[1, 4], [3, 5], [0, 6], [5, 7], [3, 8], [5, 9], [6, 10], [8, 11]] new = [] for start, end in meetings: new.append([end, start]) new.sort() count = 1