码迷,mamicode.com
首页 >  
搜索关键字:hdoj    ( 2498个结果
HDOJ 1061 Rightmost Digit
找出数学规律原题:Rightmost DigitTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 6515Accepted Submission(s)...
分类:Web程序   时间:2015-02-03 19:03:34    阅读次数:158
【HDOJ】2319 Card Trick
水题,STL双端队列。 1 /* 2319 */ 2 #include 3 #include 4 #include 5 #include 6 #include 7 using namespace std; 8 9 int main() {10 int n, t;11 in...
分类:其他好文   时间:2015-02-03 12:58:04    阅读次数:181
HDOJ 1663 The Counting Problem 打表
先打出0~8位数,分别可以被整十/百/千/万...整除时 , 各个数字出现了几次的表 先把每要查询的数字的每一位在表里查询得到一个结果 但是这样是不全面的,考虑这样的情况: 例如2345这样的数 234* 这种情况下 4出现了5次 23**这种情况下3出现了45次 2***中2出现了345次等.....从后往前扫一遍即可 其中0的情况比较特殊,简单的扫一遍会漏掉很多可能 比如 505...
分类:其他好文   时间:2015-02-01 19:14:28    阅读次数:147
HDOJ 1106 排序
【题意】:直接求解就行。注意这个测试用例 15555555555552。 WA一次(缺少temp为0的判断): if (!strlen(temp)) continue; 【代码:AC】 #include #include #include #include #include using namespace std; #de...
分类:编程语言   时间:2015-02-01 13:32:28    阅读次数:183
HDOJ 1097 A hard puzzle
【题意】:输入a,b,数字a^b最后边的那个数字。思路:知道n个数相乘,最后一位的周期最大为4就行。 【代码】 #include #include using namespace std; int main() { int a = 0, b = 0; while (cin >> a >> b) { int t[4], temp = a%10;...
分类:其他好文   时间:2015-02-01 12:10:18    阅读次数:123
HDOJ 1045 Fire Net
题目来源:http://acm.hdu.edu.cn/showproblem.php?pid=1045 Fire Net Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 6917    Accepted Submis...
分类:Web程序   时间:2015-01-31 21:55:43    阅读次数:201
HDOJ 2059 龟兔赛跑(DP)
原题链接:http://acm.hdu.edu.cn/showproblem.php?pid=2059 龟兔赛跑 Time Limit: 1000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 12269    Accepted Submi...
分类:其他好文   时间:2015-01-31 19:26:50    阅读次数:202
HDOJ 1070 Milk
【题意】喝牛奶, 1. 每天喝200ml。 2. 最多喝5天,超过5天剩下多少也不喝了。 3. 剩下的如果小于一天喝的(200ml)就不要了。  4. 所有的牛奶都是当天产的。 5. 按照每天的价格选择最便宜的。 6. 如果价格都是最便宜的,选择大瓶(容量大)的。 【代码:WA】:考虑错了2,5,6条件。 #include #include #include #include...
分类:其他好文   时间:2015-01-31 13:04:09    阅读次数:208
HDOJ 1062 Rightmost Digit
【题意】求N^N,输出最右边的那一位。 【代码1:获得周期】 #include #include #include #include #include using namespace std; int main() { int N = 0; cin >> N; while (N--) { int mul = 1, n = 0, r =...
分类:Web程序   时间:2015-01-31 12:57:52    阅读次数:198
HDOJ 1076 An Easy Task
【题意】:输入两个数,Y和N。输出从Y(如果Y是闰年则包含Y)开始的第N个闰年。 【代码:AC】 #include #include #include #include #include using namespace std; int isLeapYear(int year) { if ((year%4 == 0 && year%100 != 0) || (year%4...
分类:其他好文   时间:2015-01-31 00:34:17    阅读次数:134
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!