본문 바로가기
반응형

알고리즘/SWEA38

[파이썬] [SWEA] 4839. [파이썬 S/W 문제해결 기본] 2일차 - 이진탐색 swexpertacademy.com/main/learn/course/subjectList.do?courseId=AVuPDN86AAXw5UW6 SW Expert Academy SW 프로그래밍 역량 강화에 도움이 되는 다양한 학습 컨텐츠를 확인하세요! swexpertacademy.com 1. normal T = int(input()) # 여러개의 테스트 케이스가 주어지므로, 각각을 처리합니다. for test_case in range(1, T + 1): P, Pa, Pb = map(int, input().split()) # 전체 쪽 수: P 각각찾을 쪽수 a, b def cent(P,Pa): start = 1 end = P count = 1 center = (start + end) // 2 while cen.. 2021. 2. 20.
[파이썬] [SWEA] 4837. [파이썬 S/W 문제해결 기본] 2일차 - 부분집합의 합 swexpertacademy.com/main/learn/course/subjectList.do?courseId=AVuPDN86AAXw5UW6 SW Expert Academy SW 프로그래밍 역량 강화에 도움이 되는 다양한 학습 컨텐츠를 확인하세요! swexpertacademy.com 1. normal T = int(input()) # 여러개의 테스트 케이스가 주어지므로, 각각을 처리합니다. for test_case in range(1, T + 1): N, K = map(int, input().split()) arr = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12] n = len(arr) total = [] count = 0 for i in range(1 2021. 2. 20.
[파이썬] [SWEA] 4836. [파이썬 S/W 문제해결 기본] 2일차 - 색칠하기 swexpertacademy.com/main/learn/course/subjectList.do?courseId=AVuPDN86AAXw5UW6 SW Expert Academy SW 프로그래밍 역량 강화에 도움이 되는 다양한 학습 컨텐츠를 확인하세요! swexpertacademy.com 1. normal T = int(input()) # 여러개의 테스트 케이스가 주어지므로, 각각을 처리합니다. for test_case in range(1, T + 1): box = [[0] * 10 for i in range(10)] N = 0 n = int(input()) for i in range(n): x1, y1, x2, y2, color = map(int, input().split()) for j in range(x.. 2021. 2. 20.
[파이썬] [SWEA] 4835. [파이썬 S/W 문제해결 기본] 1일차 - 구간합 swexpertacademy.com/main/learn/course/subjectList.do?courseId=AVuPDN86AAXw5UW6 SW Expert Academy SW 프로그래밍 역량 강화에 도움이 되는 다양한 학습 컨텐츠를 확인하세요! swexpertacademy.com 1. normal T = int(input()) for tc in range(1,T+1): N, n = list(map(int, input().split())) arr = list(map(int, input().split())) # 최대 # 섹터 합의 개수인 n을 뺀다 for i in range(0, len(arr)-n+1): max_arr = 0 min_arr = 0 if i == 0: for k in range(n): m.. 2021. 2. 20.
반응형