Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Tags
- 다익스트라
- 파이썬
- level2
- 백준
- 딕셔너리
- 브루트포스
- BOJ
- 힙
- level3
- python
- 다이나믹 프로그래밍
- MYSQL
- 운영체제
- N과M
- 재귀
- DP
- 구현
- BFS
- dfs
- programmers
- 그리디
- dict
- 수학
- level1
- 스택
- 가상메모리
- 가상메모리 관리
- level0
- 코딩테스트
- 프로그래머스
Archives
- Today
- Total
목록IOIOI (1)
동캄의 코딩도장
백준 5525 [IOIOI] 파이썬
https://www.acmicpc.net/problem/5525 5525번: IOIOI N+1개의 I와 N개의 O로 이루어져 있으면, I와 O이 교대로 나오는 문자열을 PN이라고 한다. P1 IOI P2 IOIOI P3 IOIOIOI PN IOIOI...OI (O가 N개) I와 O로만 이루어진 문자열 S와 정수 N이 주어졌을 때, S안에 PN이 몇 www.acmicpc.net #백준 5525 IOIOI import sys input=sys.stdin.readline N=int(input()) M=int(input()) S=list(map(str,input().rstrip())) target=2*N+1 dp=[0]*(M) answer=0 if S[0]=='I': dp[0]=1 for i in range(..
코테/BOJ
2023. 3. 21. 10:30