会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
acmloser
博客园
首页
新随笔
联系
订阅
管理
上一页
1
···
8
9
10
11
12
13
14
15
16
···
75
下一页
2021年7月24日
Mafia CodeForces - 348A
摘要: 原题链接 考察:思维 思路: 设和为$sum$,每次减少$n-1$,最多进行$\frac{sum+n-2}$次.但是存在$a[i]$彼此相差悬殊的情况.此时答案为$max(a[i])$. ##Code #include <iostream> #include <cstring> using name
阅读全文
posted @ 2021-07-24 00:10 acmloser
阅读(47)
评论(0)
推荐(0)
2021年7月23日
Barcode CodeForces - 225C
摘要: 原题链接 考察:线性dp 思路: 想到了但三重循环以为会超时,实际是只有$j=1$时才有三重循环. ##Code #include <iostream> #include <cstring> using namespace std; const int N = 1010; int n,m,x,y,c
阅读全文
posted @ 2021-07-23 13:07 acmloser
阅读(56)
评论(0)
推荐(0)
Division into Teams CodeForces - 149C
摘要: 原题链接 思路: 结论题,排序奇偶分组,均分,没想出怎么证明 ##Code #include <iostream> #include <cstring> #include <algorithm> using namespace std; const int N = 100010; int n,sum
阅读全文
posted @ 2021-07-23 11:00 acmloser
阅读(25)
评论(0)
推荐(0)
Escape from Stones CodeForces - 264A
摘要: 原题链接 考察:思维 or 搜索 错误思路: 二分模拟,精度爆炸 正确思路一: 搜索....我是fw 正确思路二: 双指针设置$l = 1,r = n$,如果$s[i]==l$,说明右边不会在有人,$s[i]==r$左边不会在有人. ##Code #include <iostream> #inclu
阅读全文
posted @ 2021-07-23 09:44 acmloser
阅读(34)
评论(0)
推荐(0)
A Retribution!
摘要: 原题链接 考察:贪心 思路: 死于读不懂题,对于每个仓库,求裁判到它的距离,排序,两类仓库分开求,因为题目是这么说的 ##Code #include <iostream> #include <cstring> #include <cmath> #include <queue> using names
阅读全文
posted @ 2021-07-23 01:10 acmloser
阅读(51)
评论(0)
推荐(0)
2021年7月22日
Ladder CodeForces - 279C
摘要: 原题链接 考察:思维 思路: 类似RMQ的思想,对于每个点求往左,往右不减最远能到达处.求是否和会大于区间长度. ##Code #include <iostream> #include <cstring> using namespace std; const int N = 100010; int
阅读全文
posted @ 2021-07-22 11:59 acmloser
阅读(38)
评论(0)
推荐(0)
Mashmokh and Numbers CodeForces - 414A
摘要: 原题链接 考察:构造 思路: 很容易想到先构造$gcd(a,b) = 1$的两个数,最后两个位置构造剩余的$k$.剩余$k$最大到$k-\frac {105}{2}+1$.构造$k,k*2$不会超过$109$,剩下的1到质数里成对构造.最多需要$2*105$个质数,需要开到$107$ ##Code
阅读全文
posted @ 2021-07-22 10:05 acmloser
阅读(44)
评论(0)
推荐(0)
2021年7月21日
Pashmak and Buses CodeForces - 459C
摘要: 原题链接 考察:思维 思路: 制造$n$个$d$位互不相同的数字,$dfs$即可 ##Code #include <iostream> #include <cstring> #include <vector> using namespace std; typedef long long LL; co
阅读全文
posted @ 2021-07-21 08:34 acmloser
阅读(46)
评论(0)
推荐(0)
2021年7月20日
Gone Fishing
摘要: 原题链接 考察:计算几何 思路: 已知两点和半径可以确定一个圆,最优解的圆一定可以偏移直到相交于两点.至于怎么求圆心看 GO 求正反两遍,求不用讨论谁上下问题. ##Code #include <iostream> #include <cstring> #include <cmath> using
阅读全文
posted @ 2021-07-20 21:10 acmloser
阅读(56)
评论(0)
推荐(0)
Hang Gliding
摘要: 原题链接 错误思路: 枚举每一个人,优先队列贪心求最小的不重合区间组数. 思路: 实际上贪心不一定能贪到正解,这里类似背包需要枚举所有可能.背包体积是时间: $$f[i] = f[i-1],f[node[pos].l]+w $$ 需要按区间右端点排序. ##Code #include <iostre
阅读全文
posted @ 2021-07-20 19:31 acmloser
阅读(114)
评论(0)
推荐(0)
上一页
1
···
8
9
10
11
12
13
14
15
16
···
75
下一页
公告