hdu-5718 Oracle(水题)】的更多相关文章

Delete Time Limit: 1 Sec  Memory Limit: 256 MB 题目连接 http://acm.hdu.edu.cn/showproblem.php?pid=5210 Description wld有n个数(a1,a2,...,an),他希望进行k次删除一个数的操作,使得最后剩下的n−k个数中有最多的不同的数,保证1≤n≤100,0≤k<n,1≤ai≤n(对于任意1≤i≤n) Input 多组数据(最多100组)对于每组数据:第一行:一个数n表示数的个数接下来一行:…
统计难题 Time Limit: 4000/2000 MS (Java/Others)    Memory Limit: 131070/65535 K (Java/Others)Total Submission(s): 36295    Accepted Submission(s): 13515 Problem Description Ignatius最近遇到一个难题,老师交给他很多单词(只有小写字母组成,不会有重复的单词出现),现在老师要他统计出以某个字符串为前缀的单词数量(单词本身也是自己的…
已知有n个单位的水,问有几种方式把这些水喝完,每天至少喝1个单位的水,而且每天喝的水的单位为整数.看上去挺复杂要跑循环,但其实上,列举几种情况之后就会发现是找规律的题了= =都是2的n-1次方,而且这题输出二进制数就行了......那就更简单了,直接输出1,然后后面跟n-1个0就行了╮(╯_╰)╭ 下面AC代码 #include<iostream> #include<cstdio> #include<cstring> #include<algorithm>…
题目: http://acm.hdu.edu.cn/showproblem.php?pid=4493 题意我都不好意思说,就是求12个数的平均数... 但是之所以发博客,显然有值得发的... 这个题最坑的地方就是结果精确到便士,也就是小数点后2位,不输出后缀0,所以需要处理一下输出格式. 一开始我是用c语言这样写的: #include <stdio.h> #include <string.h> int main() { int t; scanf("%d", &a…
GPA Time Limit: 20 Sec  Memory Limit: 256 MB 题目连接 http://acm.hdu.edu.cn/showproblem.php?pid=4802 Description In college, a student may take several courses. for each course i, he earns a certain credit (ci), and a mark ranging from A to F, which is c…
Oracle Time Limit: 8000/4000 MS (Java/Others)    Memory Limit: 262144/262144 K (Java/Others) Problem Description There is once a king and queen, rulers of an unnamed city, who have three daughters of conspicuous beauty. The youngest and most beautifu…
Tutor Time Limit: 20 Sec  Memory Limit: 256 MB 题目连接 http://acm.hdu.edu.cn/showproblem.php?pid=4493 Description Lilin was a student of Tonghua Normal University. She is studying at University of Chicago now. Besides studying, she worked as a tutor tea…
LCS Time Limit: 1 Sec Memory Limit: 256 MB 题目连接 http://acm.hdu.edu.cn/showproblem.php?pid=5495 Description 你有两个序列\{a_1,a_2,...,a_n\}{a​1​​,a​2​​,...,a​n​​}和\{b_1,b_2,...,b_n\}{b​1​​,b​2​​,...,b​n​​}. 他们都是11到nn的一个排列. 你需要找到另一个排列\{p_1,p_2,...,p_n\}{p​1​…
Time Limit:4000MS     Memory Limit:262144KB     64bit IO Format:%I64d & %I64u Description There is once a king and queen, rulers of an unnamed city, who have three daughters of conspicuous beauty. The youngest and most beautiful is Psyche, whose admi…
http://acm.hdu.edu.cn/showproblem.php?pid=4891 给出一个文本,问说有多少种理解方式. 1. $$中间的,(s1+1) * (s2+1) * ...*(sn+1), si表示连续的空格数. 2.{}中间,即 | 的个数+1. 就是模拟 #include <iostream> #include <cstring> #include <cstdio> #include <algorithm> #include <…