csu oj 1339: 最后一滴血】的更多相关文章

http://acm.csu.edu.cn/OnlineJudge/problem.php?id=1339 1339: 最后一滴血 Time Limit: 1 Sec  Memory Limit: 128 MBSubmit: 319  Solved: 142[Submit][Status][Web Board] Description 在ACM/ICPC这样的程序设计竞赛中,最早解出一道题称为抢到FB(First Blood,第一滴血).现在ACM/ICPC世界总决赛甚至为每道题的FB设立了特别…
http://acm.csu.edu.cn/OnlineJudge/problem.php?id=1330 1330: 字符识别? Time Limit: 1 Sec  Memory Limit: 128 MBSubmit: 419  Solved: 296[Submit][Status][Web Board] Description 你的任务是写一个程序进行字符识别.别担心,你只需要识别1, 2, 3,如下: .*.  ***  *** .*.  ..*  ..* .*.  ***  ***…
题目链接:http://acm.csu.edu.cn/OnlineJudge/problem.php?id=1811 给你一棵树,每个节点有一个颜色.问删除一条边形成两棵子树,两棵子树有多少种颜色是有相同的. 启发式合并,小的合并到大的中.类似的题目有http://codeforces.com/contest/600/problem/E //#pragma comment(linker, "/STACK:102400000, 102400000") #include <algor…
题目链接:http://acm.csu.edu.cn/OnlineJudge/problem.php?id=1804 中文题意就不说了. dfs从底到根回溯即可,看代码应该能清楚. //#pragma comment(linker, "/STACK:102400000, 102400000") #include <algorithm> #include <iostream> #include <cstdlib> #include <cstrin…
Description Given a positive integer n, find two non-negative integers a, b such that a2 + b2 = n. Input The first line contains the number of test cases T (1 <= T <= 1000). For each test case, there is only one line with an integer n (1 <= n <…
Description 现在有两个单调递增序列,第一个序列有N个整数,第二个序列有M个整数,现在你可以从第一个序列中选一个数x,然后从第二个序列中选一个数y,那么有多少种情况满足x+y<=K呢? Input 输入包含多组数据.     对于每组测试数据,第一行包含两个整数N, M , K (1 <= N, M <= 105, 1 <= K <= 109),含义同上.接下来一行包含N个在[1, 109]范围内的整数,依次描述了第一个序列中的各个整数.再接下来一行包含M个在[1,…
Description 有一个N*N的字符矩阵,从上到下依次记为第1行,第2行,……,第N行,从左至右依次记为第1列,第2列,……,第N列. 对于这个矩阵会进行一系列操作,但这些操作只有两类: (1) R: 将矩阵逆时针旋转90度: (2) P x y: 将此时第x行第y列的字符打印出来,其中1 <= x, y <= N.   Input 输入数据的第一行包含一个整数T (1 <= T <= 20),表示接下来一共有T组测试数据. 对于每组测试数据,第一行包含一个整数N (1 &l…
Description My girlfriend loves 7 very much, she thinks it is lucky! If an integer contains one or more 7, she will think it is lucky too! Input The first line has one integer T (1 <= T <= 100), means there are T test cases.    For each test case, t…
时间限制:1 秒 内存限制:32 兆 特殊判题:否 提交:712 解决:379 题目描述: 今年的ACM世界总决赛快要开始了,需要有一个排名算法来对每支队伍进行现场排名.ACM组委会把这个任务交给了你,相信你一定能很好地完成.  排名规则如下:通过题的数目多的队伍排名靠前,如果有多支队伍过的题的数目相同,则罚时少的队伍排名靠前. 输入: 输入的第一行包括一个整数N(1<=N<=100),代表参加比赛的队伍的个数.  接下来的N行每行包括一个字符串和两个整数num,punish,它们之间用空格隔…
1514: Packs Time Limit: 10 Sec  Memory Limit: 128 MBSubmit: 61  Solved: 4[Submit][Status][Web Board] Description Give you n packs, each of it has a value v and a weight w. Now you should find some packs, and the total of these value is max, total of…