본문 바로가기

코드포스

[코드포스 Practice3] C. Serval and Toy Bricks Luckily, Serval got onto the right bus, and he came to the kindergarten on time. After coming to kindergarten, he found the toy bricks very funny. He has a special interest to create difficult problems for others to solve. This time, with many 1×1×11×1×1 toy bricks, he builds up a 3-dimensional object. We can describe this object with a n×mn×m matrix, such that in each cell (i,j)(i,j), there are.. 더보기
[코드포스 Practice3] A. Uniform String You are given two integers n and k. Your task is to construct such a string s of length n that for each i from 1 to k there is at least one i-th letter of the Latin alphabet in this string (the first letter is 'a', the second is 'b' and so on) and there are no other letters except these. You have to maximize the minimal frequency of some letter (the frequency of a letter is the number of occurre.. 더보기
[코드포스] Practice 1 후기 코포.. 코드포스.. 처음으로 여기 문제 풀어봤다. 주변에서 코포 블루니 민트니 그런 얘기를 듣긴 들어서 존재는 알았는데 나랑 관련 없는 곳이라 생각하고 그냥 백준만 풀었었다. 그러다 코포..! 연습문제를 풀었다. 문제는 총 5문제고 두시간동안 풀었다. 영어문제.. 영어다.. 그래서 많이 겁먹고 시작했음. 보면 알겠지만 헤맸다. 그냥 바로바로 떠오르는 대로 코드 짜다가 갑자기 쉬운 방법이 떠올라서 방향을 틀었다. 그래서 쉬운 문제였는데 30분을 썼다ㅋㅋ #include using namespace std; int main() { int n; scanf("%d", &n); printf("%d", n/3+(n+2)/3); } 나는 이렇게 풀었다. 규칙 찾아서 식을 바로 적었음. 이렇게 말고도 항상 1->2-.. 더보기