
hdoj
久石_giao
今天是个好日子!!!
展开
-
HDOJ 1017-A Mathematical Curiosity
A Mathematical CuriosityTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 41332 Accepted Submission(s): 13290Problem DescriptionGiven two inte原创 2017-07-22 20:11:30 · 267 阅读 · 0 评论 -
hdoj 1004 Let the Balloon Rise(map)
Let the Balloon Rise(链接)Sample Input5greenredblueredred3pinkorangepink0 Sample Outputredpink 输出出现次数最多的颜色 用map存一下就好了#include#include#include#inclu原创 2017-11-19 21:10:05 · 239 阅读 · 0 评论 -
1305 Immediate Decodability(字典树)
Immediate Decodability(链接)Sample Input0110001000009011001000009 Sample OutputSet 1 is immediately decodableSet 2 is not immediately decodable//模板题#include#incl原创 2017-11-21 21:39:31 · 213 阅读 · 0 评论 -
hdoj 1002 A + B Problem II(大数加法)
1002 A + B Problem II可用作大数加法模板#includeusing namespace std;const int maxn = 1050;char a[maxn],b[maxn],c[maxn];void ADD(char *str1,char *str2,char *str3){ int i,j,i1,i2,tmp,carry; //c原创 2017-11-16 18:10:56 · 188 阅读 · 0 评论 -
hdoj 1251 统计难题(字典树)
统计难题(链接)Input输入数据的第一部分是一张单词表,每行一个单词,单词的长度不超过10,它们代表的是老师交给Ignatius统计的单词,一个空行代表单词表的结束.第二部分是一连串的提问,每行一个提问,每个提问都是一个字符串.注意:本题只有一组测试数据,处理到文件结束. Output对于每个提问,给出以该字符串为前缀的单词的数量.原创 2017-11-21 22:47:34 · 191 阅读 · 0 评论 -
hdoj 4709 Herding
Herding(链接)Sample Input14-1.00 0.000.00 -3.002.00 0.002.00 2.00 Sample Output2.00 题意:求给出的n个点可以构成最小的三角形面积#include#include#include#includeusing namespa原创 2017-12-09 20:50:04 · 163 阅读 · 0 评论 -
hdoj 2036 改革春风吹满地
改革春风吹满地(链接)Input输入数据包含多个测试实例,每个测试实例占一行,每行的开始是一个整数n(3输入数据中所有的整数都在32位整数范围内,n=0表示数据的结束,不做处理。 Output对于每个测试实例,请输出对应的多边形面积,结果精确到小数点后一位小数。每个实例的输出占一行。 Sample Input原创 2017-12-09 21:43:28 · 289 阅读 · 0 评论 -
hdoj 1570 A C
A C(链接)Problem DescriptionAre you excited when you see the title "AC" ? If the answer is YES , AC it ;You must learn these two combination formulas in the school . If you have forgotten原创 2017-12-02 16:23:32 · 216 阅读 · 0 评论 -
hdoj 2570 迷瘴
迷瘴Problem Description通过悬崖的yifenfei,又面临着幽谷的考验——幽谷周围瘴气弥漫,静的可怕,隐约可见地上堆满了骷髅。由于此处长年不见天日,导致空气中布满了毒素,一旦吸入体内,便会全身溃烂而死。幸好yifenfei早有防备,提前备好了解药材料(各种浓度的万能药水)。现在只需按照配置成不同比例的浓度。现已知yifenfei随身携带有n种浓度的原创 2017-12-02 16:32:21 · 200 阅读 · 0 评论 -
hdoj 1014 Uniform Generator
Uniform Generator(链接)Sample Input3 515 2063923 99999 Sample Output 3 5 Good Choice 15 20 Bad Choice 63923 99999 Good Choi原创 2017-12-06 20:03:53 · 173 阅读 · 0 评论 -
hdoj 1022 Train Problem I
Train Problem IProblem DescriptionAs the new term comes, the Ignatius Train Station is very busy nowadays. A lot of student want to get back to school by train(because the trains in the Ignatius Train...原创 2018-04-07 21:01:50 · 123 阅读 · 0 评论 -
hdoj 2099 整除的尾数
整除的尾数Problem Description一个整数,只知道前几位,不知道末二位,被另一个整数除尽了,那么该数的末二位该是什么呢? Input输入数据有若干组,每组数据包含二个整数a,b(0 Output对应每组数据,将满足条件的所有尾数在一行内输出,格式见样本输出。同组数据的输出,其每个尾数之间空一格,行末没原创 2018-04-03 18:11:29 · 222 阅读 · 0 评论 -
hdoj 2098 分拆素数和
分拆素数和Problem Description把一个偶数拆成两个不同素数的和,有几种拆法呢? Input输入包含一些正的偶数,其值不会超过10000,个数不会超过500,若遇0,则结束。 Output对应每个偶数,输出其拆成不同素数的个数,每个结果占一行。 Sample Input30260原创 2018-04-03 18:49:14 · 349 阅读 · 0 评论 -
hdoj 1124 Factorial
Factorial题目含义:计算N!末尾有多少个 0。Sample Input63601001024234568735373 Sample Output0142425358612183837末尾为零必定是2*5=10,且2的因子数必定大于5的因字数。算术基本定理中n!的素因子分解中的素数p的幂为[n/p]+[n/p²]+[n/p³]+……#include<cstdio&...原创 2018-04-04 17:18:06 · 170 阅读 · 0 评论 -
hdoj 1727 Hastiness
Hastiness(链接)模拟#include#includeusing namespace std;char one[20][10]={"zero","one","two","three","four","five","six","seven","eight","nine","ten"};char two[20][10]={"eleven","twelve","thirteen原创 2017-11-19 20:35:32 · 166 阅读 · 0 评论 -
hdoj 1719 Friend(公式)
Friend(链接)Problem DescriptionFriend number are defined recursively as follows.(1) numbers 1 and 2 are friend number;(2) if a and b are friend numbers, so is ab+a+b;(3) only the numbers原创 2017-11-19 20:24:22 · 164 阅读 · 0 评论 -
hdoj 1017-A Mathematical Curiosity
A Mathematical CuriosityTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 41332 Accepted Submission(s): 13290Problem DescriptionGiven two integ原创 2017-06-08 20:54:03 · 281 阅读 · 0 评论 -
hdoj 1065 水水
报考杭州电子科技大学! I Think I Need a HouseboatTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 13214 Accepted Submission(s): 3751原创 2017-06-20 20:21:06 · 336 阅读 · 0 评论 -
hdoj 1010 Tempter of the Bone
Tempter of the BoneProblem DescriptionThe doggie found a bone in an ancient maze, which fascinated him a lot. However, when he picked it up, the maze began to shake, and the doggie could feel the groun原创 2017-07-22 20:28:43 · 242 阅读 · 0 评论 -
hdoj 1072 Nightmare 广搜
Nightmare(链接)#include#include#include#includeusing namespace std;int t,n,m;int mat[10][10];int dir[4][2]={0,1,0,-1,1,0,-1,0};struct Node{ int x,y,ans,time;}s,t1,t2;void bfs() //广搜原创 2017-07-23 10:09:55 · 202 阅读 · 0 评论 -
hdoj 1180 诡异的楼梯 bfs bfs bfs
诡异的楼梯(题目链接)#include#include#include#include#includeusing namespace std;char mat[25][25]; //地图int qq[20][20]; //标记int n,m,ans=9999;bool flag;int dir[4][2]={0,1,0,-1,1,0,-1,0};struct原创 2017-07-23 17:26:34 · 241 阅读 · 0 评论 -
6033 Add More Zero
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=6033 计算2m−1的位数可以看成m位的2进制换成10进制的位数#includeusing namespace std;int main(){ int m,i=0; while(scanf("%d",&m)!=EOF) { int原创 2017-08-26 19:16:46 · 223 阅读 · 0 评论 -
hdoj 3535 AreYouBusy(混合背包)
AreYouBusyTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 4572 Accepted Submission(s): 1862Problem DescriptionHappy New Term!原创 2017-11-13 19:50:48 · 303 阅读 · 0 评论 -
hdoj 3449 Consumer(有依赖的背包)
Consumer题意: 给你一些物品,每个物品有自己的花费和价值,每个物品 都有相对应的箱子, 如果你想要买这个物品,你就需要先买这个箱子(依赖), 第一行先输入一个n 和t 代表 有几组物品 和你有多少钱(如果你要买该组物品,不管几个, 你都必须先买该组对应的箱子)求 n个箱子花费 t 能获得的最大价值Sample Input3 800300原创 2017-11-19 18:38:54 · 184 阅读 · 0 评论 -
hdoj 2391 Filthy Rich(dp)不是搜素
Filthy Rich(链接)Sample Input13 41 10 8 80 0 1 80 27 0 4 Sample OutputScenario #1:42 注意要求:每组测试数据后输出一个空行#include#include#includeusing namespace std;const int max原创 2017-11-19 18:45:54 · 209 阅读 · 0 评论 -
hdoj 2844 Coins(多重背包)
Coins(链接)Sample Input3 101 2 4 2 1 12 51 4 2 10 0 Sample Output84把第i种物品换成Mi件01背包中的物品,则得到了物品数为ΣMi的01背包问题。我们可以通过二进制的拆分方法对其优化。对每i件物品,拆分的策略为:新拆分的物品的重量等于1件,2件原创 2017-11-19 18:58:43 · 264 阅读 · 0 评论 -
hdoj 2639 Bone Collector II (01背包的第k优解)
Bone Collector II(链接)Sample Input35 10 21 2 3 4 55 4 3 2 15 10 121 2 3 4 55 4 3 2 15 10 161 2 3 4 55 4 3 2 1 Sample Output1220 求第k优解#includeusing names原创 2017-11-19 19:33:28 · 165 阅读 · 0 评论 -
hdoj 3763 CD(二分查找)
CD(链接)Sample Input3 31231240 0 Sample Output2二分查找 0.0.....int seach(int k){ int left=0,right=n2-1; int j; while(left<=right) { j=(left+r原创 2017-11-19 19:41:26 · 258 阅读 · 0 评论 -
hdoj 1715 大菲波数
大菲波数(链接)Problem DescriptionFibonacci数列,定义如下:f(1)=f(2)=1f(n)=f(n-1)+f(n-2) n>=3。计算第n项Fibonacci数值。 Input输入第一行为一个整数N,接下来N行为整数Pi(1 Output输出为N行,每行为对应的f(Pi)。原创 2017-11-19 19:45:18 · 154 阅读 · 0 评论 -
hdoj 1113 Word Amalgamation(字符串匹配)
Word AmalgamationProblem DescriptionIn millions of newspapers across the United States there is a word game called Jumble. The object of this game is to solve a riddle, but in order to find the letter...原创 2018-04-13 10:58:57 · 259 阅读 · 0 评论