CSU oj 2092-Space Golf】的更多相关文章

Space Golf 题目连接: http://codeforces.com/gym/100803/attachments Description You surely have never heard of this new planet surface exploration scheme, as it is being carried out in a project with utmost secrecy. The scheme is expected to cut costs of c…
You surely have never heard of this new planet surface exploration scheme, as it is being carried out in a project with utmost secrecy. The scheme is expected to cut costs of conventional rover-type mobile explorers considerably, using projected-type…
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 <…
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 You surely have never heard of this new planet surface exploration scheme, as it is being carried out in a project with utmost secrecy. The scheme is expected to cut costs of conventional rover-type mobile explorers considerably, using pr…
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…