链接: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=4516 题意: ...
分类:
其他好文 时间:
2018-09-12 01:16:09
阅读次数:
187
这是个开心的题目,因为既可以自己翻译,代码又好写ヾ(????)?" The i’th Fibonacci number f(i) is recursively de?ned in the following way: ? f(0) = 0 and f(1) = 1 ? f(i + 2) = f(i ...
分类:
其他好文 时间:
2018-09-12 01:07:37
阅读次数:
153
题目链接:https://vjudge.net/problem/UVA 11292 题目大意:有一个多头怪,需要击败。多头怪有n个头,每一个头有不同的直径,有m个勇士,每个勇士有一个能力值, 能力值大于直径就能砍掉那个头,但需要付出等同于能力值的金币,每个勇士只能砍一个头,问最少用多少金币可以杀 掉 ...
分类:
其他好文 时间:
2018-09-11 23:47:27
阅读次数:
179
https://vjudge.net/problem/UVA-11732 题意 给定n个字符串,问用strcmp函数比较这些字符串共用多少次比较。 strcmp函数的实现 分析 建trie树,把‘\0’也加进去,记录以每个节点为子树包含的单词节点。 然后dfs计数,遇到单词节点,说明可能存在相同的字 ...
分类:
其他好文 时间:
2018-09-11 16:09:39
阅读次数:
190
题意:https://nanti.jisuanke.com/t/31450 题解:题目很长的模拟,有点uva的感觉 分成四步 part1 16进制转为二进制string 用bitset的to_string() part2 parity check 校对,将处理结果pushback到另一个string ...
分类:
其他好文 时间:
2018-09-08 21:05:55
阅读次数:
205
1 #include 2 #include 3 #include 4 #include 5 #include 6 #include 7 #include 8 #include 9 #include 10 #include 11 12 using namespace std; 13 14 int ma... ...
分类:
其他好文 时间:
2018-09-07 13:56:30
阅读次数:
214
参考:https://blog.csdn.net/hoaresky1998/article/details/51351588 ...
分类:
其他好文 时间:
2018-09-06 21:00:06
阅读次数:
172
1 #include 2 #include 3 #include 4 #include 5 #include 6 #include 7 #include 8 #include 9 #include 10 #include 11 12 using namespace std; 13 14 int ha... ...
分类:
其他好文 时间:
2018-09-06 14:38:39
阅读次数:
159
"题目链接戳这里" 题目描述 You live in a village but work in another village. You decided to follow the straight path between your house (A) and the working place ...
分类:
其他好文 时间:
2018-09-06 02:47:09
阅读次数:
239
序列太简单了,每次对于后面一半进行操作,使之变成前一半就行了。 i个数需要操作的次数 f(i)=f(i/2)+1 代码如下: ...
分类:
其他好文 时间:
2018-09-06 00:04:14
阅读次数:
121