![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
思维
文章平均质量分 64
一年不久
这个作者很懒,什么都没留下…
展开
-
蓝桥杯 蚂蚁感冒
类似挑战白皮的蚂蚁问题,转换思维即可。 题目思路 #include<cstdio> #include<cstring> #include<iostream> #include<algorithm> using namespace std; const int maxn = 60; int a[maxn]; int n; int main...原创 2019-05-19 12:10:13 · 184 阅读 · 0 评论 -
Wishare H题
小A要发布一个视频展现他优秀的球技,视频有n帧,小A有m个粉丝,如果同时有两个以上的粉丝看到他秀球技的一帧,该视频就会被广为传播,导致所有的粉丝发疯。每个粉丝会在y = k * ai + ri 时刻看视频,k为整数,问在保证粉丝不发疯的情况下小A可以在多少帧里炫技? 0 < a <= 100,0 <= r < a,1 <= n,m <=1e5 仔细观察数据量...原创 2019-05-02 14:14:46 · 202 阅读 · 0 评论 -
cf Round552E(思维)
#include<cstdio> #include<cstring> #include<iostream> #include<algorithm> #include<vector> #include<map> #include<queue> #include<set> using namespace ...原创 2019-04-29 22:12:06 · 94 阅读 · 0 评论 -
蓝桥杯 连号区间数
思维题: 一个区间是否连续,就看这个区间中(最大值 - 最小值 + 1)是否等于区间长度...... #include<cstdio> #include<cstring> #include<algorithm> #include<iostream> using namespace std; const int maxn = 5050; int...原创 2019-05-25 11:13:47 · 256 阅读 · 0 评论 -
hdu6282(思维)
#include<bits/stdc++.h> using namespace std; string a, b; const int maxn = 1e4 +10; int l[2][maxn]; int transform_s(int x, string s) { int sum = 0, num = 0; for(int i = 0; i <...原创 2019-05-11 22:47:01 · 263 阅读 · 0 评论 -
Wishare D题
题目:教练评估了每一个人的能力值,现在想要将队伍分成两组进行对抗。一个队的能力值为该队所有人能力值之和。教练希望两队的能力值尽可能接近,但是不知道如何分组。教练希望你能够帮助他解决这个问题。 输入: 一个整数n,表示有n个人。 2 <= n <= 32 a1,a2...an表示每个人能力值。1 <= ai <= 10^12 输出: 当两队能力值最接近时,两队能力值...原创 2019-05-01 19:23:55 · 342 阅读 · 0 评论 -
hdu6287(思维)
#include<cstdio> #include<iostream> #include<cstring> #include<algorithm> #include<vector> #include<cmath> using namespace std; const int maxn = 1e5 + 10; i...原创 2019-05-20 10:49:59 · 182 阅读 · 0 评论 -
PAT 基础编程题目集7-17
7-17 爬动的蠕虫(15 分) 一条蠕虫长1寸,在一口深为N寸的井的底部。已知蠕虫每1分钟可以向上爬U寸,但必须休息1分钟才能接着往上爬。在休息的过程中,蠕虫又下滑了D寸。就这样,上爬和下滑重复进行。请问,蠕虫需要多长时间才能爬出井? 这里要求不足1分钟按1分钟计,并且假定只要在某次上爬过程中蠕虫的头部到达了井的顶部,那么蠕虫就完成任务了。初始时,蠕虫是趴在井底的(即高度为0)。 输...原创 2018-04-05 16:04:52 · 348 阅读 · 1 评论