E-COM-NET
首页
在线工具
Layui镜像站
SUI文档
联系我们
推荐频道
Java
PHP
C++
C
C#
Python
Ruby
go语言
Scala
Servlet
Vue
MySQL
NoSQL
Redis
CSS
Oracle
SQL Server
DB2
HBase
Http
HTML5
Spring
Ajax
Jquery
JavaScript
Json
XML
NodeJs
mybatis
Hibernate
算法
设计模式
shell
数据结构
大数据
JS
消息中间件
正则表达式
Tomcat
SQL
Nginx
Shiro
Maven
Linux
HDOJ☚☚☚☚☚☚
HDOJ
2005
#include#include#include#include#include#include#includeusingnamespacestd;intmon[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};chara[110];intsum[3];boolyear(inty){if((y%4==0&&y%100!=0)||y%400==0)returnt
Galahad_LLLLLL
·
2017-09-26 09:51
数学
HDOJ
1042(高精度阶乘 JAVA)
importjava.util.Scanner;importjava.math.BigInteger;//要是Main,不然报CEpublicclassMain{publicstaticvoidmain(String[]args){//TODOAuto-generatedmethodstub\Scanners=newScanner(System.in);intn;BigIntegerm;//大整数
Galahad_LLLLLL
·
2017-09-24 09:36
高精度运算
小技巧
HDOJ
2063 匈牙利算法模板程序
过山车TimeLimit:1000/1000MS(Java/Others)MemoryLimit:32768/32768K(Java/Others)TotalSubmission(s):24054AcceptedSubmission(s):10482ProblemDescriptionRPGgirls今天和大家一起去游乐场玩,终于可以坐上梦寐以求的过山车了。可是,过山车的每一排只有两个座位,而且还
老年退役选手
·
2017-09-02 15:35
匈牙利算法
HDOJ
1261 大数乘除法应用
字串数TimeLimit:2000/1000MS(Java/Others)MemoryLimit:65536/32768K(Java/Others)TotalSubmission(s):4794AcceptedSubmission(s):1275ProblemDescription一个A和两个B一共可以组成三种字符串:"ABB","BAB","BBA".给定若干字母和它们相应的个数,计算一共可以组
老年退役选手
·
2017-09-01 22:03
C++语言
HDOJ
4514 并查集判环+BFS求最长路
湫湫系列故事——设计风景线TimeLimit:6000/3000MS(Java/Others)MemoryLimit:65535/32768K(Java/Others)TotalSubmission(s):5286AcceptedSubmission(s):973ProblemDescription随着杭州西湖的知名度的进一步提升,园林规划专家湫湫希望设计出一条新的经典观光线路,根据老板马小腾的指
老年退役选手
·
2017-09-01 01:55
宽搜
并查集
HDOJ
5130 多边形和圆相交面积 最简单的模板
SignalInterferenceTimeLimit:2000/1000MS(Java/Others)MemoryLimit:512000/512000K(Java/Others)TotalSubmission(s):2103AcceptedSubmission(s):1114SpecialJudgeProblemDescriptionTwocountriesA-LandandB-Landare
老年退役选手
·
2017-08-31 10:20
计算几何
HDOJ
4109 关键路径入门题
InstrctionArrangementTimeLimit:2000/1000MS(Java/Others)MemoryLimit:32768/32768K(Java/Others)TotalSubmission(s):1955AcceptedSubmission(s):821ProblemDescriptionAlihastakentheComputerOrganizationandArchi
老年退役选手
·
2017-08-30 11:42
拓扑排序
关键路径
HDOJ
4857 反向建图+优先队列
逃生TimeLimit:2000/1000MS(Java/Others)MemoryLimit:32768/32768K(Java/Others)TotalSubmission(s):5725AcceptedSubmission(s):1675ProblemDescription糟糕的事情发生啦,现在大家都忙着逃命。但是逃命的通道很窄,大家只能排成一行。现在有n个人,从1标号到n。同时有一些奇怪的
老年退役选手
·
2017-08-30 09:27
拓扑排序
HDOJ
1798 求两圆公共面积
TellmetheareaTimeLimit:3000/1000MS(Java/Others)MemoryLimit:65536/32768K(Java/Others)TotalSubmission(s):3110AcceptedSubmission(s):1011ProblemDescriptionTherearetwocirclesintheplane(showninthebelowpictu
老年退役选手
·
2017-08-26 11:00
计算几何
HDOJ
1221 计算几何入门题
RectangleandCircleTimeLimit:2000/1000MS(Java/Others)MemoryLimit:65536/32768K(Java/Others)TotalSubmission(s):3237AcceptedSubmission(s):851ProblemDescriptionGivenarectangleandacircleinthecoordinatesyste
老年退役选手
·
2017-08-21 21:42
计算几何
HDOJ
1412 排序水题
{A}+{B}TimeLimit:10000/5000MS(Java/Others)MemoryLimit:65536/32768K(Java/Others)TotalSubmission(s):22060AcceptedSubmission(s):9094ProblemDescription给你两个集合,要求{A}+{B}.注:同一个集合中不会有两个相同的元素.Input每组输入数据分为三行,第
老年退役选手
·
2017-08-11 16:07
HDOJ
入门级深搜DFS 题目汇总(持续更新中),一路打怪升级
声明:以下题目均来自于
HDOJ
,题目难度并没有排序,都是很基础的题目。http://acm.hdu.edu.cn/showproblem.php?
老年退役选手
·
2017-08-11 14:12
DP
深搜
HDOJ
1078 记忆化搜索入门题 有详细的记忆化搜索模板程序
FatMouseandCheeseTimeLimit:2000/1000MS(Java/Others)MemoryLimit:65536/32768K(Java/Others)TotalSubmission(s):10863AcceptedSubmission(s):4625ProblemDescriptionFatMousehasstoredsomecheeseinacity.Thecityca
老年退役选手
·
2017-08-11 10:33
深搜
DP
记忆化搜索
HDOJ
2102 深搜DFS解法+剪枝优化 入门题
A计划TimeLimit:3000/1000MS(Java/Others)MemoryLimit:32768/32768K(Java/Others)TotalSubmission(s):23986AcceptedSubmission(s):6016ProblemDescription可怜的公主在一次次被魔王掳走一次次被骑士们救回来之后,而今,不幸的她再一次面临生命的考验。魔王已经发出消息说将在T时
老年退役选手
·
2017-08-11 00:44
深搜
[
HDOJ
] 1002 大数加法(坑爹格式
描述ProblemDescriptionIhaveaverysimpleproblemforyou.GiventwointegersAandB,yourjobistocalculatetheSumofA+B.InputThefirstlineoftheinputcontainsanintegerT(1#includevoidaccumlate(char*a,char*b,char*c,intmax
dazhangyu97
·
2017-08-10 22:46
HDOJ练习
HDOJ
1716 排列2 DFS水题 注意输出格式
排列2TimeLimit:1000/1000MS(Java/Others)MemoryLimit:32768/32768K(Java/Others)TotalSubmission(s):8952AcceptedSubmission(s):3307ProblemDescriptionRay又对数字的列产生了兴趣:现有四张卡片,用这四张卡片能排列出很多不同的4位数,要求按从小到大的顺序输出这些4位数。
老年退役选手
·
2017-08-10 15:45
深搜
HDOJ
1175 宽搜BFS基础入门题(有详细注释的代码)
连连看TimeLimit:20000/10000MS(Java/Others)MemoryLimit:65536/32768K(Java/Others)TotalSubmission(s):37107AcceptedSubmission(s):9176ProblemDescription“连连看”相信很多人都玩过。没玩过也没关系,下面我给大家介绍一下游戏规则:在一个棋盘中,放了很多的棋子。如果某两
老年退役选手
·
2017-08-10 09:10
宽搜
宽搜入门代码模板详解
HDOJ
1253
胜利大逃亡TimeLimit:4000/2000MS(Java/Others)MemoryLimit:65536/32768K(Java/Others)TotalSubmission(s):38775AcceptedSubmission(s):13641ProblemDescriptionIgnatius被魔王抓走了,有一天魔王出差去了,这可是Ignatius逃亡的好机会.魔王住在一个城堡里,城堡
老年退役选手
·
2017-08-08 18:08
宽搜
HDOJ
2082题解报告
找单词TimeLimit:1000/1000MS(Java/Others)MemoryLimit:32768/32768K(Java/Others)TotalSubmission(s):7997AcceptedSubmission(s):5595ProblemDescription假设有x1个字母A,x2个字母B,…..x26个字母Z,同时假设字母A的价值为1,字母B的价值为2,…..字母Z的价值
老年退役选手
·
2017-08-07 16:35
母函数
ACM小白入门
现在主要是在
HDOJ
刷题。codeblo
老年退役选手
·
2017-08-07 12:22
自我反思
首先说一下自己的问题,最近-虽然在备战考研,但是还是每天在51nod上刷一也-特别烦,然后他就对我说了,这个东西好好学-个三年(不好听就是坚持三年),你就会有所成就-同时基础一定要打好,让我在
hdoj
上刷专题
Dragonlogin
·
2017-07-13 23:15
心灵鸡汤
没事刷刷题之三 产生冠军
HDOJ
2094
X-产生冠军一群人,打乒乓球比赛,两两捉对撕杀,每两个人之间最多打一场比赛。球赛的规则如下:如果A打败了B,B又打败了C,而A与C之间没有进行过比赛,那么就认定,A一定能打败C。如果A打败了B,B又打败了C,而且,C又打败了A,那么A、B、C三者都不可能成为冠军。Input输入含有一些选手群,每群选手都以一个整数n(n#include#include#include#include#include
qq_39461206
·
2017-07-12 21:35
hdoj
1007 Quoit Design(分治法)
题意:给你n个点,让你求出n个点里距离最近的两点距离。思路:分治法先把点按照坐标x进行排序,划分为左右两部分,最近点对有三种情况,都在左半部分,都在右半部分,两点分别在左边和右边递归求出都在左边和都在右边的情况,选一个最小值m1。然后求出两边都有的情况。分别在两边的情况可以对点进行进一步的筛选,将点的下标保存在t[],对筛选出的点按照y坐标进行排序,方便求出最小值。代码如下:#include#in
CqZtw
·
2017-07-04 10:16
oj
hdoj
3999 The order of a Tree
题目:ProblemDescriptionAsweknow,theshapeofabinarysearchtreeisgreatlyrelatedtotheorderofkeysweinsert.Tobeprecisely:insertakeyktoaemptytree,thenthetreebecomeatreewithonlyonenode;insertakeyktoanonemptytree
科学旅行者
·
2017-07-03 10:11
hdoj
3999 The order of a Tree
题目:ProblemDescriptionAsweknow,theshapeofabinarysearchtreeisgreatlyrelatedtotheorderofkeysweinsert.Tobeprecisely:insertakeyktoaemptytree,thenthetreebecomeatreewithonlyonenode;insertakeyktoanonemptytree
科学旅行者
·
2017-07-03 10:11
hdoj
1100 Trees Made to Order(递归+卡特兰数,关于卡特兰数的讲解)
来源:http://acm.hdu.edu.cn/showproblem.php?pid=1100卡特兰数的讲解:http://www.cnblogs.com/code-painter/p/4417354.html设a[],a[i]表示i个节点能表示的二叉树数量设b[],b[i]表示节点数小于等于i时所能表示的所有二叉树数量,既b[i]=b[i-1]+a[i]有关二叉树数量计算,有下面的公式:a[
CqZtw
·
2017-06-26 11:12
oj
hdoj
1099 Lottery(简单的数学问题变相考察最小公倍数)
来源:http://acm.hdu.edu.cn/showproblem.php?pid=1099题目很难看懂,大意是求数学期望n*(1/1+1/2+1/3+...+1/n)要求按照特定的格式输出位数过大,所以采用longlong型输入输出。按照正常的分数相加的思想,想找出所有分母的最小公倍数,再把变化后的分子相加。代码如下:#include#definelllonglongllgcd(lla,l
CqZtw
·
2017-06-23 09:34
oj
hdoj
1089~
hdoj
1096 A+B问题(输入输出的格式)
就是考察输入输出的格式:1089#includeintmain(){inta,b;while(~scanf("%d%d",&a,&b)){printf("%d\n",a+b);}return0;}1090#includeintmain(){inta,b,t;scanf("%d",&t);while(t--){scanf("%d%d",&a,&b);printf("%d\n",a+b);}retur
CqZtw
·
2017-06-21 16:22
oj
hdoj
1006 Tick and Tick(数学问题,解不等式,求并集)
来源:http://acm.hdu.edu.cn/showproblem.php?pid=1006看秒针的转动,一分钟一分钟的算#include#include#includeusingnamespacestd;structrange//取值范围{doublel,r;};doubled;rangework(doublea,doubleb)//求d0){temp.l=(d-b)/a;temp.r=(
CqZtw
·
2017-06-21 11:27
oj
hdoj
1002 A + B Problem II(简单的大数处理)
来源:http://acm.hdu.edu.cn/showproblem.php?pid=1002用字符串的形式输入输出,先倒置字符串使每位能够对应相加,大于‘9’的那位需要进行进位处理代码如下:#include#include#includeusingnamespacestd;charc[1005],a[1001],b[1001];voidchange(charc[])//倒置{intl,i,j
CqZtw
·
2017-06-20 16:03
oj
hdoj
2012
#includeusingnamespacestd;intmain(void){intf(int);boolis_prime(int);boolall_is;intx,y;while(cin>>x>>y&&(x||y)){intj;all_is=true;for(j=x;j<=y&&all_is==true;j++){if(!(is_prime(f(j))))all_is=false;}if(al
WuchangI
·
2017-06-17 18:29
ACM题解源代码(hdoj)
hdoj
2007
#includeusingnamespacestd;intmain(void){ intm,n,t,num,sum1,sum2; while(cin>>m>>n) { sum1=sum2=0; if(m>n) { t=m;m=n;n=t; } for(num=m;num<=n;num++) {
WuchangI
·
2017-06-16 15:00
hdoj
2006
#includeusingnamespacestd;intmain(void){ inttotal,i,product; while(cin>>total) { product=1; int*a=newint[total]; for(i=0;i>a[i]; for(i=0;i
WuchangI
·
2017-06-16 15:00
hdoj
2005
#includeintmain(void){ inty,m,d,days; boolis_run(int); intmonth[12]={31,28,31,30,31,30,31,31,30,31,30,31}; while(scanf("%d/%d/%d",&y,&m,&d)!=EOF) { days=0; inti; for(i=0;i=3)d
WuchangI
·
2017-06-16 15:00
hdoj
2004
#includeusingnamespacestd;intmain(void){ doublegrade; while(cin>>grade) { if(grade100)cout=90)level='A'; elseif(grade>=80)level='B'; elseif(grade>=70)level='C'; else
WuchangI
·
2017-06-16 15:00
hdoj
2003
#include#include#includeusingnamespacestd;intmain(void){ doublenum; while(cin>>num) { cout<<setiosflags(ios::fixed)<<setprecision(2)<<fabs(num)<<endl; } return0;}
WuchangI
·
2017-06-16 15:00
hdoj
2002
#include#includeusingnamespacestd;constdoublepi=3.1415927;intmain(void){ doubler,V; while(cin>>r) { V=(4*pi*r*r*r)/3; cout<
WuchangI
·
2017-06-16 14:00
hdoj
2001
#include#include#includeusingnamespacestd;intmain(void){ doublex1,x2,y1,y2,d; while(cin>>x1>>y1>>x2>>y2) { d=sqrt(double((x1-x2)*(x1-x2)+(y1-y2)*(y1-y2))); cout<
WuchangI
·
2017-06-16 14:00
hdoj
2000
#includeusingnamespacestd;intmain(){ charx,y,z,t; while(cin>>x>>y>>z) { if(x>y){t=x;x=y;y=t;} if(x>z){t=x;x=z;z=t;} if(y>z){t=y;y=z;z=t;} cout<
WuchangI
·
2017-06-16 14:00
hdoj
1846
//巴什博弈#includeusingnamespacestd;intmain(void){ intC,n,m; cin>>C; while(C--) { cin>>n>>m; cout0?"first":"second")<<endl; } return0;}
WuchangI
·
2017-06-16 14:00
hdoj
1800
//如果不用scanf,用cout,就会TLE,1000MS变成了421MS//贪心,实质求连续多次求最长严格上升子序列,循环次数就是所求的最少broomstick#include#include#includeusingnamespacestd;intbs[3000];intmain(void){ intn,cur,m; while(cin>>n) { if(!n)cout
WuchangI
·
2017-06-16 14:00
hdoj
1406
#includeusingnamespacestd;intmain(void){ boolwanshu(int); intgroups,m,n,i,geshu; cin>>groups; while(groups--) { geshu=0; cin>>m>>n; intt; if(m>n) { t=m;m=n;n
WuchangI
·
2017-06-16 14:00
hdoj
1337
#includeusingnamespacestd;structCell{ boolis;};intmain(void){ inttimes; introunds,cells; intescaped(Cell[],int); cin>>times; while(times--) { cin>>rounds; cells=rounds; Ce
WuchangI
·
2017-06-16 14:00
hdoj
1257
//贪心:重复求出当前最长的递减子序列,再将该子序列的元素拿出,继续重复求当前最长递减子序列,重复次数即为导弹拦截系统最少套数//版本1:#include#includeusingnamespacestd;structD{ inth; boolused;};intmain(void){ intn,count,nn,cur; while(cin>>n) { vector
WuchangI
·
2017-06-16 14:00
hdoj
1250
#include#includeusingnamespacestd;stringadd(strings1,strings2){ stringmax,min; intlmax,lmin; max=s1;min=s2; if(s1.size()=0;i--) { max[lmax]+=(min[i]-'0'); lmax--; } lmax=max.si
WuchangI
·
2017-06-16 14:00
hdoj
1096
#includeusingnamespacestd;intmain(void){ intgroups,total,temp,sum; cin>>groups; while(groups--) { sum=temp=0; cin>>total; while(total--) { cin>>temp; sum+=t
WuchangI
·
2017-06-16 14:00
hdoj
1095
#includeusingnamespacestd;intmain(void){ inta,b; while(cin>>a>>b) { cout<<a+b<<endl<<endl; } return0;}
WuchangI
·
2017-06-16 14:00
hdoj
1094
#includeusingnamespacestd;intmain(void){ inttotal,temp,sum; while(cin>>total) { temp=sum=0; while(total--) { cin>>temp; sum+=temp; } cout<
WuchangI
·
2017-06-16 14:00
hdoj
1093
#includeusingnamespacestd;intmain(void){ intgroups,total,temp,sum; cin>>groups; while(groups--) { total=temp=sum=0; cin>>total; while(total--) { cin>>temp;
WuchangI
·
2017-06-16 14:00
hdoj
1092
#includeusingnamespacestd;intmain(void){ inta,sum,total; while(cin>>total&&total) { a=sum=0; while(total--) { cin>>a; sum+=a; } cout<
WuchangI
·
2017-06-16 14:00
上一页
17
18
19
20
21
22
23
24
下一页
按字母分类:
A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
Q
R
S
T
U
V
W
X
Y
Z
其他