- 博客(22)
- 收藏
- 关注
原创 20110805组队赛c题
Description 026城市的大尾巴狼和秃尾巴狼是好朋友,有一天,秃尾巴狼给大尾巴狼说了有关约瑟夫环的问题:n个编号依次为1,2....n的人站成一个圈,他们按序号大小顺时针的站着.然后从1号开始报数,报到2的人就会被杀掉,然后再从1开始报数.直到只剩下一个人为止
2011-08-06 15:49:31 316
原创 20110805 组队赛b题
这道题是道关于概率的题~ #include"cstdio" #include"math.h" using namespace std; int main() { int hp1,hp2,ap1,ap2; int m,n; double temp,op; int i;
2011-08-06 15:03:07 363
原创 20110805 组队赛 f题
这是刘汝佳黑书上面的一道例题~ 关键是看x2~因为其他的数在加括号之后都可以变成分子~只有x2只能做分母~ 将除了x2之外的数全变为分子~即x1/(x2/x3/......../xn)=(x1*x3/x4/......./xn)/x2~ 则只要当x2能被整除消去时~整个式子
2011-08-06 13:37:03 385
原创 20110805组队赛d题
Description 外太空又发生战争了.机器人王国决定用N架炮台消灭敌人的供需库,但是无奈每架炮台的威力有限,现在国王得到一个消息:如果在某一时刻N架炮台同时打到敌人的供需库,那么这个供需库就会爆炸.当然炮台的威力不累计.也就是说如果某一时刻有N-1架炮台的大炮同时
2011-08-06 13:26:39 673
原创 poj 2299 Ultra-QuickSort
Description In this problem, you have to analyze a particular sorting algorithm. The algorithm processes a sequence of n distinct integer
2011-08-06 13:08:18 254
原创 poj 1442 Black Box
Description Our Black Box represents a primitive database. It can save an integer array and has a special i variable. At the initial moment
2011-08-03 11:36:36 505
原创 poj 3253 Fence Repair
Description Farmer John wants to repair a small length of the fence around the pasture. He measures the fence and finds that he needs N (
2011-08-01 15:07:19 239
原创 poj 1724 ROADS
DescriptionN cities named with numbers 1 ... N are connected with one-way roads. Each road has two parameters associated with it : the road
2011-07-29 13:08:28 290
原创 20110727 个人赛C题~
DescriptionA palindrome is a symmetrical string, that is, a string read identically from left to right as well as from right to left. You ar
2011-07-28 22:49:52 206
原创 poj 2255 Tree Recovery
DescriptionLittle Valentine liked playing with binary trees very much. Her favorite game was constructing randomly looking binary trees with
2011-07-28 16:35:12 292
原创 poj_1458 Common Subsequence
DescriptionA subsequence of a given sequence is the given sequence with some elements (possible none) left out. Given a sequence X = anothe
2011-07-28 13:49:48 194
原创 poj 2418Hardwood Species
Description Hardwoods are the botanical group of trees that have broad leaves, produce a fruit or nut, and generally go dormant in the winte
2011-07-28 12:11:18 300
原创 20110727 个人赛B题~
DescriptionSorting is one of the most frequently performed computational tasks. Consider the special sorting problem in which the records to
2011-07-28 11:17:21 204
原创 求最大公共子串
最近对字符串研究了一下~有求公共子串~公共序列~可以在两个字符串之间求~也可以在多个字符串之间求~这是求两字符串之间的最大公共子串~#include"cstring" #include"cstdio" char s1[1003]; char s2[1003]; cha
2011-07-28 10:57:01 386
原创 poj 1001 Exponentiation
这是一道关于高精度计算的题~大致的思想是用数组储存各位~然后进行循环乘法运算~将各位存贮到数组中时~需要先将input读入字符串s中~再令a[i]=s[i]-48便可~PS~0的ASC码为48~在进行乘法运算时~由于是循环的要记得把存贮数组c[]清零~此外~还需注意一下几点~1~
2011-07-22 15:55:20 369
原创 poj 1401 Factorial
DescriptionThe most important part of a GSM network is so called Base Transceiver Station (BTS). These transceivers form the areas called ce
2011-07-22 10:53:11 225
原创 poj 1844 Sum
DescriptionConsider the natural numbers from 1 to N. By associating to each number a sign (+ or -) and calculating the value of this express
2011-07-22 10:35:53 403
原创 poj 2081 Recaman's Sequence
DescriptionThe Recaman's sequence is defined by a0 = 0 ; for m > 0, am = am−1 − m if the rsulting am is positive and not already in the sequ
2011-07-22 10:24:38 450
原创 poj 2309 BST
DescriptionConsider an infinite full binary search tree (see the figure below), the numbers in the nodes are 1, 2, 3, .... In a subtree whos
2011-07-22 10:14:11 400
原创 poj 2367 Genealogical tree
DescriptionThe system of Martians' blood relations is confusing enough. Actually, Martians bud when they want and where they want. They gath
2011-07-22 09:58:46 254
原创 poj 2551 Ones
DescriptionGiven any integer 0 InputEach line contains a number n.OutputOutput the number of digits.Sample Input3 7 9901 Sample Output3
2011-07-22 09:31:25 326
原创 poj 3224 Go for Lab Cup!
DescriptionThe Lab Cup Table Tennis Competition is going to take place soon among laboratories in PKU. Students from the AI Lab are all extr
2011-07-22 09:15:37 431
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人