#include <iostream> #include <string> using namespace std; int main() { int n, m; while (cin >> m >> n) { ; i <= n+; i++) { || i == n+) { cout << "+"; ; j <= m; j++) cout << "-"; cout <<…
Escape from Tetris Time Limit: 12000/4000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1103 Accepted Submission(s): 280 Problem Description 由于整日整夜地对着这个棋盘,Lele终于走火入魔.每天一睡觉,他就会梦到自己会被人被扔进一个棋盘中,一直找不到出路,然后从梦中惊醒.久而久之…
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1533 解题心得: 第一次写最小费用流的题,去hdoj上找了一个入门级题目,建图比较简单,用了spfa和Dij两种写法. //spfa#include <bits/stdc++.h> using namespace std; *; struct edge{ int to, cap, dis, rev; edge(int To, int Cap, int Dis, int Rev): to(To),…
核反应堆 Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 15706 Accepted Submission(s): 7036 Problem Description 某核反应堆有两类事件发生:高能质点碰击核子时,质点被吸收,放出3个高能质点和1个低能质点:低能质点碰击核子时,质点被吸收,放出2个高能质点和1个低能质点.假定开始的时…
数塔 Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 39043 Accepted Submission(s): 23246 Problem Description 在讲述DP算法的时候,一个经典的例子就是数塔问题,它是这样描述的:有如下所示的数塔,要求从顶层走到底层,若每一步只能走到相邻的结点,则经过的结点的数字之和最大是多少?已…