Zjnu Stadium Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2672 Accepted Submission(s): 1028 Pr ...
分类:
其他好文 时间:
2016-05-10 20:45:22
阅读次数:
236
转:http://blog.csdn.net/shuangde800/article/details/7983965 #include <cstdio> #include <cstring> #include <queue> #include <set> #include <map> #includ ...
分类:
其他好文 时间:
2016-05-04 20:58:56
阅读次数:
166
题目来源:HDU 3047 Zjnu Stadium 题意:给你一些人 然后每次输入a b c 表示b在距离a的右边c处 求有多少个矛盾的情况 思路:用sum[a] 代表a点距离根的距离 每次合并时假设根一样 推断sum数组是否符合情况 根不一样 合并两棵树 这里就是带权并查集的精髓 sum[y] ...
分类:
其他好文 时间:
2016-04-04 19:42:48
阅读次数:
154
Zjnu Stadium 题意:题中讲列数总共为300,但是行数不限。即广场每一圈的半径无限大,但是阶梯层数为300;并且每一次输入A(1<=A<=N), B(1<=B<=N), X(0<=X<300)就表示A,B在同一行(列数没用。。不用mod),并且认为B在A的右边X处;N,M分别表示输入的数值
分类:
其他好文 时间:
2016-02-08 01:08:23
阅读次数:
279
带权并查集。 1 /* 3047 */ 2 #include 3 #include 4 #include 5 #include 6 #include 7 #include 8 #include 9 #include 10 #include 11 #include ...
分类:
其他好文 时间:
2015-10-26 12:13:55
阅读次数:
185
首先,我只想声明一点,这道题有毒。。。我用char读入就错了,然而换成string读入就对了或者可以把定义char的数组开的大一点,原先1A的一题硬是纠结了老半天。
传送门:zjnu
题意:
就是对于一个组成的序列,添加尽量少的括号得到一个规则序列,并且输出这个序列的长度。
不过我学到了两种定义dp状态的方法:
1)定义dp[i][j]为i~j中需要添加的最少的括号数。...
分类:
编程语言 时间:
2015-08-28 00:53:39
阅读次数:
137
Problem Description
In 12th Zhejiang College Students Games 2007, there was a new stadium built in Zhejiang Normal University. It was a modern stadium which could hold thousands of people. The audien...
分类:
其他好文 时间:
2015-08-26 22:24:37
阅读次数:
183
Zjnu StadiumTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2302Accepted Submission(s): 876Problem...
分类:
其他好文 时间:
2015-08-15 17:55:09
阅读次数:
76
//zjnu 1410//floyed#include#include#include#includeusing namespace std;#define inf 0x3fffffffint mp[201][201],n;void floyed(){ int i,j,k,mi=inf; ...
分类:
其他好文 时间:
2015-08-06 22:04:01
阅读次数:
150
//zjnu 1399//sort 数组可用//vector sort(vector)#include#includeusing namespace std;int s[10000000];int main(){ int n; int i; int k=0; while(sc...
分类:
其他好文 时间:
2015-07-31 21:51:51
阅读次数:
141