목록Codeforces (15)
넘치게 채우기
https://codeforces.com/contest/2063/problem/ACodeforces Round 1000(Div.2) - A. Minimal Coprime문제 유형: 수학, 그리디시간 제한: 1초메모리 제한: 256MB 문제A segment of positive integers [l,r]">[l,r] is called coprime if l">l and r">r are coprime.A coprime segment [l,r]">[l,r] is called minimal coprime if it does not contain any coprime segment not equal to itself. To better understand this statement, you can refer to..
https://codeforces.com/contest/2055/problem/DCodeforces Round 996(Div.2) - D. Scarecrow문제 유형: 그리디, 구현, 수학시간 제한: 2초메모리 제한: 256MB 문제A crow is sitting at position 0">0 of the number line. There are n">n scarecrows positioned at integer coordinates a1,a2,…,an">a1,a2,…,an along the number line. These scarecrows have been enchanted, allowing them to move left and right at a speed of 1">1unit pe..
https://codeforces.com/contest/2055/problem/CCodeforces Round 996(Div.2) - C. The Trail문제 유형: 행렬, 수학, 구현, 생성형시간 제한: 2초메모리 제한: 256MB 문제In the wilderness lies a region of mountainous terrain represented as a rectangular grid with n">n rows and m">m columns. Each cell in the grid is identified by its position (i,j)">(i,j), where i">i is the row index and j">j is the column index. The altitude of ce..
https://codeforces.com/contest/2055/problem/BCodeforces Round 996(Div.2) - B. Crafting문제 유형: 수학, 그리디시간 제한: 1초메모리 제한: 256MB 문제There are n">n different types of magical materials, numbered from 1">1 to n">n. Initially, you have ai">ai units of material i">i for each i">i from 1">1 to n">n. You are allowed to perform the following operation:Select a material i">i (where 1≤i≤n">1≤i≤n)...
https://codeforces.com/contest/2055/problem/ACodeforces Round 996(Div.2) - A. Two Frogs문제 유형: 구현, 수학, 그리디시간 제한: 1초메모리 제한: 256MB 문제There are n">n lilypads arranged in a row, numbered from 1">1 to n">n from left to right. Alice and Bob are frogs initially positioned on distinct lilypads, a">a and b">b, respectively. They take turns jumping, starting with Alice.During a frog's turn, it can jump eit..
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..
https://codeforces.com/contest/2043/problem/CEducational Codeforces Round 173(Div.2) - C. Sums on Segments문제 유형: 수학, 부분합, 그리디시간 제한: 1초메모리 제한: 256MB 문제You are given an array a">a of n">n integers, where all elements except for at most one are equal to −1">−1 or 1">1. The remaining element x">x satisfies −109≤x≤109">−10^9≤x≤10^9.Find all possible sums of subarrays of a"..
https://codeforces.com/contest/2043/problem/AEducational Codeforces Round 173(Div.2) - A. Coin Transformation문제 유형: 재귀, 분할 정복시간 제한: 1초메모리 제한: 256MB 문제Initially, you have a coin with value n">n.You can perform the following operation any number of times (possibly zero):- transform one coin with value x">x, where x">x is greater than 3">3 (x>3">x>3), into two coins with value ⌊x4⌋..
https://codeforces.com/contest/2033/problem/DCodeforces Round 981(Div.3) - D. Kosuke's Assignment문제 유형: 부분합, 그리디, 다이나믹 프로그래밍시간 제한: 2초메모리 제한: 256MB 문제After a trip with Sakurako, Kousuke was very scared because he forgot about his programming assignment.In this assignment, the teacher gave him an array a">a of n">n integers and asked him to calculate the number of non-overlapping segments of the a..
https://codeforces.com/contest/2033/problem/CCodeforces Round 981(Div.3) - C. Sakurako's Field Trip문제 유형: 투 포인터, 그리디시간 제한: 2초메모리 제한: 256MB 문제Even in university, students need to relax. That is why Sakurakos teacher decided to go on a field trip. It is known that all of the students will be walking in one line. The student with index i">i has some topic of interest which is described as ai">a_i.A..