Problem - A - Codeforces
// Problem: A. Binary Imbalance
// Contest: Codeforces - Educational Codeforces Round 159 (Rated for Div. 2)
// URL: https://codeforces.com/contest/1902/problem/A
// Memory Limit: 256 MB
// Time Limit: 2000 ms
//
// Powered by CP Editor (https://cpeditor.org)
#include
#include
#include
#include
#include
#include
题解:
情况无非为
1: 0满足条件 == YES
2: 0不满足条件 == >> 0存在 ? "YES" : "NO"
Problem - B - Codeforces
// Problem: B. Getting Points
// Contest: Codeforces - Educational Codeforces Round 159 (Rated for Div. 2)
// URL: https://codeforces.com/contest/1902/problem/B
// Memory Limit: 256 MB
// Time Limit: 1000 ms
//
// Powered by CP Editor (https://cpeditor.org)
#include
#include
#include
#include
#include
#include
题解:
贪心:
一天最大化收益为2任务 + 1课程
即每2周存在一天可以实现该情况
== >> 计算最大化收益的方式可以获取多少学分
== >> 最大化收益的方式获得的学分 > 所需学分 == >> day = 所需学分 / 每日最大化收益学分
== >> 反之 day = 可最大化收益方式的天数 + 剩下所需学分 / 课程可修学分
== >> ans = n - day
Problem - C - Codeforces
// Problem: C. Insert and Equalize
// Contest: Codeforces - Educational Codeforces Round 159 (Rated for Div. 2)
// URL: https://codeforces.com/contest/1902/problem/C
// Memory Limit: 256 MB
// Time Limit: 2000 ms
//
// Powered by CP Editor (https://cpeditor.org)
#include
#include
#include
#include
#include
#include
题解:
代码中包含讲解。