07 2015 档案

摘要:MatrixTime Limit:10 Seconds Memory Limit:131072 KBAN*Mcoordinate plane ((0, 0)~(n, m)). Initially the value of allN*Mgrids are 0.An operation T(a, b, ... 阅读全文
posted @ 2015-07-31 11:00 JoneZP 阅读(150) 评论(0) 推荐(0)
摘要:City GameTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 5567Accepted Submission(s): 2401Problem D... 阅读全文
posted @ 2015-07-30 23:15 JoneZP 阅读(199) 评论(0) 推荐(0)
摘要:Under Attack IITime Limit:5 Seconds Memory Limit:65536 KBBecause of the sucessfully calculation in Under Attack I, Doctor is awarded with Courage Cros... 阅读全文
posted @ 2015-07-30 22:52 JoneZP 阅读(404) 评论(0) 推荐(0)
摘要:Shizuka's LetterTime Limit:2 Seconds Memory Limit:65536 KBNobita receives a letter from Shizuka. For the sake of security, the letter's contentTis pro... 阅读全文
posted @ 2015-07-29 18:54 JoneZP 阅读(204) 评论(0) 推荐(0)
摘要:Tree of ThreeTime Limit:2 Seconds Memory Limit:65536 KBNow we have a tree and some queries to deal with. Every node in the tree has a value on it. For... 阅读全文
posted @ 2015-07-29 09:44 JoneZP 阅读(189) 评论(0) 推荐(0)
摘要:转:http://blog.csdn.net/sunkun2013/article/details/11822927 1 import java.util.*; 2 import java.math.BigInteger; 3 import java.util.Collections; 4 impo... 阅读全文
posted @ 2015-07-29 09:36 JoneZP 阅读(181) 评论(0) 推荐(0)
摘要:模板题:POJ 2352 Stars HDU1166 1 int lowbit(int x) 2 { 3 return x&(-x); 4 } 5 void update(int x,int val) 6 { 7 while(x0)17 {18 sum+=c[... 阅读全文
posted @ 2015-07-27 09:53 JoneZP 阅读(114) 评论(0) 推荐(0)
摘要:Gu Jian Qi TanTime Limit: 2 Seconds Memory Limit: 65536 KBGu Jian Qi Tan is a very hot Chinese RPG in this summer vacation. SuSu is the most import... 阅读全文
posted @ 2015-07-24 19:08 JoneZP 阅读(252) 评论(0) 推荐(0)
摘要:转:http://www.cnblogs.com/rrll/archive/2010/10/18/1855140.htmlhdu 2095 find your present (2)方法很多:(1)查找,数组设为499999超时了!ac不了!(2)you can assume that only o... 阅读全文
posted @ 2015-07-24 13:54 JoneZP 阅读(1697) 评论(0) 推荐(0)
摘要:blog.csdn.net/u012860063/article/details/38017661(拓扑排序模板题解可见)http://blog.csdn.net/acdreamers/article/details/16902023(链式向前星) 1 struct Edge 2 { 3 i... 阅读全文
posted @ 2015-07-23 10:05 JoneZP 阅读(393) 评论(0) 推荐(0)
摘要:Trail WalkTime Limit: 2 Seconds Memory Limit: 65536 KBFatMouse is busy organizing the coming trail walk. After the route for the trail walk has bee... 阅读全文
posted @ 2015-07-22 16:27 JoneZP 阅读(271) 评论(0) 推荐(0)
摘要:Layton's EscapeTime Limit: 2 Seconds Memory Limit: 65536 KBProfessor Layton is a renowned archaeologist from London's Gressenheller University. He ... 阅读全文
posted @ 2015-07-22 10:33 JoneZP 阅读(202) 评论(0) 推荐(0)
摘要:DescriptionIn the Fibonacci integer sequence, F_0 = 0, F_1 = 1, and F_n = F_{n-1} + F_{n-2} for n \geq 2. For example, the first ten terms of the Fibo... 阅读全文
posted @ 2015-07-19 18:31 JoneZP 阅读(167) 评论(0) 推荐(0)
摘要:1 long long euler_phi(int n) 2 { 3 int m=(int)sqrt(n+0.5); 4 int ans=n; 5 for(int i=2;i1)ans=ans/n*(n-1);14 return ans;15 }Descriptio... 阅读全文
posted @ 2015-07-19 18:25 JoneZP 阅读(195) 评论(0) 推荐(0)
摘要:1 scanf("%s%d",a,&b);2 int len=strlen(a);3 int ans=0;4 for(int i=st;i 0, b fits into a 32 bit signed integer). Numbers will not contain leading zeroes... 阅读全文
posted @ 2015-07-19 18:22 JoneZP 阅读(699) 评论(0) 推荐(0)
摘要:1 long long x,y,gcd; 2 void extend_gcd(long long a, long long b) 3 { 4 if(b == 0) 5 { 6 x = 1; 7 y = 0; 8 gcd = a; 9... 阅读全文
posted @ 2015-07-19 18:16 JoneZP 阅读(104) 评论(0) 推荐(0)
摘要:线性筛更快。1.埃氏筛法1 int m=sqrt(n+0.5);2 memset(vis,0,sizeof(vis));3 for(int i=2;i 2 #include 3 #include 4 #include 5 #include 6 using namespace std; 7 in... 阅读全文
posted @ 2015-07-19 18:11 JoneZP 阅读(221) 评论(0) 推荐(0)
摘要:题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4565这个博客讲的比较好:http://blog.csdn.net/ljd4305/article/details/8987823题意:给定a,b,,n,m,求Sn 1 #include 2 #incl... 阅读全文
posted @ 2015-07-19 10:53 JoneZP 阅读(189) 评论(0) 推荐(0)
摘要:DescriptionGiven n different objects, you want to take k of them. How many ways to can do it?For example, say there are 4 items; you want to take 2 of... 阅读全文
posted @ 2015-07-18 00:09 JoneZP 阅读(262) 评论(0) 推荐(0)
摘要:猜数字Time Limit: 20000/10000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 3373Accepted Submission(s): 1975Problem Descr... 阅读全文
posted @ 2015-07-16 21:18 JoneZP 阅读(366) 评论(0) 推荐(0)
摘要:How Many Equations Can You FindTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 691Accepted Submiss... 阅读全文
posted @ 2015-07-16 11:58 JoneZP 阅读(171) 评论(0) 推荐(0)
摘要:void dfs()//参数用来表示状态{ if(到达终点状态) { ...//根据题意来添加 return; } if(越界或者是不符合法状态) return; for(扩展方式) { if(扩展方式所达到... 阅读全文
posted @ 2015-07-15 22:21 JoneZP 阅读(3233) 评论(0) 推荐(0)
摘要:N皇后问题Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 12279Accepted Submission(s): 5535Problem Desc... 阅读全文
posted @ 2015-07-15 22:04 JoneZP 阅读(239) 评论(0) 推荐(0)
摘要:Buy or BuildTime Limit: 2000MSMemory Limit: 65536KTotal Submissions: 1369Accepted: 542DescriptionWorld Wide Networks (WWN) is a leading company that o... 阅读全文
posted @ 2015-07-13 10:49 JoneZP 阅读(373) 评论(0) 推荐(0)
摘要:The SuspectsTime Limit:1000MSMemory Limit:20000KTotal Submissions:17242Accepted:8319DescriptionSevere acute respiratory syndrome (SARS), an atypical p... 阅读全文
posted @ 2015-07-09 16:32 JoneZP 阅读(171) 评论(0) 推荐(0)
摘要:Number of ContainersTime Limit: 1 Second Memory Limit: 32768 KBFor two integers m and k, k is said to be a container ofm if k is divisible by m. Given... 阅读全文
posted @ 2015-07-07 23:42 JoneZP 阅读(261) 评论(0) 推荐(0)
摘要:Description 上次Gardon的迷宫城堡小希玩了很久(见Problem B),现在她也想设计一个迷宫让Gardon来走。但是她设计迷宫的思路不一样,首先她认为所有的通道都应该是双向连通的,就是说如果有一个通道连通了房间A和B,那么既可以通过它从房间A走到房间B,也可以通过它... 阅读全文
posted @ 2015-07-07 23:38 JoneZP 阅读(198) 评论(0) 推荐(0)
摘要:Largest Rectangle in a HistogramTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 13997Accepted Subm... 阅读全文
posted @ 2015-07-07 23:23 JoneZP 阅读(176) 评论(0) 推荐(0)
摘要:Description There is a rectangular room, covered with square tiles. Each tile is colored either red or black. A man is standing on a black til... 阅读全文
posted @ 2015-07-05 22:52 JoneZP 阅读(136) 评论(0) 推荐(0)
摘要:The 15-puzzle has been around for over 100 years; even if you don’t know it by that name, you’ve seen it. It is constructed with 15 sliding ti... 阅读全文
posted @ 2015-07-05 22:34 JoneZP 阅读(248) 评论(0) 推荐(0)
摘要:ref :http://www.cnblogs.com/yuaqua/archive/2011/10/21/2219856.html小数点.后“*”表示输出位数,具体的数据来自参数表printf格式字符串中,与宽度控制和精度控制有关的常量都可以换成变量,方法就是使用一个“*”代替那个常量,然后在后面... 阅读全文
posted @ 2015-07-04 14:36 JoneZP 阅读(159) 评论(0) 推荐(0)
摘要:在ipython下得出的数据: In [1]: -1%4 Out[1]: 3 In [2]: 1%(-4) Out[2]: -3 In [3]: -1%(-4) Out[3]: -1 个人理解:a%b=r中,若a和b中有一个为负数,则|r|=|b|-|a|%|b|;若b为负数,则r为... 阅读全文
posted @ 2015-07-04 14:11 JoneZP 阅读(151) 评论(0) 推荐(0)
摘要:C - Rightmost Digit Time Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64u Submit Status Practice HDU 1061Description Gi... 阅读全文
posted @ 2015-07-03 14:56 JoneZP 阅读(374) 评论(0) 推荐(0)