摘要: Piotr's AntsTime Limit: 2 seconds Kent Brockman Piotr likes playing with ants. He has n of them on a horizontal poleL cm long. Each ant is facing eith 阅读全文
posted @ 2017-09-19 17:39 #Egoist# 阅读(209) 评论(0) 推荐(0) 编辑
摘要: 不能颓了,好好学习,天天向上Orz! emmmmm,总感觉……好神奇啊,自己写了好长的代码还WA了,“真”代码果然够简介, 虽然大佬眼中的水题我也想不到……见得多了说不定会想到2333333 //QAQ神奇啊,把原来的雕塑先看为长度为n的数轴,再把n映射到m+n的数轴上//然后就直接找当前坐标最近的 阅读全文
posted @ 2017-09-18 20:30 #Egoist# 阅读(133) 评论(0) 推荐(0) 编辑
摘要: 啊啊啊啊……颓了好久了……然而……果然还是只能做一做div2的ab,b做起来都困难啊orz○| ̄|_ 题目链接:http://codeforces.com/contest/798/problem/B 唉,这个题写了好久啊,实现起来巨麻烦,看了看大佬的代码发现,同样都是暴力的想法,大佬的代码要简洁的多 阅读全文
posted @ 2017-09-10 14:45 #Egoist# 阅读(105) 评论(0) 推荐(0) 编辑
摘要: 原点,(x,y)形成的矩形内的坐标之和为x*(x+1)/2*(y+1)+y*(y+1)/2*(x+1); 阅读全文
posted @ 2017-09-06 14:11 #Egoist# 阅读(170) 评论(0) 推荐(0) 编辑
摘要: https://www.51nod.com/onlineJudge/questionCode.html#!problemId=1103 No solution的情况是不存在的,如果n个数中存在8的倍数,那么直接输出这个数就好了,如果不存在,n个数对n取余,因为不存在余数为0,所以共n-1种余数,n个 阅读全文
posted @ 2017-08-28 17:55 #Egoist# 阅读(157) 评论(0) 推荐(0) 编辑
摘要: 835D:http://codeforces.com/problemset/problem/835/D emmmm不太会,附大佬代码 阅读全文
posted @ 2017-08-28 16:41 #Egoist# 阅读(130) 评论(0) 推荐(0) 编辑
摘要: 839C:http://codeforces.com/problemset/problem/835/C 题意:给出星星的个数,最大亮度(每时间+1,亮度+1,但不超过最大亮度),观测者观测的次数及时刻, 求观测时刻矩形内星星的亮度和。 这里要用到一个三维数组,一维记录时间,另外两维记录时间t时坐标( 阅读全文
posted @ 2017-08-28 14:23 #Egoist# 阅读(161) 评论(0) 推荐(0) 编辑
摘要: 51NOD 1277:http://www.51nod.com/onlineJudge/questionCode.html#!problemId=1277 跟HDU 6153还挺像的:http://www.cnblogs.com/Egoist-/p/7435573.html 相比与上面那个题,这个还 阅读全文
posted @ 2017-08-26 16:58 #Egoist# 阅读(386) 评论(0) 推荐(1) 编辑
摘要: HDU6153:http://acm.hdu.edu.cn/showproblem.php?pid=6153 Orz 果然字符串很神奇……(神奇到人哭出来啊TAT)果然算法理解的不够透彻的话,是无法灵活运用的QAQ 其实只要简单的改一点点KMP的地方…… KMP的next[i]存储的是模式串下标0至 阅读全文
posted @ 2017-08-26 16:04 #Egoist# 阅读(784) 评论(2) 推荐(2) 编辑
摘要: HDU1251:http://acm.hdu.edu.cn/showproblem.php?pid=1251 初学字典树,码模板…… HDU 2846 http://acm.hdu.edu.cn/showproblem.php?pid=2846 字典树原本是按前缀搜索的,题中所要求查询的并不一定是字 阅读全文
posted @ 2017-08-25 18:53 #Egoist# 阅读(229) 评论(0) 推荐(0) 编辑