题1:1160十进制-十六进制 注意他给的数据范围 2^31,int是 2^31-1 #include<iostream> using namespace std; int main() { unsigned int n; while(scanf("%u",&n)!=EOF) printf("0x%08X\n",n); ; } 题2:1161Sums这题虽然是大数相加,但是有别于以前的大数相加,给你n(位),然后输入a,b,表示两个数的一位的数,…
题目描述 Afandi is herding N sheep across the expanses of grassland  when he finds himself blocked by a river. A single raft is available for transportation.Afandi knows that he must ride on the raft for all crossings, but adding sheep to the raft makes…
Problem E Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 635    Accepted Submission(s): 111 Problem Description 在数据维护的过程中,保持高效的数据访问和修改是非常重要的工作,这个题目就需要你用高效的手段来维护一段数据并执行不同的操作. 我们首先用如下公式生成一个矩阵A:…
比赛链接: http://202.197.224.59/OnlineJudge2/index.php/Contest/problems/contest_id/36 题目来源: 2014嘉杰信息杯ACM/ICPC湖南程序设计邀请赛暨第六届湘潭市程序设计竞赛 ×  Problem A A simple problem   (求N % 1 + N % 2 + ....+ N % N, 待补) ?  Problem B Path √  Problem C Range   (单调栈) √  Problem…
Biggest Number http://acm.hust.edu.cn/vjudge/contest/view.action?cid=30851#problem/F 解题思路:DFS(检索)+BFS(探路)=强剪枝 一看就知道是搜索题,只是,要是DFS裸搜,真的会超时.时间,非常紧! 做该题的时候,要无时无刻不忘剪枝,抓住一切剪枝的机会,剪吧! (1)用flag记录当前检索的值与当前已经检索到的最大值的关系,一但有机会,就要剪掉那些检索到的值会比当前最大值要小的“残枝败叶”. (2)每次DF…
传送门 题目描述     在空闲时间,张老师习惯性地和菜哭武玩起了取石子游戏,这次的游戏规则有些不同,在他们面前有n堆石子,其中,第i堆石子的个数为a[i],现在制定规则如下:     从张老师开始,两个人轮流取石子,每次可以从任意一堆中取走x个石子,其中x必须严格小于这堆石子的总数并且能够被这堆石子的个数整除,谁先无法继续取走石子就算失败!     例如,只有一堆石子,个数为6,张老师首先可以取走的石子个数为1,2或者3个.     现在给定n堆石子每一堆的石子数,张老师希望你帮他确定在双方最…
Problem Description The famous "Alice and Bob" are playing a game again. So now comes the new problem which need a person smart as you to decide the winner. The problem is as follows: They are playing on a rectangle paper, Alice and Bob take tur…
描述 GFW had intercepted billions of illegal links successfully. It has much more effect. Today, GFW intercepted a message of a mysterious organization. This mysterious organization package the message in legitimate URL. To find the Black Hand behind t…
描述 A heap is a full binary tree; for each node, its key is greater than its two sub-node’s key. Two heaps are different if there are two nodes which have different keys at the same location. Now we have a problem for you: tell me how many different N…
这个题有点小坑,最坑的地方就是  输入的b 变量  有可能 是  负数  !   负数 !  负数!    对 ,你没有看错,就是负数,坑死我了, 一直都是  content.charAt(0) 判断是不是  数字 如果不是数据就是负数,但是!!!!   -号  也是数字啊,然后就一直卡在这里,剩下的思路就简单了 问题 H: 公孙玉龙 内存限制:128 MB时间限制:1 S标准输入输出 题目类型:传统评测方式:文本比较上传者:外部导入 提交:88通过:22 返回比赛      提交      提…