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
杭电2546
POJ1845 Sumdiv
其实一开始我想到
杭电
的1452的happy2004.就是用逆元的做法,后来跪了~~因为P-1不一定和9901互质啊~~所以求逆元的定理要求不满足,所以在这种情况下不能用逆元的做法来做。
kg_second
·
2012-09-27 16:00
杭电
ACM第1001题(C语言版)答案——Sum Problem
#include intmain(){ intn,i,sum=0; while(scanf("%d",&n)!=EOF){ for(i=1;i<=n;++i) sum=sum+i; printf("%d\n\n",sum); sum=0; } return0; }
odaynot
·
2012-09-26 14:00
c
Integer
input
语言
include
output
hdu
2546
饭卡
pid=
2546
饭卡TimeLimit:5000/1000MS(Java/Others) MemoryLimit:32768/32768K(Java/Others)TotalSubmission(s
a656343072
·
2012-09-26 00:00
杭电
HDU 4287 Intelligent IME 2012 ACM/ICPC 天津网赛
IntelligentIMETimeLimit:2000/1000MS(Java/Others) MemoryLimit:32768/32768K(Java/Others)TotalSubmission(s):1012 AcceptedSubmission(s):519ProblemDescriptionWeallusecellphonetoday.Andwemustbefamiliarw
ilovexiaohao
·
2012-09-25 20:00
Integer
input
each
Dictionary
output
杭电
HDU 4414 Finding crosses 2012 ACM/ICPC 杭州网赛
FindingcrossesTimeLimit:2000/1000MS(Java/Others) MemoryLimit:32768/32768K(Java/Others)TotalSubmission(s):336 AcceptedSubmission(s):212ProblemDescriptionTheNazcaLinesareaseriesofancientgeoglyphsloc
ilovexiaohao
·
2012-09-25 20:00
杭电
HDU 4282 A very hard mathematic problem 2012 ACM/ICPC 天津网赛
Averyhardmathematicproblem TimeLimit:2000/1000MS(Java/Others) MemoryLimit:32768/32768K(Java/Others) TotalSubmission(s):2268 AcceptedSubmission(s):683ProblemDescription
ilovexiaohao
·
2012-09-25 20:00
Integer
input
360
each
output
杭电
OJ——1018 Big number!
BigNumber TimeLimit:2000/1000MS(Java/Others) MemoryLimit:65536/32768K(Java/Others)ProblemDescriptionInmanyapplicationsverylargeintegersnumbersarerequired.Someoftheseapplicationsareusingkeysforsecu
lishuhuakai
·
2012-09-25 15:00
c
Integer
input
encryption
output
Numbers
杭电
OJ——1016 Prime Ring Problem
PrimeRingProblemProblemDescriptionAringiscomposeofncirclesasshownindiagram.Putnaturalnumber1,2,...,nintoeachcircleseparately,andthesumofnumbersintwoadjacentcirclesshouldbeaprime.Note:thenumberoffirstc
lishuhuakai
·
2012-09-24 22:00
算法
优化
output
permutation
Numbers
杭电
ACM--1228 A+B
ProblemDescription读入两个小于100的正整数A和B,计算A+B,需要注意的是:A和B的每一位数字由对应的英文单词给出Input测试输入包含若干测试用例,每个测试用例占一行,格式为"A+B=",相邻两字符串有一个空格间隔.当A和B同时为0时输入结束,相应的结果不要输出.Output对每个测试用例输出1行,即A+B的值.这题没有什么算法,纯粹是字符串的操作。总体而言本题有两类做法:1
cyg0810
·
2012-09-24 11:00
kmp之最小循环子串
今天研究了一下
杭电
1358题,感觉最小循环子串的问题的重点是理解为什么len%(len-next[i])==0可以得出最小循环子串。next[i]是kmp初始化的一个数组。
dnf1990
·
2012-09-23 20:58
string
算法
杭电
OJ--1013 Digital Roots
DigitalRoots TimeLimit:2000/1000MS(Java/Others) MemoryLimit:65536/32768K(Java/Others)ProblemDescriptionThedigitalrootofapositiveintegerisfoundbysummingthedigitsoftheint
lishuhuakai
·
2012-09-23 17:00
list
File
Integer
input
each
output
杭电
ACM 1022--Train Problem
ProblemDescription:Asthenewtermcomes,theIgnatiusTrainStationisverybusynowadays.Alotofstudentwanttogetbacktoschoolbytrain(becausethetrainsintheIgnatiusTrainStationisthefastestallovertheworld^v^).Buther
cyg0810
·
2012-09-21 21:00
杭电
OJ——Tempter of the Bone
TempteroftheBone TimeLimit:2000/1000MS(Java/Others) MemoryLimit:65536/32768K(Java/Others)ProblemDescriptionThedoggiefoundaboneinanancientmaze,whichfascinatedhimalot.However,whenhepickedi
lishuhuakai
·
2012-09-21 00:00
数据结构
算法
struct
input
character
each
杭电
OJ ——1009——FatMouse' Trade
FatMouse'Trade TimeLimit:2000/1000MS(Java/Others) MemoryLimit:65536/32768K(Java/Others)ProblemDescriptionFatMousepreparedMpoundsofcatfood,readytotradewiththecatsguardingthewar
lishuhuakai
·
2012-09-20 01:00
struct
homework
input
each
javabeans
output
杭电
OJ——1006 Tick and Tick
TickandTick TimeLimit:2000/1000MS(Java/Others) MemoryLimit:65536/32768K(Java/Others)ProblemDescriptionThethreehandsoftheclockarerotatingeverysecondandmeetingeachotherm
lishuhuakai
·
2012-09-19 22:00
c
input
UP
360
each
output
大数的计算 java好简单
阅读更多//
杭电
1042java实现C语言写了好长时间都没有通过!汗importjava.math.*;importjava.util.
zxd543
·
2012-09-16 13:00
hdu
2546
饭卡
http://acm.hdu.edu.cn/showproblem.php?pid=254601背包问题,首先拿出5元买最贵的东西,那接下来就是背包容量m-5,物品数量n-1的01背包问题了。状态转移方程为:f[j]=max(f[j],f[j-price[i]]+price[i]), f[j]表示买前i件物品,预算为j时的最大花销 为了好弄,我把最贵的移到数组尾部。#include #includ
xujinsmile
·
2012-09-12 00:00
杭电
ACM大数JAVA提交实例
1002A+BProblemIIProblemDescriptionIhaveaverysimpleproblemforyou.GiventwointegersAandB,yourjobistocalculatetheSumofA+B.InputThefirstlineoftheinputcontainsanintegerT(1=3)Giventwonumbersaandb,calculateho
Wss0130
·
2012-09-07 21:00
java
Integer
input
import
output
Numbers
hdu1274
展开字符串用神递归避免了stack..下面代码是转载的~刚整理Trie模板,准备找个水题试试,百度说1247大水,怒点
杭电
pb准备A,结果眼花点了1274,一看能用栈水过,此时老火的爬虫形象出现在脑海,
MetalSeed
·
2012-09-07 00:00
c
String
input
iostream
fun
output
HDU 2399 GPA 之关于char型指针的使用
最近在做
杭电
acm,关于HDU2399GPA纠结了很久,调试也没有发现问题所在,后来经过参考分析发现是char型指针与数组的问题,用指针不好使,提交失败,但是数组却可以成功,上代码,大家可以对比参考一下
ylxg12345
·
2012-09-06 22:00
c
ACM
gpa
hdu2527 Safe Or Unsafe 哈夫曼树
哈夫曼树之
杭电
2527 2012-5-2322:09阅读(0)SafeOrUnsafeTimeLimit:2000/1000MS(Java/Others) MemoryLimit:32768/32768K
hnust_xiehonghao
·
2012-08-30 21:00
struct
tree
Integer
ini
input
output
网易面试(1)
面试的人是
杭电
的,主管都很友善。没有笔试,纯面试。
endual
·
2012-08-29 19:00
面试
网易面试(1)
面试的人是
杭电
的,主管都很友善。没有笔试,纯面试。
endual
·
2012-08-29 19:00
面试
The University of Chicago Invitational Programming Contest 2012 解题报告
这套题应该是由于每一个题目的时限都比较长,所以,被
杭电
用来测试系统了。也就是2012ACM/ICPCAsiaRegionalOnlineWarmup。
wukonwukon
·
2012-08-25 19:00
SG函数资料(入门必备)
以上内容转自某大牛博客 http://qing.weibo.com/2126316852/7ebd053433000viz.html入门一:首先来玩个游戏,引用
杭电
课件上的:(1) 玩家:2人;(2)
zhoufenqin
·
2012-08-24 14:00
HDU
2546
01背包
pid=
2546
解题思路:要使得买饭后卡上的余额达到最小,但由于有限制条件就是卡上的必须剩下不小于5元才能买饭,这样的情况用01背包是肯定错误的得不到最优的解,我们知道要使得卡上余额最小那就是要让最贵的菜最后买
No_Retreats
·
2012-08-22 20:00
sort函数 使用于
杭电
1106
sort函数 /** **/sort()函数定义在头文件中,它把容器中的数据重新排序成非递减序列。我们之所以用非递减而不用递增是因为,容器中的某些数据元素可能会与其他元素相等。 doublex; vectornumbers; typedefvector::size_typevec_size; vec_szsize=numbers.size(); while(cin>>x) numbers.pu
hedafighter2011
·
2012-08-18 21:00
hdu3342--拓扑排序
hdu3342--拓扑排序感谢
杭电
的水题,A水题,涨自信!题意描述:给出M组两个人之间的师徒关系,问是否存在悖论,即某个人的徒弟又是自己的师傅。解题思路:用拓扑排序判断图中是否存在环路即可。
HooLee
·
2012-08-18 17:00
杭电
ACM 分类
注:网上搜的第一篇 1001这个就不用说了吧1002简单的大数1003DP经典问题,最大连续子段和1004简单题1005找规律(循环点)1006感觉有点BT的题,我到现在还没过1007经典问题,最近点对问题,用分治1008简单题1009贪心1010搜索题,剪枝很关键10111012简单题1013简单题(有个小陷阱)1014简单题1015可以看作搜索题吧1016经典的搜索1017简单数学题10
Wss0130
·
2012-08-18 09:00
数据结构
优化
面试
Microsoft
BT
2010
HD1096 between “ 之间” 的含义
usingnamespacestd; intmain() { intn,m,a,s; cin>>n; while(n--)//有时候while(cin>>m)这种模板不用也行,好像
杭电
机器只检测一遍
hedafighter2011
·
2012-08-18 09:00
hdu 3336 KMP之
杭电
next灵魂
CountthestringTimeLimit:2000/1000MS(Java/Others) MemoryLimit:32768/32768K(Java/Others)TotalSubmission(s):1803 AcceptedSubmission(s):851ProblemDescriptionItiswellknownthatAekdyCoinisgoodatstringp
hnust_xiehonghao
·
2012-08-17 17:00
String
Integer
input
each
output
杭电
1075
WhatAreYouTalkingAboutTimeLimit:10000/5000MS(Java/Others) MemoryLimit:102400/204800K(Java/Others)TotalSubmission(s):7555 AcceptedSubmission(s):2341ProblemDescriptionIgnatiusissoluckythathemetaMa
doufei_ccst
·
2012-08-16 21:00
杭电
1072
NightmareTimeLimit:2000/1000MS(Java/Others) MemoryLimit:65536/32768K(Java/Others)TotalSubmission(s):4360 AcceptedSubmission(s):2177ProblemDescriptionIgnatiushadanightmarelastnight.Hefoundhimself
doufei_ccst
·
2012-08-16 17:00
杭电
1026
IgnatiusandthePrincessITimeLimit:2000/1000MS(Java/Others) MemoryLimit:65536/32768K(Java/Others)TotalSubmission(s):7141 AcceptedSubmission(s):2137SpecialJudgeProblemDescriptionThePrincesshasbeena
doufei_ccst
·
2012-08-16 13:00
ACM相关资源
www.docin.com/p-110943363.html1.常用OJ平台ZOJhttp://acm.zju.edu.cn/九度http://ac.jobdu.com/POJhttp://poj.org/
杭电
hedafighter2011
·
2012-08-16 08:00
HDU 1010 Tempter of the Bone 经典深搜~DFS
杭电
1010题经典的深搜问题值得一看~~解释一.奇偶剪枝例如4*4的矩阵1010010110100101由1到1由0到0必走偶数步由1到0由0到1必走偶数步所以根据这个和时间来判断是否成立例如 445S.X
yangshuolll
·
2012-08-16 00:00
杭电
1016深度搜索问题
PrimeRingProblemTimeLimit:4000/2000MS(Java/Others) MemoryLimit:65536/32768K(Java/Others)TotalSubmission(s):14061 AcceptedSubmission(s):6390ProblemDescriptionAringiscomposeofncirclesasshownindiag
doufei_ccst
·
2012-08-15 21:00
杭电
1015
SafecrackerTimeLimit:2000/1000MS(Java/Others) MemoryLimit:65536/32768K(Java/Others)TotalSubmission(s):4682 AcceptedSubmission(s):2327ProblemDescription===Optechbriefing,2002/11/0206:42CST=== "Th
doufei_ccst
·
2012-08-15 15:00
Integer
input
each
features
Numbers
combinations
杭电
1010
杭电
1010 1.奇偶性剪枝可以把map看成这样: 0 1 0 1 0 1 1 0 1 0 1 0 0 1 0 1 0 1 1 0 1 0 1 0 0 1 0 1 0 1 从为 0 的格子走一步,必然走向为
doufei_ccst
·
2012-08-14 23:00
杭电
1039
EasierDoneThanSaid?TimeLimit:2000/1000MS(Java/Others) MemoryLimit:65536/32768K(Java/Others)TotalSubmission(s):4246 AcceptedSubmission(s):2142ProblemDescriptionPasswordsecurityisatrickything.User
doufei_ccst
·
2012-08-14 15:00
杭电
1020
EncodingTimeLimit:2000/1000MS(Java/Others) MemoryLimit:65536/32768K(Java/Others)TotalSubmission(s):16699 AcceptedSubmission(s):7120ProblemDescriptionGivenastringcontainingonly'A'-'Z',wecouldenco
doufei_ccst
·
2012-08-14 14:00
杭电
1013
DigitalRootsTimeLimit:2000/1000MS(Java/Others)MemoryLimit:65536/32768K(Java/Others)TotalSubmission(s):30319AcceptedSubmission(s):9309ProblemDescriptionThedigitalrootofapositiveintegerisfoundbysummingt
dancingrain
·
2012-08-14 14:28
ACM
杭电
1013
DigitalRootsTimeLimit:2000/1000MS(Java/Others) MemoryLimit:65536/32768K(Java/Others)TotalSubmission(s):30319 AcceptedSubmission(s):9309ProblemDescriptionThedigitalrootofapositiveintegerisfoundby
doufei_ccst
·
2012-08-14 14:00
杭电
1012
uCalculateeTimeLimit:2000/1000MS(Java/Others) MemoryLimit:65536/32768K(Java/Others)TotalSubmission(s):18822 AcceptedSubmission(s):8211ProblemDescriptionAsimplemathematicalformulaforeiswherenisal
doufei_ccst
·
2012-08-14 13:00
杭电
1008
ElevatorTimeLimit:2000/1000MS(Java/Others) MemoryLimit:65536/32768K(Java/Others)TotalSubmission(s):24941 AcceptedSubmission(s):13418ProblemDescriptionThehighestbuildinginourcityhasonlyoneelevato
doufei_ccst
·
2012-08-14 12:00
杭电
1005
NumberSequenceTimeLimit:2000/1000MS(Java/Others) MemoryLimit:65536/32768K(Java/Others)TotalSubmission(s):62216 AcceptedSubmission(s):14226ProblemDescriptionAnumbersequenceisdefinedasfollows:f(1)
doufei_ccst
·
2012-08-14 12:00
杭电
1004 STL map
LettheBalloonRiseTimeLimit:2000/1000MS(Java/Others)MemoryLimit:65536/32768K(Java/Others)TotalSubmission(s):43973AcceptedSubmission(s):15540ProblemDescriptionContesttimeagain!Howexciteditistoseeballoon
dancingrain
·
2012-08-13 22:31
杭电
1004 STL map
LettheBalloonRiseTimeLimit:2000/1000MS(Java/Others) MemoryLimit:65536/32768K(Java/Others)TotalSubmission(s):43973 AcceptedSubmission(s):15540ProblemDescriptionContesttimeagain!Howexciteditistose
doufei_ccst
·
2012-08-13 22:00
成都区域赛区Maze
杭电
4035(dp求期望)
解题思路分析过程转载:02. dp求期望的题。03. 题意:04. 有n个房间,由n-1条隧道连通起来,实际上就形成了一棵树,05. 从结点1出发,开始走,在每个结点i都有3种可能:06. 1.被杀死,回到结点1处(概率为ki)07. 2.找到出口,走出迷宫(概率为ei)08. 3.和该点相连有m条边,随机走一条09. 求:走出迷宫所要走的边
SprintfWater
·
2012-08-13 20:00
HDU
2546
饭卡
01背包的变体,给出两种代码#include #include #include #include #include usingnamespacestd; #definesize1002 ints[size]; intdp[size]; intmain() { inti,j,n,m,min; while(cin>>n&&n) { for(i=0;i>s[i]; cin>>m; if(m=5)dp[
qinmusiyan
·
2012-08-13 16:00
上一页
107
108
109
110
111
112
113
114
下一页
按字母分类:
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
其他