![](https://img-blog.csdnimg.cn/20201014180756757.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
水题
我好想逃
这个作者很懒,什么都没留下…
展开
-
CodeForces-632C-The Smallest String Concatenation(水题报告,学习sort用法)
题目链接:http://codeforces.com/problemset/problem/632/C题意也简单,输入n个字符串,从长到短依次输出,用string+sort就可以解决对于bool来说,一个整数,非零即为真。也就是整数的0对应于False; 其它的值(如-1和1)对应于True;string字符串比较长度的方法:https://blog.csdn.net/fanyun...原创 2018-08-18 14:24:48 · 129 阅读 · 0 评论 -
CodeForces - 1004B(水)
题目链接:http://codeforces.com/problemset/problem/1004/B题意:n朵花,0代表玫瑰,1代表百合,每个区间的满意度=这个区间里:玫瑰的数量×百合的数量 思路,我们可以直接将百合和玫瑰间隔放,就OK了AC代码#include<iostream>#include<cstdio>using namespace ...原创 2018-08-26 12:17:32 · 205 阅读 · 0 评论 -
HDU 1216 打表水题
#include <iostream>#include<cstdio>#include <cstring>#define maxn 50000 using namespace std;int vis[maxn];int ans[3010];int main(){ memset(vis,0,sizeof(vis)); int cnt=1; ...原创 2018-08-22 16:22:35 · 224 阅读 · 0 评论 -
HDU 1302 the snail 水一水
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1302#include <iostream>#include<cstdio>#include <cstring>#include<cmath>#define maxn 50000 using namespace std;int mai...原创 2018-08-22 17:15:46 · 159 阅读 · 0 评论 -
HDU 2041 (斐波那契数列,水题)
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2041思路:举几个例子就可以看得出是斐波那契数列,用递归做就行AC代码#include<iostream>#include<cstdio>using namespace std;int fun(int x){ if(x==1) return 1; i...原创 2018-08-28 16:30:13 · 149 阅读 · 0 评论 -
51node-1010 打表
K的因子中只包含2 3 5。满足条件的前10个数是:2,3,4,5,6,8,9,10,12,15。所有这样的K组成了一个序列S,现在给出一个数n,求S中 >= 给定数的最小的数。例如:n = 13,S中 >= 13的最小的数是15,所以输出15。Input第1行:一个数T,表示后面用作输入测试的数的数量。(1 <= T <= 10000)第2 - T +...原创 2018-10-15 21:31:55 · 130 阅读 · 0 评论