
codeforce
codeforce应该知道吧
饮闲
写作是门孤独的手艺,意义却在于分享
展开
-
Codeforces Round #663 (Div. 2) B题
题目链接 #include <cstdio> #include <iostream> using namespace std; int main() { int T; scanf("%d",&T); while(T--) { int n,m; int ans=0; char c; scanf("%d %d",&n,&m); for(int i=0原创 2020-08-10 23:47:27 · 228 阅读 · 0 评论 -
Codeforces Round #663 (Div. 2) A题
题目链接 这是一道简单题,我当时构造了一种剩余最大,剩余最小,轮番输出的方式,来实现了题目中的要求。 实际上好像还有更简单的方式,直接从大到小输出,或者从小往大输出也是可以的?可以尝试一下。 代码 #include <iostream> #include <cstdio> using namespace std; const int max_n = 100; int a[max_n]; void print(int n) { int i=0; for(int原创 2020-08-10 11:40:29 · 269 阅读 · 0 评论