题目 题目 分析 第一次用stringstream,真TMD的好用 代码 cpp include using namespace std; int main() { int n; cin n; getchar();//回车 while(n ) ...
分类:
其他好文 时间:
2017-11-27 20:11:58
阅读次数:
108
一、前言 最开始卡这题是某大佬给出的树DP专题中的一个,据说类似于对抗搜索(这是啥?)的一题 但是在经历了若干艰难困苦之后发现这题在HDU上A不了——(先卡vector的时间,后卡输入的时间,上了输入挂还是玄学超时)。于是遵从百度到的大佬指点,上UVA上面交了一发,发现500毫秒过得。。。感觉心好累 ...
分类:
其他好文 时间:
2017-11-26 19:33:23
阅读次数:
137
题目 题目 分析 算是个模拟吧 代码 cpp include using namespace std; map a[130]; char s[85]; int n[130]; int PosIs() { int len=strlen(s); f ...
分类:
其他好文 时间:
2017-11-26 10:59:35
阅读次数:
135
【链接】 "我是链接,点我呀:)" 【题意】 在这里输入题意 【题解】 链表模拟即可。 1pile不能加s... 【代码】 cpp include using namespace std; const int N = 60; string s[N]; int l[N], r[N]; vector v ...
分类:
其他好文 时间:
2017-11-25 22:43:00
阅读次数:
150
Permutation UVA - 11525 看康托展开 题目给出的式子(n=s[1]*(k-1)!+s[2]*(k-2)!+...+s[k]*0!)非常像逆康托展开(将n个数的所有排列按字典序排序,并将所有排列编号(从0开始),给出排列的编号得到对应排列)用到的式子。可以想到用逆康托展开的方法。 ...
分类:
编程语言 时间:
2017-11-25 18:29:46
阅读次数:
152
https://vjudge.net/problem/UVA-11488 题意: 给定一个字符串集合S,定义P(s)为所有字符串的公共前缀长度与S中字符串个数的乘积。比如P( {000, 001, 0011} ) = 6。给n个01串,从中选择一个集合S,使得P(S)最大。 思路: 建立字典树,边插 ...
分类:
其他好文 时间:
2017-11-25 13:01:59
阅读次数:
187
【链接】 "我是链接,点我呀:)" 【题意】 在这里输入题意 【题解】 模拟就好 【代码】 cpp / 1.Shoud it use long long ? 2.Have you ever test several sample(at least therr) yourself? 3.Can you ...
分类:
Web程序 时间:
2017-11-23 08:33:03
阅读次数:
252
题目 "题目" 分析 记录一下再预处理一下。 代码 ...
分类:
其他好文 时间:
2017-11-23 08:27:54
阅读次数:
149