
随笔
i-Curve
优雅的运用技术
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
codeforces1000b csdn-博客
Recently, you bought a brand new smart lamp with programming features. At first, you set up a schedule to the lamp. Every day it will turn power on at moment 00 and turn power off at moment MM. Moreov...原创 2018-07-02 11:32:31 · 522 阅读 · 0 评论 -
A - 度度熊拼三角 HDU - 6374
度度熊有 N 根木棒,每根木棒的长度为ai。 现在要挑选其中的三根,问能拼出的三角形的最大周长是多少。 如果不能拼成任何一个三角形,输出 −1。 Input 多组数据(不超过10组),读到EOF结束。 对于每一组数据: 第一行一个数 N 表示木棒数量。 第二行一共 N 个数,描述每一根木棒的长度。 1≤N≤1000 木棒长度都是不超过100000的正整数 Output 对于每一组数据,输出一个数表...原创 2018-10-07 19:39:59 · 474 阅读 · 0 评论 -
爱因斯坦的思考题-csdn博客
这个问题是我偶然间在博客首页的一个推销课程的博客中知道的这个问题。看完后发现思考着很有趣。于是我思考并学习后在这里给大家分享一下,并且从我们人的角度和计算机求解的角度探讨一下求答案的过程。 题目如下: 据说有五个不同颜色的房间排成一排,每个房间里分别住着一个不同国籍的人,每个人都喝一种特定品牌的饮料,抽一种特定品牌的烟,养一种宠物,没有任意两个人抽相同品牌的香烟,或喝相同品牌的饮料,或养相同...原创 2018-08-18 17:47:58 · 831 阅读 · 0 评论 -
B - 度度熊学队列 HDU - 6375
度度熊正在学习双端队列,他对其翻转和合并产生了很大的兴趣。 初始时有 N 个空的双端队列(编号为 1 到 N ),你要支持度度熊的 Q 次操作。 ①1 u w val 在编号为 u 的队列里加入一个权值为 val 的元素。(w=0 表示加在最前面,w=1 表示加在最后面)。 ②2 u w 询问编号为 u 的队列里的某个元素并删除它。( w=0 表示询问并操作最前面的元素,w=1 表示最后面) ③3...原创 2018-10-07 21:47:59 · 302 阅读 · 0 评论 -
F - God of Gamblers西安区域赛
When I was young, my father is a senior gaming enthusiast. One day, we saw a old man in the street . He had a dice and played with other people . Every turn the gambler gives k RMB to the old man and ...原创 2018-10-18 21:06:27 · 921 阅读 · 0 评论 -
B - Relatively Prime Graph -CodeForces - 1009D-csdn博客
Let’s call an undirected graph G=(V,E)relatively prime if and only if for each edge (v,u)∈E GCD(v,u)=1 (the greatest common divisor of v and u is 1). If there is no edge between some pair of vertices...原创 2018-07-23 13:23:21 · 167 阅读 · 0 评论 -
B - Carries SCU - 4437
Carries frog has n integers a1,a2,…,an, and she wants to add them pairwise. Unfortunately, frog is somehow afraid of carries (进位). She defines hardness h(x,y) for adding x and y the number of carries ...原创 2018-09-27 23:28:50 · 314 阅读 · 0 评论 -
Codeforces Round #533 (Div. 2)A. Salem and Sticks
题目链接 题意:给你n(1<=n<=10001<=n<=10001<=n<=1000)个数 aia_iai(1<=ai<=100)1<=a_i<原创 2019-01-21 19:33:34 · 375 阅读 · 0 评论 -
Codeforces Round #533 (Div. 2)B. Zuhair and Strings
题目链接 题意:第一行给你两个整数n和k(1≤k≤n≤2⋅105)(1≤k≤n≤2⋅10^5)(1≤k≤n≤2⋅105),n代表第二行给你的字符串(均小写)长度,在这个字符串内找长度为k的连续字符,求一共能够找多少个,并且每个字母最多只能属于一个 样例: //input 输入的数据 8 2 aaacaabb //output 输出的数据 2 //易知,找到的两个为前两个aa和c与b之间的a...原创 2019-01-21 19:51:18 · 501 阅读 · 0 评论