A + B Problem Too Time Limit: 3000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 13465 Accepted Submission(s): 10008 Problem Description This problem is also a A + B problem,but it has a little difference,…
胜利大逃亡(续) Time Limit : 4000/2000ms (Java/Other) Memory Limit : 65536/32768K (Java/Other) Total Submission(s) : 22 Accepted Submission(s) : 10 Font: Times New Roman | Verdana | Georgia Font Size: ← → Problem Description Ignatius再次被魔王抓走了(搞不懂他咋这么讨魔王喜…
下面代码需要插入到MFC项目中运行,实现了计算机图形学中的L系统分形树. class Node { public: int x,y; double direction; Node(){} }; CString way[3] ;//提供三种生成规则 CString rule,temprule; int len ; //单步长 int angle; //旋转转角度 int degree ; //迭代次数 int x,y ; //原点坐标 Node stack[1024]; int stackpoin…
Sum Problem Time Limit: 1000/500 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 338086 Accepted Submission(s): 85117 Problem Description Hey, welcome to HDOJ(Hangzhou Dianzi University Online Judge). In this pro…
人见人爱A-B Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 53836 Accepted Submission(s): 15147 Problem Description 参加过上个月月赛的同学一定还记得其中的一个最简单的题目,就是{A}+{B},那个题目求的是两个集合的并集,今天我们这个A-B求的是两个集合的差,就是做集合的…
人见人爱A^B Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 27711 Accepted Submission(s): 18946 Problem Description 求A^B的最后三位数表示的整数. 说明:A^B的含义是"A的B次方" Input 输入数据包含多个测试实例,每个实例占一行,由两个正整 数A和…
今天和昨天都没有做题,昨天是因为复习太累后面忘了,今天也是上午考毛概,下午又忙着复习计算机图形学,晚上也是忘了结果打了暗黑3,把暗黑3 打通关了,以后都不会玩太多游戏了,争取明天做3题把题目补上,拖越久越难补的道理我是知道的. 亲和数 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 26484 Accepted Submissio…
Lovekey Time Limit: 3000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 6721 Accepted Submission(s): 2186 Problem Description XYZ-26进制数是一个每位都是大写字母的数字. A.B.C.-.X.Y.Z 分别依次代表一个0 ~ 25 的数字,一个 n 位的26进制数转化成是10进制的规…
#include <cstdio> #include <iostream> #include <cstring> using namespace std; const int INF = 0x3fffffff; int g[1005][1005]; int m; void Floyd() { int i, j, k; for (k=1;k<=m;k++) { for (i=1;i<=m;i++) { for (j=1;j<=m;j++) { if (g…
#include <cstdio> #include <iostream> #include <cstring> using namespace std; const int INF = 0x3fffffff; int g[1005][1005]; int m; int Dijkstra(int s,int t) { bool visit[1005]; int dis[1005]; for(int i = 1; i <= m; ++i) { visit[i] =…
for the backtracking part, thanks to the video of stanford cs106b lecture 10 by Julie Zelenski for the nice explanation of recursion and backtracking, highly recommended. in hdu 2553 cout N-Queens solutions problem, dfs is used. // please ignore, bel…
Uncle Tom's Inherited Land* Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 1869 Accepted Submission(s): 777 Special Judge Problem Description Your old uncle Tom inherited a piece of land fr…
人见人爱A+B Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 30385 Accepted Submission(s): 20250 Problem Description HDOJ上面已经有10来道A+B的题目了,相信这些题目曾经是大家的最爱,希望今天的这个A+B能给大家带来好运,也希望这个题目能唤起大家对ACM曾经的热爱.…
a problem where OO seems more natural to me, implementing a utility class not instantiable. how to prevent instantiation, thanks to http://stackoverflow.com/questions/10558393/prevent-instantiation-of-an-object-outside-its-factory-method/10558404#105…
Uniform Generator Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 21176 Accepted Submission(s): 8294 Problem Description Computer simulations often require random numbers. One way to generate pseu…
FatMouse' Trade Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 42953 Accepted Submission(s): 14336 Problem Description FatMouse prepared M pounds of cat food, ready to trade with the cats g…
Drainage Ditches Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 8861 Accepted Submission(s): 4141 Problem Description Every time it rains on Farmer John's fields, a pond forms over Bessie's…
Choose the best route Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 8224 Accepted Submission(s): 2706 Problem Description One day , Kiki wants to visit one of her friends. As she is liable…