일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 | 31 |
- 백준
- baekjoon
- 새싹
- Android
- 디버그심볼
- 10926
- dp
- 코틀린
- 18108
- BitMasking
- 10807
- 백준1107
- 2525
- safari world
- 브루트포스
- 꼬마 정민
- PreferenceManager
- 개수 세기
- 백준1476
- 기본메신저
- 사파리 월드
- 백준3085
- 1330
- 25083
- kotlin
- Counting The number
- 파이썬
- 10430
- debugSymbolLevel
- Class Delegation
- Today
- Total
목록브루트포스 (4)
세상을 더 좋게
https://www.acmicpc.net/problem/1107 1107번: 리모컨 첫째 줄에 수빈이가 이동하려고 하는 채널 N (0 ≤ N ≤ 500,000)이 주어진다. 둘째 줄에는 고장난 버튼의 개수 M (0 ≤ M ≤ 10)이 주어진다. 고장난 버튼이 있는 경우에는 셋째 줄에는 고장난 버튼 www.acmicpc.net import sys input = sys.stdin.readline target = int(input()) n = int(input()) broken = list(map(int, input().split())) # 방향키 이동 min_count = abs(100-target) # 50만의 범위이기에 넉넉히 두배인 100만으로 하였다. broken키가 있으면 범위가 늘어나기 때문 f..
https://www.acmicpc.net/problem/1476 1476번: 날짜 계산 준규가 사는 나라는 우리가 사용하는 연도와 다른 방식을 이용한다. 준규가 사는 나라에서는 수 3개를 이용해서 연도를 나타낸다. 각각의 수는 지구, 태양, 그리고 달을 나타낸다. 지구를 나타 www.acmicpc.net e, s, m = map(int, input().split()) cnt = 1 i, j, k = 1, 1, 1 while True: if i == e and j == s and k == m: break i+=1 ; j+=1 ; k+=1 ; cnt+=1 ; if i == 16: i = 1 if j == 29: j = 1 if k == 20: k = 1 print(cnt) Point 일단 범위가 15, 2..
https://www.acmicpc.net/problem/3085 3085번: 사탕 게임 예제 3의 경우 4번 행의 Y와 C를 바꾸면 사탕 네 개를 먹을 수 있다. www.acmicpc.net import sys input = sys.stdin.readline def check(arr): n = len(arr) answer = 1 for i in range(n): # 열 체크 cnt=1 for j in range(1, n): if arr[i][j] == arr[i][j-1]: cnt +=1 else: cnt = 1 if cnt > answer: answer = cnt # 행 체크 cnt = 1 for j in range(1, n): if arr[j][i] == arr[j-1][i]: cnt +=1 els..
https://www.acmicpc.net/problem/2309 2309번: 일곱 난쟁이 아홉 개의 줄에 걸쳐 난쟁이들의 키가 주어진다. 주어지는 키는 100을 넘지 않는 자연수이며, 아홉 난쟁이의 키는 모두 다르며, 가능한 정답이 여러 가지인 경우에는 아무거나 출력한다. www.acmicpc.net list = [int(input()) for i in range(9)] total = sum(list) for i in range(9): for j in range(i+1, 9): if total - (list[i] + list[j]) == 100: num1, num2 = list[i], list[j] list.remove(num1) list.remove(num2) list.sort() for i in r..