BZOJ2647 : [Neerc2011]Journey】的更多相关文章

$|x|+|y|=\max(x+y,x-y,-x+y,-x-y)$,设$f[i][j]$表示在$(0,0)$,朝向方向$j$,执行第$i$条指令后的信息: $cir$:是否陷入循环 $d$:朝向 $x,y$:坐标 $v_0$:$\max(x+y)$ $v_1$:$\max(x-y)$ $v_2$:$\max(-x+y)$ $v_3$:$\max(-x-y)$ 然后记忆化搜索,当陷入循环时不再执行后面的指令. 用栈维护所有正在计算的状态,若发现循环,则计算循环的$x$和$y$之和,若为$0$则是循…
Search GO 说明:输入题号直接进入相应题目,如需搜索含数字的题目,请在关键词前加单引号 Problem ID Title Source AC Submit Y 1000 A+B Problem 10983 18765 Y 1036 [ZJOI2008]树的统计Count 5293 13132 Y 1588 [HNOI2002]营业额统计 5056 13607 1001 [BeiJing2006]狼抓兔子 4526 18386 Y 2002 [Hnoi2010]Bounce 弹飞绵羊 43…
2632: [neerc2011]Gcd guessing game Time Limit: 10 Sec  Memory Limit: 128 MBSubmit: 144  Solved: 84[Submit][Status][Discuss] Description          给定一个数n ,有一个数x , ( 1<=x<=n ) 每次你可以猜在[1,n]中的数,假设是y,如果x==y,游戏结束,如果没猜中,则告诉你gcd(x,y),然后继续猜,直到猜中为止.          现…
C. Journey time limit per test 3 seconds memory limit per test 256 megabytes input standard input output standard output Recently Irina arrived to one of the most famous cities of Berland — the Berlatov city. There are n showplaces in the city, numbe…
A Knight's Journey Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 41936   Accepted: 14269 Description Background The knight is getting bored of seeing the same black and white squares again and again and has decided to make a journey ar…
1.CF #374 (Div. 2)    C.  Journey 2.总结:好题,这一道题,WA,MLE,TLE,RE,各种姿势都来了一遍.. 3.题意:有向无环图,找出第1个点到第n个点的一条路径,经过的点数要最多. #include<bits/stdc++.h> #define F(i,a,b) for (int i=a;i<b;i++) #define FF(i,a,b) for (int i=a;i<=b;i++) #define mes(a,b) memset(a,b,…
题目链接:http://poj.org/problem?id=2488 A Knight's Journey Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 36695   Accepted: 12462 Description Background The knight is getting bored of seeing the same black and white squares again and again…
题目链接: C. Journey time limit per test 3 seconds memory limit per test 256 megabytes input standard input output standard output Recently Irina arrived to one of the most famous cities of Berland — the Berlatov city. There are n showplaces in the city,…
A Knight's Journey Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 35564 Accepted: 12119 Description Background The knight is getting bored of seeing the same black and white squares again and again and has decided to make a journey around…
A Knight's Journey Time Limit : 2000/1000ms (Java/Other)   Memory Limit : 131072/65536K (Java/Other) Total Submission(s) : 51   Accepted Submission(s) : 17 Problem Description Background The knight is getting bored of seeing the same black and white…