nyist 740 “炫舞家“ST
来源:互联网 发布:在线大肚照自拍软件 编辑:程序博客网 时间:2024/04/29 22:13
题目地址:http://acm.nyist.net/JudgeOnline/problem.php?pid=740
思路:
#include <iostream>#include <cstdio>#include <cstdlib>#include <algorithm>#include <queue>#include <stack>#include <map>#include <cstring>#include <climits>#include <cmath>#include <cctype>const int inf = 0x3f3f3f3f;//1061109567typedef long long LL;#define lson l,m,rt<<1#define rson m+1,r,rt<<1|1using namespace std;int a[10010];int dp[10010][5][5];int cost[5][5];int main(){ for(int i=1; i<=4; i++) { cost[0][i] = 2; cost[i][i] = 1; int k = i + 1; if(k == 5) k = 1; cost[i][k] = cost[k][i] = 3; } cost[2][4] = cost[4][2] = 4; cost[1][3] = cost[3][1] = 4; while(true) { memset(dp,0,sizeof(dp)); int k = 0; scanf("%d",&a[k]); if(a[k] == 0) break; k++; while(scanf("%d",&a[k]) && a[k]) { k++; } k--; dp[0][a[0]][0] = 2; dp[0][0][a[0]] = 2; for(int i=1; i<k; i++) { dp[i][j] } } return 0;}
0 0
- nyist 740 “炫舞家“ST
- nyist 740 “炫舞家“ST(动态规划)
- nyist 740 “炫舞家“ST(DP)
- 题目 740 “炫舞家“ST
- NYOJ,740“炫舞家” ST
- nyoj 740 “炫舞家“ST
- NYOJ 740 “炫舞家“ST
- NYOJ 740 “炫舞家”ST
- nyoj-740 “炫舞家“ST
- nyist
- “炫舞家“ST
- “炫舞家“ST
- “炫舞家“ST
- NYOJ740 - “炫舞家“ST (DP)
- nyoj740“炫舞家“ST【dp】
- ST
- ST
- ST
- Tracert(traceroute)&Ping 工作原理分析
- JS中call和apply
- meanshift运动跟踪算法详解
- CTF-web练习
- 【转载】jdk、jre、jvm等名词解释
- nyist 740 “炫舞家“ST
- JavaScript
- //6.5 定义一个日期类 Date,该类对象存放一个日期,可以提供的操作有: //void GetDate(); //取日期值,格式如“2001 年 2 月 5 日” //void GetYear(
- 思考各种编程语言是如何适应运行环境(调用外设)的?
- View setSystemUiVisible 测试
- 随机数字的大小排列
- 并发编程
- 62. Unique Paths
- 第五周实践项目1————三角形雏形(4)