[BZOJ]1941: [Sdoi2010]Hide and Seek ...
分类:
其他好文 时间:
2017-03-31 17:35:25
阅读次数:
175
模拟退火裸题(输出"nan nan"可以AC) 代码: 1 #include<iostream> 2 #include<cstdio> 3 #include<cstring> 4 #include<cmath> 5 #include<cstdlib> 6 using namespace std; 7 ...
分类:
其他好文 时间:
2017-03-27 17:40:56
阅读次数:
147
题意:完全背包裸题 每件物品的cost就是它的value。 1.完全背包法 2.暴力优化法(转): 这种方法就是暴力出所有的不给小费的情况 最多就200个 所以不会超时 可以发现350以后,只要是50的倍数 就会付0小费 所以我们也可以把我下面复杂的暴力过程去掉//=.=厉害了! ...
分类:
其他好文 时间:
2017-03-25 20:08:02
阅读次数:
174
题目链接:hdu 1402 A * B Problem Plus 题意: 让你求两个大数的乘法。 题解: FFT裸题。 FFT学习推荐:FFT学习笔记 1 #include<bits/stdc++.h> 2 #define F(i,a,b) for(int i=a;i<=b;++i) 3 using ...
分类:
其他好文 时间:
2017-03-22 20:41:40
阅读次数:
202
以前没学插头dp的时候觉得这题贼难,根本不会做,学了才发现原来是一裸题。 用二进制表示以前的格子的状态,0表示没放国王,1表示放了国王。 假设当前位置为(x,y),需要记录的是(x-1,y-1)至(x,y-1)的信息,共n+1个点。 每个状态有两种决策,第一种是这个格子不放国王,直接转移。 第二种是 ...
分类:
其他好文 时间:
2017-03-21 12:43:08
阅读次数:
158
Beside other services, ACM helps companies to clearly state their “corporate identity”, which includes company logo but also other signs, like tradema ...
分类:
其他好文 时间:
2017-03-20 23:58:32
阅读次数:
944
数字三角形,DP裸题 1 #include<stdio.h> 2 #include<string.h> 3 #define max(a,b) (a)>(b)?a:b 4 5 int g[101][101],dp[101][101]; 6 7 int max1(int i,int j){ 8 retu ...
分类:
其他好文 时间:
2017-03-19 11:10:51
阅读次数:
170
数字中不能出现4或者连续的62,数位DP裸题 1 #include<stdio.h> 2 #include<string.h> 3 long long ans; 4 bool a[1000000]; 5 void fun(){ 6 for(long long i=0;i<=1000000;i++){ ...
分类:
其他好文 时间:
2017-03-19 11:08:52
阅读次数:
184
给出修建边的边权,求连通所有点的最小花费 最小生成树裸题 1 #include<stdio.h> 2 #include<string.h> 3 #include<algorithm> 4 using namespace std; 5 6 struct seg{ 7 int a,b,l; 8 bool ...
分类:
其他好文 时间:
2017-03-19 11:07:05
阅读次数:
173
矩形面积并 线段树-扫描线裸题 1 #include<stdio.h> 2 #include<string.h> 3 #include<algorithm> 4 #include<math.h> 5 using namespace std; 6 const int maxm=2e3+5; 7 con ...
分类:
其他好文 时间:
2017-03-19 11:05:48
阅读次数:
249