上一页 1 ··· 15 16 17 18 19 20 21 22 23 ··· 33 下一页
摘要: GameTime Limit:10000msCase Time Limit:10000msMemory Limit:65536KB64-bit integer IO format:%lld Java class name:MainSubmitStatusPID: 29371Alice and Bob invented a new game again, as they usually did.The rule of the new game is quite simple. There is an n*n matrix and at the very beginning of the game 阅读全文
posted @ 2013-11-21 09:05 芷水 阅读(192) 评论(0) 推荐(0) 编辑
摘要: NecklaceTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 327680/327680 K (Java/Others)Total Submission(s): 522Accepted Submission(s): 168Problem DescriptionOne day , Partychen gets several beads , he wants to make these beads a necklace . But not every beads can link to each other, every bead sho 阅读全文
posted @ 2013-11-20 19:27 芷水 阅读(191) 评论(0) 推荐(0) 编辑
摘要: 题意:求n位数字,满足非递减的个数。dp[ i ] [ j ] = sum( dp[i -1] [ k ] ); k =>( j , 9); 1 #include 2 #include 3 #include 4 #include 5 using namespace std; 6 int dp[100002][11]={0}; 7 int mod=1000000007; 8 void prepare() 9 {10 int i,j,s;11 for(i=0;i<=9;i++)12 {13 dp[2][i]=10-i;14 dp[2][10]... 阅读全文
posted @ 2013-11-19 17:47 芷水 阅读(164) 评论(0) 推荐(0) 编辑
摘要: 1 #include 2 #include 3 #include 4 #include 5 using namespace std; 6 7 int tom,root,wi; 8 typedef struct node 9 {10 int a[2];11 int i;12 int num;13 }Tril;14 Tril f[100003=0;i--)20 {21 k=( (1=0;i--)33 {34 k=( (1tom )41 {42 tom=cur^x;43 wi=i;44... 阅读全文
posted @ 2013-11-19 14:43 芷水 阅读(163) 评论(0) 推荐(0) 编辑
摘要: PiecesTime Limit: 6000/3000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others) Total Submission(s): 1418 Accepted Submission(s): 724 Problem DescriptionYou heart broke into pieces.My string broke into pieces.But you will recover one day,and my string will never go back. Given a string s.We 阅读全文
posted @ 2013-11-14 22:40 芷水 阅读(210) 评论(0) 推荐(0) 编辑
摘要: 炮兵阵地Time Limit:2000MSMemory Limit:65536KTotal Submissions:16619Accepted:6325Description司令部的将军们打算在N*M的网格地图上部署他们的炮兵部队。一个N*M的地图由N行M列组成,地图的每一格可能是山地(用"H" 表示),也可能是平原(用"P"表示),如下图。在每一格平原地形上最多可以布置一支炮兵部队(山地上不能够部署炮兵部队);一支炮兵部队在地图上的攻击范围如图中黑色区域所示:如果在地图中的灰色所标识的平原上部署一支炮兵部队,则图中的黑色的网格表示它能够攻击到的区域:沿 阅读全文
posted @ 2013-11-13 21:04 芷水 阅读(220) 评论(0) 推荐(0) 编辑
摘要: 方格取数(1)Time Limit: 10000/5000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 3848Accepted Submission(s): 1473Problem Description给你一个n*n的格子的棋盘,每个格子里面有一个非负数。从中取出若干个数,使得任意的两个数所在的格子没有公共边,就是说所取的数所在的2个格子不能相邻,并且取出的数的和最大。Input包括多个测试实例,每个测试实例包括一个整数n 和n*n个非负数(n 2 #include 3 #inc 阅读全文
posted @ 2013-11-12 20:09 芷水 阅读(172) 评论(0) 推荐(0) 编辑
摘要: Corn FieldsTime Limit:2000MSMemory Limit:65536KTotal Submissions:5763Accepted:3052DescriptionFarmer John has purchased a lush new rectangular pasture composed ofMbyN(1 ≤M≤ 12; 1 ≤N≤ 12) square parcels. He wants to grow some yummy corn for the cows on a number of squares. Regrettably, some of the squ 阅读全文
posted @ 2013-11-12 17:12 芷水 阅读(223) 评论(0) 推荐(0) 编辑
摘要: Problem 2138 久违的月赛之一Accept: 40 Submit: 86 Time Limit: 1000 mSec Memory Limit : 32768 KBProblem Description好久没举月赛了,这次lqw给大家出了5道题,因为hsy学长宣传的很到位,吸引了n个DDMM们来做,另一位kk学长说,全做对的要给金奖,做对4题要给银奖,做对3题要给铜奖。统计数据的时候,发现每题分别在n个人中有n1、n2、n3、n4、n5个人通过,lqw灵机一动,问kk:“你猜,这次至少会有多少个人获奖?”由于题目太简单了,每题的通过人数一定大于等于最低获奖人数。Input第一行一个数 阅读全文
posted @ 2013-11-12 09:50 芷水 阅读(282) 评论(0) 推荐(0) 编辑
摘要: Problem 2136 取糖果Accept: 39 Submit: 101 Time Limit: 1000 mSec Memory Limit : 32768 KBProblem Description有N个袋子放成一排,每个袋子里有一定数量的糖果,lzs会随机选择连续的几个袋子,然后拿走这些袋子中包含最多糖果的袋子。现问你,在选择x个袋子的情况下,lzs最坏情况下,也就是最少会拿到多少个糖果?对于x取值为1到n都分别输出答案。Input第一行一个整数T,表示有T组数据。每组数据先输入一行一个整数N(1 2 3 4 struct node 5 { 6 int l; 7 ... 阅读全文
posted @ 2013-11-12 09:16 芷水 阅读(387) 评论(2) 推荐(0) 编辑
上一页 1 ··· 15 16 17 18 19 20 21 22 23 ··· 33 下一页