摘要:
最大连续子序列Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 16193 Accepted Submission(s): 7109 Problem Description给定K个整数的序列{ N1, N2, ..., NK },其任意连续子序列可表示为{ Ni, Ni+1, ..., Nj },其中 1 4 5 int a[10003]; 6 7 int main() 8 { 9 int i,n,l,r,num,max,dp;... 阅读全文
摘要:
1215: 稳定排序Time Limit: 2 Sec Memory Limit: 128 MB Submit: 111 Solved: 43 [Submit][Status][Web Board]Description给出二元数组a[MAXN][2],按第一个关键值从小到大排序后输出,要求第一关键值相同情况下不改变原数组次序Input每组数据第一行为整数n,1 2 #include 3 #include 4 #include 5 #include 6 using namespace std; 7 8 struct node 9 {10 int a;11 int b;12 ... 阅读全文
摘要:
1213: 二叉树结点公共祖先Time Limit: 1 Sec Memory Limit: 128 MB Submit: 159 Solved: 87 [Submit][Status][Web Board]Description一个顺序存储的完全二叉树: 1 / \ 23 / \ / \ 4 5 6 7 ...任意给定两结点的编号,求两结点最近的公共祖先。Input每组数据一行,为空格隔开的两个数i和j,皆为32位有符号正整数Output每组数据对应一行,为编号为i和j的结点的最近公共祖先的编号Sample Input4 54 7Sample Output21 1 #include 2 3. 阅读全文
摘要:
1216: 异或最大值Time Limit: 2 Sec Memory Limit: 128 MB Submit: 98 Solved: 29 [Submit][Status][Web Board]Description给定一些数,求这些数中两个数的异或值最大的那个值Input第一行为数字个数n,1 2 #include 3 #include 4 5 typedef struct 6 { 7 int a[2]; 8 int num; 9 }Tril;10 Tril f[100010=0;i--)17 {18 k=(1=0;i--)29 {30... 阅读全文
摘要:
Find Metal MineralTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65768/65768 K (Java/Others) Total Submission(s): 2018 Accepted Submission(s): 913 Problem DescriptionHumans have discovered a kind of new metal mineral on Mars which are distributed in point‐like with paths connecting each of the 阅读全文
摘要:
TELETime Limit:1000MSMemory Limit:65536KTotal Submissions:3230Accepted:1655DescriptionA TV-network plans to broadcast an important football match. Their network of transmitters and users can be represented as a tree. The root of the tree is a transmitter that emits the football match, the leaves of 阅读全文
摘要:
1018. Binary Apple TreeTime limit: 1.0 secondMemory limit: 64 MBLet's imagine how apple tree looks in binary computer world. You're right, it looks just like a binary tree, i.e. any biparous branch splits up to exactly two new branches. We will enumerate by integers the root of binary apple 阅读全文
摘要:
Starship TroopersTime Limit: 10000/5000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 8540 Accepted Submission(s): 2379 Problem DescriptionYou, the leader of Starship Troopers, are sent to destroy a base of the bugs. The base is built underground. It is actually a h 阅读全文
摘要:
The more, The BetterTime Limit: 6000/2000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 4442Accepted Submission(s): 2639Problem DescriptionACboy很喜欢玩一种战略游戏,在一个地图上,有N座城堡,每座城堡都有一定的宝物,在每次游戏中ACboy允许攻克M个城堡并获得里面的宝物。但由于地理位置原因,有些城堡不能直接攻克,要攻克这些城堡必须先攻克其他某一个特定的城堡。你能帮ACboy算出要获得尽量多 阅读全文
摘要:
Anniversary partyTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 3623 Accepted Submission(s): 1684 Problem DescriptionThere is going to be a party to celebrate the 80-th Anniversary of the Ural State University. The University has a hierarchical 阅读全文