Codeforces Round 857 (Div. 2) A~D
A. Likes - 구현 https://codeforces.com/contest/1802/problem/A Problem - A - Codeforces codeforces.com 입력받은 양수(like)가 x개, 음수(dislike)가 y개라 하면, maximum number of likes : 1~x까지 출력, x-1~x-y까지 출력 minimum number of likes : min(x, y)번 동안 1과 0 번갈아 출력, 1~max(x, y) - min(x, y)까지 출력 #define _SILENCE_ALL_CXX20_DEPRECATION_WARNINGS #include using namespace std; typedef long long ll; typedef pair pii; typedef p..
알고리즘/baekjoon
2023. 3. 12. 00:39