Codeforces Round #603 (Div. 2)
A. Sweet Problem 题目大意:你有不同数量的红绿蓝三种颜色的糖果,每天想吃两颗颜色不同的糖果,问能吃多少天。 2019ICPC沈阳赛区flowers的弱化题qwqflowers是有n种花选m种不同种类的一朵花组成一束花问最多能组成多少束。 是否可行具有单调性,二分天数,只要选的糖果数小于等于天数,就一定存在某种方案,不会出现某一天吃两只同样的糖果。 1 #include <bits/stdc++.h> 2 #define MIN(a,b) ((((a)<(b)?(a):(b)))) 3 #define MAX(a,b) ((((a)>(b)?(a):(b)))) 4 #define ABS(a) ((((a)>0?(a):-(a)))) 5 using namespace std; 6 7 template <typename T> 8 void read(T &x) { 9 int s = 0, c = getchar(); 10 x = 0; 11 while (isspace(c)) c = getchar(); 12 if (c == 45) s = 1, c = getchar(); 13 while (isdigit(c)) x = (x << 3) + (x << 1) + (c ^ 48), c = getchar(); 14 if (s) x =