![](https://img-blog.csdnimg.cn/20201014180756757.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
ACM寒假欢乐赛
Qota
这个作者很懒,什么都没留下…
展开
-
搬寝室HDU - 1421
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1421 题目大意: 搬寝室是很累的,xhd深有体会.时间追述2006年7月9号,那天xhd迫于无奈要从27号楼搬到3号楼,因为10号要封楼了.看着寝室里的n件物品,xhd开始发呆,因为n是一个小于2000的整数,实在是太多了,于是xhd决定随便搬2k件过去就行了. 但还是会很累,因为2k也不小是一个不大...原创 2020-01-14 09:50:23 · 179 阅读 · 1 评论 -
CodeForces - 622A A. Infinite Sequence(简单思路题)
题目链接:https://codeforces.com/problemset/problem/622/A 题目大意:有个数列: *1. 1,2. 1,2,3. 1,2,3,4. ... 求第n个位置的数为多少 //因为题目是一个接一个的等差数列 先求出n所在的小数列中的最大值k 然后求除了k所在序列 //之前的所有数列的项数之和 因为这个数列从1开始所以直接用n-k*(k-1)/2得出结果 ...原创 2020-01-14 09:03:15 · 150 阅读 · 0 评论 -
二分例题Aggressive cows POJ - 2456
题目链接:https://vjudge.net/contest/350953#problem/D 题目大意:有 个地方,有 头牛,一头牛只能分配一个地方,问如何分配使得所有牛之间的距离最小的那个值最 大,是多少? 思路:先对隔间进行排序,然后找r和l #include <cstdio> #include <algorithm> using namespace std; c...原创 2020-01-13 15:48:45 · 153 阅读 · 0 评论 -
思路题 A. Distinct Digits
题目链接:http://codeforces.com/problemset/problem/1228/A You have two integers l and r. Find an integer x which satisfies the conditions below: l≤x≤r . All digits of x are different. If there are mu...原创 2020-01-13 17:49:54 · 516 阅读 · 0 评论