목록알고리즘 문제풀기/코드포스(Codeforces) (10)
문제 링크 : https://codeforces.com/contest/1080/problem/C 사실 문제는 많이 어렵지 않았다. 결과 개수만 long long으로 하고 좌표를 long long으로 선언하지 않아서 계속 맞왜틀을 시전한 문제. 문제에 대한 자세한 내용은 링크를 통해 확인하기로 하고 해결한 방법은 다음과 같다. 우선, black과 white의 개수가 있다. 이 때, white의 개수는 무조건 전체 개수 - black 개수이다. 그러므로 black만 따져주도록 하자. 흰색 잉크를 쏟고 그 다음 검정색 잉크를 쏟는 순서이다. - 먼저 원래 black이었던 칸의 개수를 구해준다.( 1,1이 w이므로 무조건 전체 칸 개수 / 2 ) - 다음은 흰색을 쏟은 상황이다. 흰색에 흰색을 쏟은 경우는 개수..
https://codeforces.com/ Codeforces에는 각 유저마다 Rating이 존재한다. 그리고 이 Rating은 Codeforces에서 시행하는 Round들을 통해 올릴 수 있다. 매번 메일이 오는데 전부 무시하다가 처음으로 참여를 해봤다. 참여한 라운드는 Codeforces Round #524 (Div.2) 문제수는 총 6문제였고 뒤로 갈수록 난이도도 올라가고 점수도 많이 주는 구조. 몰랐는데 Div.1은 첫 문제가 Div.2의 3번째 문제 수준이고 일정 Rating 이상만 참여할 수 있다고 한다. 그렇게 참여한 첫 Round 6문제 중에 3문제를 통과했고 뒤의 문제는 건들지도 못했다.. 다시 한번 부족함을 느낀 계기가 되었다. 제일 오른쪽의 +-숫자는 Rating의 변화를 의미하는데 ..