Security 2
Problem: https://atcoder.jp/contests/abc407/tasks/abc407_c C - Security 2AtCoder is a programming contest site for anyone from beginners to experts. We hold weekly programming contests online.atcoder.jp 문제 요약특별한 기능을 가진 버튼 A, B가 있다.입력된 값(input)을 만들기 위해서는, A,B 버튼을 최소 몇 번 사용해야 하는가? 초기값: 빈 문자열(S)버튼A: S에 0을 더한다버튼B: S의 모든 문자에 1을 더한다 예시)S: 1984버튼A: 19840버튼B: 20951 모든 문자는 (0, 1, 2, 3, 4, 5, 6, 7, 8, 9)로..
Lesson 15. Caterpillar method - MinAbsSumOfTwo #1
1. 문제Let A be a non-empty array consisting of N integers.The abs sum of two for a pair of indices (P, Q) is the absolute value |A[P] + A[Q]|, for 0 ≤ P ≤ Q For example, the following array A:A[0] = 1A[1] = 4A[2] = -3has pairs of indices (0, 0), (0, 1), (0, 2), (1, 1), (1, 2), (2, 2).The abs sum of two for the pair (0, 0) is A[0] + A[0] = |1 + 1| = 2.The abs sum of two for the pair (0, 1) is A[0]..