码迷,mamicode.com
首页 >  
搜索关键字:hdu 5273 dylans love    ( 32388个结果
HDU 2158 最短区间版大家来找碴(尺取)
题目链接 #解题思路 题面差不多已经用的算法写到脸上了,不过有个问题就是怎么判断枚举的区间符合条件,如果直接暴力的话复杂度就要乘上q,但是如果用一个变量来计数的话,就能让时间复杂度降下来。 #代码 const int maxn = 1e5+10; int n,m,a[maxn],cnt[maxn]; ...
分类:其他好文   时间:2020-07-21 13:37:33    阅读次数:60
while(~scanf("%d", &n)) 和 while(scanf("%d", &n), n) 有啥不同
额............我也不知道(先记下) printf("%d\n", (scanf("%d", &n), n)) printf("%d\n", (~scanf("%d", &n))); 打印结果都相同........ 测试题目连接:http://acm.hdu.edu.cn/showprob ...
分类:其他好文   时间:2020-07-21 10:04:39    阅读次数:80
python字符串的常用方法。
本文收录python字符串的常用方法 str1 = " hello world,i love you " print(str1) print(str1.strip()) # strip()删除开头和结尾的空白。 print(str1.split()) # split()拆分,使分割。默认是以空格进行 ...
分类:编程语言   时间:2020-07-21 01:09:15    阅读次数:87
hdu6725(树形dp,区间选值,点权差最大)
题:http://acm.hdu.edu.cn/showproblem.php?pid=6725 分析:给节点选值肯定是选边界值。假设由节点是选中间值,那么肯定有比它选值更好的值,所以把选的可能定为2个。 #include<bits/stdc++.h> using namespace std; #d ...
分类:其他好文   时间:2020-07-20 00:01:14    阅读次数:96
Operation Love
C. Operation Love 先判断给定点是顺时针还是逆时针,然后再判断长度为6的边是在长度为9的边的左边还是右边即可 // Created by CAD #include <bits/stdc++.h> using namespace std; bool judge(vector<doubl ...
分类:其他好文   时间:2020-07-19 11:31:44    阅读次数:76
hdu 4283You Are the One
The TV shows such as You Are the One has been very popular. In order to meet the need of boys who are still single, TJUT hold the show itself. The sho ...
分类:其他好文   时间:2020-07-18 00:42:55    阅读次数:89
HDU-3553 Just a String (二分 + 后缀数组)
题意:找出文本串中字典序第 k 大的字符串 思路: 首先我们不能仅仅按后缀数组排完序后每个字符串的大小来找,因为重复字符也参与排名,比如 AAB 2, 结果是 A 而不是 AA。 注:以下第 i 个后缀均指排完序后第 i 小的后缀。 所以我们二分找第 k 大的字符串位于哪个区间,假定我们现在确定目标 ...
分类:编程语言   时间:2020-07-17 22:05:37    阅读次数:71
HDU - 6581 Vacation (贪心+思维+物理)
Tom and Jerry are going on a vacation. They are now driving on a one-way road and several cars are in front of them. To be more specific, there are nn ...
分类:其他好文   时间:2020-07-17 09:30:42    阅读次数:82
HDU 2612 Find a way
Pass a year learning in Hangzhou, yifenfei arrival hometown Ningbo at finally. Leave Ningbo one year, yifenfei have many people to meet. Especially a ...
分类:其他好文   时间:2020-07-17 01:14:23    阅读次数:90
HDU - 4027(线段树+剪枝)
一个数最多能取8-9次根号。 #include <bits/stdc++.h> using namespace std; #define debug printf("bug!!!\n"); typedef long long ll; const int MAXN=1e5+10; const ll M ...
分类:其他好文   时间:2020-07-16 10:11:53    阅读次数:74
32388条   上一页 1 ... 13 14 15 16 17 ... 3239 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!