与班尼特·胡迪一起做生意 AC Time Limit: 1 s Memory Limit: 256 MB Description 马爷作为2-80X的资深土财主,靠着敏锐的商业嗅觉不断买卖商品赚的盆满钵满.近日来大家发现了异样.马爷做生意从来只有赚钱,永远不会亏本. 坦诚的马爷公开了这个秘密.马爷早些年通过不可描述的手段弄到了一个可以预测价格的机器.通过它,马爷可以知道某个商品在今后n天的价格.但是作为牺牲,马爷在这n天之内最多只能分别进行一次该商品的买进和卖出. 现在大家都知道…
与班尼特·胡迪一起拿奖学金 AC Time Limit: 2 s Memory Limit: 256 MB Description 班尼特·胡迪这学期的体测终于上80分了,当期末考试的成绩单和综测表出来之后他想要计算自己究竟能不能拿到奖学金.班尼特·胡迪所在的计算机学院的奖学金评选方法为基本素质优秀,发展素质良好或优秀,体测成绩达到80分及以上,每班只有绩点前25%(向上取整)且符合以上条件的学生才有资格评选奖学金. 班尼特·胡迪由于沉浸在体测上80分的喜悦中无法自拔,他决定请你…
与班尼特·胡迪一起攻破浮空城 AC Time Limit: 1 s Memory Limit: 256 MB Description 桐人为了拯救被困在浮空城堡最顶层的亚丝娜,决定从第一层,不断战斗到最后一层,直至救出亚丝娜,但他需要班尼特·胡迪帮他设计一条攻略路线,可是班尼特·胡迪没有任何思绪,于是他找到了聪明的你帮忙. 现在把浮空城堡理想化为一个由h*n*m个的立方体区域组成的大方体,h为层数,1<=h<=100,n为纵向区域数量,1<=n<=100,m为横向区…
POJ1338 2545 2591 2247都是一个类型的题目,所以放到一起来总结 POJ1338:Ugly Numbers Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 21708 Accepted: 9708 Description Ugly numbers are numbers whose only prime factors are 2, 3 or 5. The sequence 1, 2, 3, 4,…
The MAX Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2062 Accepted Submission(s): 896 Problem Description Giving N integers, V1, V2,,,,Vn, you should find the biggest value of F. Input E…
迪杰斯特拉简单版 #include <bits/stdc++.h> using namespace std; int m,n; const int inf = 0x3f3f3f3f; int dis[1005]; int gra[405][405]; int vis[1005]; void dj(int s, int t) { memset(vis,0,sizeof(vis)); int minn, v; for(int i = 0; i < n; i ++) dis[i] = gra[…
题目链接 Problem Description There is a nonnegative integer sequence a1...n of length n. HazelFan wants to do a type of transformation called prefix-XOR, which means a1...n changes into b1...n, where bi equals to the XOR value of a1,...,ai. He will repea…
Computer Transformation http://acm.hdu.edu.cn/showproblem.php?pid=1041 Problem Description A sequence consisting of one digit, the number 1 is initially written into a computer. At each successive time step, the computer simultaneously tranforms each…
http://acm.hdu.edu.cn/showproblem.php?pid=1021 Fibonacci Again Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 29201 Accepted Submission(s): 14148 Problem Description There are another kind…