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, ...
阅读全文
摘要:City GameTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 5567Accepted Submission(s): 2401Problem D...
阅读全文
摘要:Under Attack IITime Limit:5 Seconds Memory Limit:65536 KBBecause of the sucessfully calculation in Under Attack I, Doctor is awarded with Courage Cros...
阅读全文
摘要: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...
阅读全文
摘要: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...
阅读全文
摘要:转:http://blog.csdn.net/sunkun2013/article/details/11822927 1 import java.util.*; 2 import java.math.BigInteger; 3 import java.util.Collections; 4 impo...
阅读全文
摘要:模板题: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[...
阅读全文
摘要: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...
阅读全文
摘要:转: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...
阅读全文
摘要:blog.csdn.net/u012860063/article/details/38017661(拓扑排序模板题解可见)http://blog.csdn.net/acdreamers/article/details/16902023(链式向前星) 1 struct Edge 2 { 3 i...
阅读全文
摘要: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...
阅读全文
摘要:Layton's EscapeTime Limit: 2 Seconds Memory Limit: 65536 KBProfessor Layton is a renowned archaeologist from London's Gressenheller University. He ...
阅读全文
摘要: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...
阅读全文
摘要: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...
阅读全文
摘要: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...
阅读全文
摘要: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...
阅读全文
摘要:线性筛更快。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...
阅读全文
摘要:题目链接: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...
阅读全文
摘要: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...
阅读全文
摘要:猜数字Time Limit: 20000/10000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 3373Accepted Submission(s): 1975Problem Descr...
阅读全文
摘要:How Many Equations Can You FindTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 691Accepted Submiss...
阅读全文
摘要:void dfs()//参数用来表示状态{ if(到达终点状态) { ...//根据题意来添加 return; } if(越界或者是不符合法状态) return; for(扩展方式) { if(扩展方式所达到...
阅读全文
摘要:N皇后问题Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 12279Accepted Submission(s): 5535Problem Desc...
阅读全文
摘要:Buy or BuildTime Limit: 2000MSMemory Limit: 65536KTotal Submissions: 1369Accepted: 542DescriptionWorld Wide Networks (WWN) is a leading company that o...
阅读全文
摘要:The SuspectsTime Limit:1000MSMemory Limit:20000KTotal Submissions:17242Accepted:8319DescriptionSevere acute respiratory syndrome (SARS), an atypical p...
阅读全文
摘要: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...
阅读全文
摘要:Description 上次Gardon的迷宫城堡小希玩了很久(见Problem B),现在她也想设计一个迷宫让Gardon来走。但是她设计迷宫的思路不一样,首先她认为所有的通道都应该是双向连通的,就是说如果有一个通道连通了房间A和B,那么既可以通过它从房间A走到房间B,也可以通过它...
阅读全文
摘要:Largest Rectangle in a HistogramTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 13997Accepted Subm...
阅读全文
摘要: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...
阅读全文
摘要: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...
阅读全文
摘要:ref :http://www.cnblogs.com/yuaqua/archive/2011/10/21/2219856.html小数点.后“*”表示输出位数,具体的数据来自参数表printf格式字符串中,与宽度控制和精度控制有关的常量都可以换成变量,方法就是使用一个“*”代替那个常量,然后在后面...
阅读全文
摘要:在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为...
阅读全文
摘要:C - Rightmost Digit Time Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64u Submit Status Practice HDU 1061Description Gi...
阅读全文

浙公网安备 33010602011771号