一道ACM题,为什么WA了,
题目
一道ACM题,为什么WA了,
Nowadays,a kind of chess game called “Super Jumping!Jumping!Jumping!” is very popular in HDU.Maybe you are a good boy,and know little about this game,so I introduce it to you now.
The game can be played by two or more than two players.It consists of a chessboard(棋盘)and some chessmen(棋子),and all chessmen are marked by a positive integer or “start” or “end”.The player starts from start-point and must jumps into end-point finally.In the course of jumping,the player will visit the chessmen in the path,but everyone must jumps from one chessman to another absolutely bigger (you can assume start-point is a minimum and end-point is a maximum.).And all players cannot go backwards.One jumping can go from a chessman to next,also can go across many chessmen,and even you can straightly get to end-point from start-point.Of course you get zero point in this situation.A player is a winner if and only if he can get a bigger score according to his jumping solution.Note that your s
答案
#include using namespace std;typedef struct{long int max;long int t;}node;int main(){long int n,i,j;while(cin >> n&&n){node a[1010];a[0].max =0;a[0].t=0;for(i=1;i> a[i].t;a[i].max = a[i].t;for(j=i-1;j...
举一反三
已知函数f(x)=x,g(x)=alnx,a∈R.若曲线y=f(x)与曲线y=g(x)相交,且在交点处有相同的切线,求a的值和该切线方程.
我想写一篇关于奥巴马的演讲的文章,写哪一篇好呢?为什么好
最新试题
- 函数f(x)对任意x属于R都有f(x+3)=-1/f(x)且x【1,3】时,f(x)=2x,则f(2012)=?
- 一组数据中平均数、中位数和众数一定不会相同,
- 一家商店因换季准备将某种服装打折销售,每件服装如果按标价的五折出售将亏20元,而按标价的八折出售将赚40元.问: (1)每件服装的标价是多少? (2)每件服装的成本是多少? (3)
- We are all excited at that time.翻译
- 表示"心中像放下重担子一样,格外轻松愉快"的成语是什么?
- hear与listen to的区别?
- 已知,a,b,c为三角形ABC的三边长,当b²+2ab=c²+2ac时,试判断三角形ABC的形状
- 能造成空气污染的单质气体
- 一篇运用借物喻人手法的的作文,写的,今天回答!
- 某厂有甲、乙两个车间生产同样的机器,十月份的生产任务,甲车间是180台,乙车间是200台.求甲、乙两车间
热门考点
- different 不同词形用法
- 长方形纸片的长是15厘米,长宽上各剪去一个宽为3厘米的长条,剩下的面积是原面积的一半,则原长方形的宽是?
- 计算(6b)²·(-3a)³·(2/3ab²)^4
- 求函数f(x,y)=x^3+y^2-6xy-39x+18y+18的极值
- 数学题关于蜗牛的
- 合抱之木,生于毫末;九层之台,起于累土;千里之行,始于足下.
- 什么时候动词不定式作目的状语而不用动名词
- She says quietly to LiMing的同义句是什么
- 一头牛和一头羊一块草地牛每天能吃草地1/39的草羊每天吃1/40把牛和羊放在这片草地上草大约多久会被吃完
- 如图,点A(x1,y1)、B(x2,y2)都在双曲线 上,且 ,;分别过点A、B向x 轴、y轴作垂线段,垂足分别为C