码迷,mamicode.com
首页 >  
搜索关键字:hdu 1518 square    ( 32957个结果
G - How many ways??
HDU - 2157 构造矩阵,用于转移走一步的情况。 若$i$能走到$j$,则$g[j][i]=1$,否则为$0$ 然后一开始只有$A$点累计有一种走法。 所以最后计算矩阵的$k$次方,输出$g[B][A]$即可。 #include<bits/stdc++.h> using namespace s ...
分类:其他好文   时间:2020-07-21 22:30:21    阅读次数:61
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
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
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
C++ template
1 函数模板 #include <iostream> using namespace std; template <typename T> T square(T a) { return a * a; } int main(void) { cout << square<int>(3) << endl; ...
分类:编程语言   时间:2020-07-17 14:03:22    阅读次数:65
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
WEB前端第四课——HTML列表与表格
1.<ul></ul> 无序列表标签 <ul><li></li></ul> 组合标签,其他标签是不允许组合的 <li></li> 标签是一个容器,可任意容纳所有的元素 列表是自带样式属性的 常用type属性:disc 实心圆(默认)、circle 空心圆、square 小方块、none 不显示 语法 ...
分类:Web程序   时间:2020-07-17 09:16:18    阅读次数:110
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
32957条   上一页 1 ... 13 14 15 16 17 ... 3296 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!