일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |
- 교환학생
- 데이터 포트폴리오
- 아셈듀오 후기
- 패스트캠퍼스 #자료구조 #코딩테스트 #배열
- 데이터 시각화 포트폴리오
- 리뷰분석
- 제네바
- 아셈듀오
- CRM
- 교환학생주거
- HEG
- 제네바경영대학교
- 테이블계산
- MairaDB
- 키워드시각화
- 텍스트분석 시각화
- 데이터공모전
- 무신사 데이터분석
- 제네바기숙사
- 파이썬
- 두잇알고리즘코딩테스트
- 제네바주거
- 미래에셋 공모전
- 공모전후기
- 태블로 포트폴리오
- 태블로
- 데이터 분석 포트폴리오
- 아셈듀오 선정
- tableau
- 교환학생 장학금
- Today
- Total
목록Coding Test/Python (31)
민듀키티
1. 방번호https://www.acmicpc.net/problem/1475from collections import Counterimport mathA = list(map(int, input()))A_counter = Counter(A)A_count_list = list(A_counter.items())max_number = 0sixnine = 0for i in range(len(A_count_list)) : if A_count_list[i][0] == 6 : sixnine += A_count_list[i][1] elif A_count_list[i][0] == 9: sixnine += A_count_list[i][1] else : max_number..
1. 알람시계https://www.acmicpc.net/problem/2884n,m = map(int, input().split())time = n*60 + mturn_time = time - 45hour = turn_time // 60if hour 2. 개미https://www.acmicpc.net/problem/3048n,m = map(int, input().split())A = list(input())B = list(input())t = int(input())ants = A[::-1] + Bfor _ in range(t) : # 반복해야하는 횟수 for i in range( len(ants) - 1 ) : if (ants[i] in A) and (ants[i+1] in B) : ..
1. 알람시계https://www.acmicpc.net/problem/2884n,m = map(int, input().split())time = n*60 + mturn_time = time - 45hour = turn_time // 60if hour 2. 개미https://www.acmicpc.net/problem/3048n,m = map(int, input().split())A = list(input())B = list(input())t = int(input())ants = A[::-1] + Bfor _ in range(t) : # 반복해야하는 횟수 for i in range( len(ants) - 1 ) : if (ants[i] in A) and (ants[i+1] in B) : ..
1. 랜선 자르기https://www.acmicpc.net/problem/1654시간초과n,m = map(int, input().split())A = list()for i in range(n) : A.append(int(input()))number = 0while True : answer = 0 number += 1 for i in range(n) : answer += (A[i]//number) if answer 2. 한국이 그리울 땐 서버에 접속하지https://www.acmicpc.net/problem/9996n = int(input())N = list(input().split("*"))length = len(N[0]) + len(N[1])for _ in r..
1. 블로그 2dict. : B를 칠할 횟수와, R을 칠할 횟수를 저장함처음 값을 무조건 색칠해야 함으로 +1 해주기이전에 칠한 값이랑, 현재 칠한 값이랑 같다면 dict에서 업데이트를 해주지 않아도 됨 min(answer['B'], answer['R']) + 1 은, 두 개 중에 칠할 값이 더 적은 것을 들고 오겠다는 뜻https://www.acmicpc.net/problem/20365n = int(input())A = list(input())answer = {'B' : 0, 'R' : 0 }answer[A[0]] += 1for i in range(1,n) : if A[i-1] != A[i] : answer[A[i]] += 1min_number = min(answer['B'], ans..
1. 주유소거꾸로 풀면 안됨 ... import sysinput = sys.stdin.readlinen = int(input())A = list(map(int, input().split()))B = list(map(int, input().split()))del B[-1]dp = [0] * nfor i in range(n) : if i == 0 : dp[-1] = A[-1] * B[-1] else : number = i * (-1) dp[number] = min((dp[number+1] + (A[number]*B[number])), B[number] * sum(A[number:]))print(max(dp)) 정답for 문을 돌면서 비용 최솟값을 계속 업데이트..
1. 전쟁 - 전투https://www.acmicpc.net/problem/1303from collections import dequedirections = [(1,0),(-1,0),(0,1),(0,-1)]def BFS(v,team) : team_list = v queue = deque() answer = 0 count = 0 for row in range(m) : for col in range(n) : if team_list[row][col] == team : queue.append((row,col)) team_list[row][col] = '0' while que..
오늘은 알고리즘 책 복습했다 ! + 해시, 트리, 그래프, 정렬 부분 공부 필요함 1. 트리의 지름https://www.acmicpc.net/problem/1167from collections import deque N = int(input()) A = [[] for _ in range (N+1)] # 데이터 인접 리스트로 구현 -> 튜플 형태로 저장해서 -> 거리 값 꺼낼 수 있도록 하기 위해 for _ in range(N) : Data = list(map(int, input().split())) index = 0 S = Data[index] # 트리 인덱스 index += 1 while True : E = Data[index] if E == -1 : break V = Data[index + 1] A[..
1. 단어정렬https://www.acmicpc.net/problem/1181from heapq import heapifyimport heapqn = int(input())set_a = set()for i in range(n) : word = input() set_a.add((len(word),word))set_a = list(set_a)heapq.heapify(set_a)for i in range(len(set_a)) : print(heapq.heappop(set_a)[1]) 2. 단어 뒤집기사실 노가다 코드임 .. 근데 다른 사람들도 이렇게 푸는 것 같다... https://www.acmicpc.net/problem/17413n = list(input())stack = []while ..
1. 부분합문제 똑바로 읽기.. S 이상이 되는 것임 !!S가 아니라https://www.acmicpc.net/problem/1806n,m = map(int, input().split())A = list(map(int, input().split()))number_sum = A[0]start_index = 0end_index = 0set_a = set()while True : if number_sum 2. Maximum Subarrayhttps://www.acmicpc.net/problem/10211n = int(input())for i in range(n) : a = int(input()) A = list(map(int, input().split())) dp = [0] * a ..