![](https://img-blog.csdnimg.cn/20201014180756754.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
ACM
curiosity9
这个作者很懒,什么都没留下…
展开
-
L1-027 出租
链接:https://pintia.cn/problem-sets/994805046380707840/problems/994805107638517760 一时间网上一片求救声,急问这个怎么破。其实这段代码很简单,index数组就是arr数组的下标,index[0]=2 对应 arr[2]=1,index[1]=0 对应 arr[0]=8,index[2]=3 对应 arr[3]=0,以此类...原创 2019-03-06 20:25:51 · 108 阅读 · 0 评论 -
L1-030 一帮一
链接:https://pintia.cn/problem-sets/994805046380707840/problems/994805103557459968 “一帮一学习小组”是中小学中常见的学习组织方式,老师把学习成绩靠前的学生跟学习成绩靠后的学生排在一组。本题就请你编写程序帮助老师自动完成这个分配工作,即在得到全班学生的排名后,在当前尚未分组的学生中,将名次最靠前的学生与名次最靠后的异性学...原创 2019-03-06 21:11:17 · 118 阅读 · 0 评论 -
L1-025 正整数A+B
题的目标很简单,就是求两个正整数A和B的和,其中A和B都在区间[1,1000]。稍微有点麻烦的是,输入并不保证是两个正整数。 输入格式: 输入在一行给出A和B,其间以空格分开。问题是A和B不一定是满足要求的正整数,有时候可能是超出范围的数字、负数、带小数点的实数、甚至是一堆乱码。 注意:我们把输入中出现的第1个空格认为是A和B的分隔。题目保证至少存在一个空格,并且B不是一个空字符串。 输出格式: ...原创 2019-03-06 21:24:26 · 102 阅读 · 0 评论 -
买菜
http://118.190.20.162/view.page?gpid=T78 试题名称: 买菜 时间限制: 1.0s 内存限制: 256.0MB 问题描述: 问题描述 小H和小W来到了一条街上,两人分开买菜,他们买菜的过程可以描述为,去店里买一些菜然后去旁边的一个广场把菜装上车,两人都要买n种菜,所以也都要装n次车。具体的,对于小H来说有n个不相交的时间段[a1,b1],[a2,b2]…[an...原创 2019-03-15 21:15:52 · 116 阅读 · 0 评论 -
CCF201812-2 小明放学
问题描述 试题编号: 201812-2 试题名称: 小明放学 时间限制: 1.0s 内存限制: 512.0MB 问题描述: 题目背景 汉东省政法大学附属中学所在的光明区最近实施了名为“智慧光明”的智慧城市项目。具体到交通领域,通过“智慧光明”终端,可以看到光明区所有红绿灯此时此刻的状态。小明的学校也安装了“智慧光明”终端,小明想利用这个终端给出的信息,估算自己放学回到家的时间。 问题描述 一次放学...原创 2019-03-13 20:16:08 · 102 阅读 · 0 评论 -
102021E Expired License
https://vjudge.net/problem/Gym-102021E 输出两个最小质数,他们的比与给出的两个小数的比相等。变成整数除最大公倍数,先判断相等,在判断质数(注意1不是质数)。 1 用字符串输入(高精度也行) 2 两个数相等输出 2 2 3 不能为1 #include <iostream> #include <algorithm> #include <...原创 2019-04-03 23:53:58 · 662 阅读 · 0 评论 -
102021F Fighting Monsters
http://codeforces.com/gym/102021/attachments 找出n个数里面有没有相邻的斐波那契数,难看懂 #include <iostream> #include <algorithm> #include <bits/stdc++.h> using namespace std; int zu[100005]; int main() ...原创 2019-04-03 23:58:09 · 302 阅读 · 0 评论 -
102021L Logic Puzzle
http://codeforces.com/gym/102021/attachments 扫雷游戏,从左上顶点开始:一个点a[i][j]=1,那么a[i+1][j+1]一定是雷,然后把周围9个点都-1; 最后遍历一遍,全是0就输出雷的排列,否则输出impossible #include <iostream> #include <bits/stdc++.h> using na...原创 2019-04-04 00:02:58 · 247 阅读 · 1 评论 -
Gym - 100541A
链接:http://codeforces.com/gym/100541/problem/A An expert in deep learning has developed a new method for stock market forecasting. According to his method, the forecasted stock prices of VAIP for the n...原创 2019-03-08 20:45:52 · 95 阅读 · 0 评论 -
HDU - 5477
链接:https://vjudge.net/problem/248423/origin Master Di plans to take his girlfriend for a travel by bike. Their journey, which can be seen as a line segment of length L, is a road of swamps and flats. ...原创 2018-11-27 23:38:33 · 126 阅读 · 0 评论 -
Unimodal Array(很多if)
如果数组满足以下三个条件,则这个数组是有趣的: 它刚开始是严格递增的 之后是不变的 再之后它是严格递减的 但除了第二个条件,其他两个条件(递增和递减)不存在的数组也可以是有趣的。 例如,以下三个数组是有趣的: [5, 7, 11, 11, 2, 1], [4, 4, 2], [7], 但以下三个却不是有趣的: [5, 5, 6, 6, 1], [1, 2, 1, 2], [4, 5, 5, 6]....原创 2018-10-13 11:42:33 · 135 阅读 · 1 评论 -
CodeForces - 1058B
题目挺简单的,看成简单的线性规划,长方形的外围就是直线方程的左边或者右边,a+b-d<0就是直线x-y+常数<0. http://codeforces.com/problemset/problem/1058/B #include <iostream> #include <cstdio> using namespace std; int main() { ...转载 2018-10-17 17:09:45 · 319 阅读 · 0 评论 -
HDU-1019
没什么多说的 链接:http://acm.hdu.edu.cn/showproblem.php?pid=1019 #include <iostream> #include <cstdio> #include <cstring> #include <algorithm> using namespace std; long long int hcf(lo...原创 2018-10-22 21:05:57 · 180 阅读 · 0 评论 -
Oh Those Palindromes
https://vjudge.net/problem/CodeForces-1064C 这是一个让我窒息的题目 窒息 窒息 窒息 #include <iostream> #include <algorithm> using namespace std; char shu[100005]; int main() { int a; while(cin>&g...原创 2018-10-23 23:07:23 · 192 阅读 · 0 评论 -
HDU - 6213
链接:http://acm.hdu.edu.cn/showproblem.php?pid=6213 #include <iostream> #include <cstring> #include <cstdio> #include <map> using namespace std; map<string,int>mp; void mir...原创 2018-11-14 17:50:45 · 105 阅读 · 0 评论 -
HDU - 6216
链接:http://acm.hdu.edu.cn/showproblem.php?pid=6216 找清楚其中关系,发现只有素数=(i+1)(i+1)(i+1)-iii 才行 #include <iostream> #include <cstdio> #include <cmath> #include <algorithm> using namesp...原创 2018-11-14 17:54:55 · 130 阅读 · 0 评论 -
HDU - 5873
链接:http://acm.hdu.edu.cn/showproblem.php?pid=5873 1.题目意思就是判断符不符合条件:总分n(n-1),最高分2(n-1)且一个,最低分0且一个,还有就是不能有最高分和最高分减一同时出现。比如5个队 8 7 3 1 1 答案应该是F,下面的也确实是F,但是不考虑这种情况也能够Accepted(我试过,应该是数据太水了吧) 2.另外T也要多组输入,导致...原创 2018-11-21 17:04:06 · 178 阅读 · 0 评论 -
HDU - 6213
*链接:*http://acm.hdu.edu.cn/showproblem.php?pid=6213 不难,熟悉map用法就好,不会的去看看别的博客,都多都讲的挺详细。 #include <iostream> #include <cstring> #include <cstdio> #include <map> using namespace st...原创 2018-11-21 17:07:19 · 102 阅读 · 0 评论 -
B - Sorting It All OutPOJ - 1094
An ascending sorted sequence of distinct values is one in which some form of a less-than operator is used to order the elements from smallest to largest. For example, the sorted sequence A, B, C, D im...原创 2019-04-16 22:33:01 · 118 阅读 · 0 评论