목록브루트 포스 (4)
넘치게 채우기
https://www.acmicpc.net/problem/1111BOJ - IQ Test문제 유형: 수학, 구현, 조건분기, 브루트 포스문제 난이도: Gold III시간 제한: 2초메모리 제한: 128MB문제IQ Test의 문제 중에는 공통된 패턴을 찾는 문제가 있다. 수열이 주어졌을 때, 다음 수를 찾는 문제이다.예를 들어, 1, 2, 3, 4, 5가 주어졌다. 다음 수는 무엇인가? 당연히 답은 6이다. 약간 더 어려운 문제를 보면, 3, 6, 12, 24, 48이 주어졌을 때, 다음 수는 무엇인가? 역시 답은 96이다.이제 제일 어려운 문제를 보자.1, 4, 13, 40이 주어졌을 때, 다음 수는 무엇일까? 답은 121이다. 그 이유는 항상 다음 수는 앞 수*3+1이기 때문이다.은진이는 위의 3문제를..
https://codeforces.com/contest/2064/problem/CCodeforces Round 1005(Div. 2) - C. Remove the ends문제 유형: 그리디, 해 구성하기, 모노토닉, 구간합, 브루트 포스시간 제한: 3초메모리 제한: 256MB 문제You have an array a">a of length n">n consisting of non-zero integers. Initially, you have 0">0 coins, and you will do the following until a">a is empty:Let m">m be the current size of a">a. Select an integer i">i where 1≤i≤m">..
https://codeforces.com/contest/2067/problem/CCodeforces Round 1004(Div.2) - C. Devyatkino문제 유형: 수학, 그리디, 탐색, 브루트 포스시간 제한: 2초메모리 제한: 256MB 문제You are given a positive integer n">n. In one operation, you can add to n">n any positive integer whose decimal representation contains only the digit 9">9, possibly repeated several times.What is the minimum number of operations needed to make the number n"..
https://codeforces.com/contest/2043/problem/DEducational Codeforces Round 173(Div.2) - D. Problem about GCD문제 유형: 수학, 브루트 포스, 그리디시간 제한: 1초메모리 제한: 256MB 문제Given three integers l">l, r">r, and G">G, find two integers A">A and B">B (l≤A≤B≤r">l≤A≤B≤r) such that their greatest common divisor (GCD) equals G">G and the distance |A−B|">|A−B| is maximized.If there are multiple..