Codeforce
-
Codeforces Round #428 (Div. 2) - A. Arya and Bran코드포스(CodeForce) 2018. 8. 17. 15:40
1. 문제 2. 알고리즘키워드 - 구현 * 접근법첫 라인으로 입력되는 숫자는 사탕을 주는 일수와 총 사탕의 양 이다두 번째 라인으로 입력되는 숫자는 일별 주는 사탕의 개수다.하루에 줄 수 있는 사탕의 총 양은 8개 이다.일별 주는 사탕의 수가 8개 이상이면 남은 사탕은 그 다음 날 줄 수 있다. 3. 코드 123456789101112131415161718192021222324252627282930313233343536373839404142#include #include // min#include #include using namespace std; int main() { int n,k; cin >> n >> k; int arr[101] = { 0, }; for (int i = 1; i > arr[i]; ..
-
Codeforces Round #479 (Div. 3) - B - Two-gram코드포스(CodeForce) 2018. 8. 17. 15:30
1. 문제 B. Two-gramtime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputTwo-gram is an ordered pair (i.e. string of length two) of capital Latin letters. For example, "AZ", "AA", "ZA" — three distinct two-grams.You are given a string ss consisting of nn capital Latin letters. Your task is to find any two-gram contained in the given string as a substr..
-
Codeforces Round #486 (Div. 3) - A. Diverse Team구현(Implementation) 2018. 6. 19. 11:21
http://codeforces.com/contest/988/problem/A 1. 문제A. Diverse Teamtime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputThere are nn students in a school class, the rating of the ii-th student on Codehorses is aiai. You have to form a team consisting of kk students (1≤k≤n1≤k≤n) such that the ratings of all team members are distinct. If it is impossibl..