水题
文章平均质量分 66
xxx0624
这里是一座围城
展开
-
HDU4540+DP
简单题。。。dp[ i ][ j ] 表示第 i 行取第 j 个数的MinVal/*DP&简单题*/#include#include#include#include#include#include#include#include#includeusing namespace std;const int inf = 0x7fffffff;int mat[ 22 ]原创 2013-08-05 23:05:59 · 952 阅读 · 0 评论 -
CodeForce 339:A+B+C
A题:水题。。#include#includeconst int maxn = 1005;char s[ maxn ];int main(){ //freopen("in.txt","r",stdin); while( scanf("%s",s)!=EOF ){ int len = strlen(s); int c1 = 0,c2 = 0,c3 = 0; for( in原创 2013-08-27 23:05:44 · 905 阅读 · 0 评论 -
HDU4662+无
把目标中的 U 转化为 I。又因为 I的个数是有规律的:1 2 4 8 16 。。。再结合可以取消 6 12 18 。。。个I。。。得解#include#include#include#include#includeusing namespace std;const int maxn = 1000000+5;mapmp;void init(){ mp.clear();原创 2013-08-16 22:30:59 · 775 阅读 · 0 评论 -
HDU1392+凸包
/* 几何 凸包 顺时针!!! */ #include #include #include #include #include #include //#include #include using namespace std; typedef long long ll; //typedef __int64 int64; const int maxn = 105; c原创 2013-08-18 21:26:44 · 832 阅读 · 0 评论 -
HDU4148+找规律
规律找到了就是个大水题。。S(n)是描述S(n-1)/**/#include#include#include#include#include#include#include#include#include#includeusing namespace std;typedef long long int64;//typedef __int64 int64原创 2013-08-18 18:59:14 · 884 阅读 · 0 评论 -
FZU-1924+判断环/DFS/BFS
dfs:/**/#include#include#include#include#include#include#include#include#include#includeusing namespace std;typedef long long int64;//typedef __int64 int64;typedef pair PII;#define原创 2013-09-04 00:03:42 · 1267 阅读 · 0 评论 -
FZU-1921+线段树
简单的线段树。记录MinVal 和 相应的ID即可/*线段树*/#include#include#include#include#include#include#include#include#include#includeusing namespace std;typedef long long int64;//typedef __int64 int64;原创 2013-09-04 00:04:46 · 1227 阅读 · 0 评论 -
HDU4608+模拟
简单的模拟题。暴力枚举/*模拟*/#include#include#include#include#include#include#include#include#include#includeusing namespace std;typedef long long int64;//typedef __int64 int64;typedef pair原创 2013-09-13 00:42:32 · 886 阅读 · 0 评论 -
CSU1327+贪心+模拟
题意简单,中文题目方法:对于一个数 从左往右找相同的数 ,有就改变靠右的,同时把该数的右边全置0注意!!!!n/**/#include#include#include#include#include#include#include#include#include#includeusing namespace std;typedef long long int原创 2013-10-04 00:20:59 · 1006 阅读 · 0 评论 -
CSU1321+SPFA
简单题目。。/*简单的bfs*/#include#include#include#include#include#include#include#include#include#includeusing namespace std;typedef long long int64;//typedef __int64 int64;typedef pair PII;原创 2013-10-04 00:22:25 · 1047 阅读 · 0 评论 -
HDU4648+Easy
N^2都能过!!!!!!!/*Easy*/#include#include#include#include#include#include#include#include#include#includeusing namespace std;typedef long long int64;//typedef __int64 int64;typedef pair原创 2013-08-15 17:30:57 · 786 阅读 · 0 评论 -
HDU4639+字符串
找规律。。。。Fib数列的应用。。。简单题。/*字符串*/#include#include#include#include#include#include#include#include#include#includeusing namespace std;typedef long long int64;//typedef __int64 int64;typ原创 2013-08-14 14:27:47 · 861 阅读 · 0 评论 -
HDU4548+筛素数
先筛出素数,再筛出美素数。简单题。/*筛素数*/#include#include#include#include#include#include#include#include#includeusing namespace std;const int maxn = 1000005;int IsPrime[ maxn ],IsSpecialPrime[ maxn原创 2013-08-06 10:49:42 · 705 阅读 · 0 评论 -
POJ3283+字典树
简单的字典树 模拟一遍。。/*字典树构造字典树。*/#include#include#include#include#include#include#include#include#include#includeusing namespace std;typedef long long int64;//typedef __int64 int64;typ原创 2013-08-19 19:14:12 · 864 阅读 · 0 评论 -
POJ3282+模拟
模拟题/*模拟注意:相同一边的车有先后顺序!*/#include#include#include#include#include#include#include#include#include#includeusing namespace std;typedef long long int64;//typedef __int64 int64;typedef p原创 2013-08-19 17:43:05 · 791 阅读 · 0 评论 -
POJ2350
难题做不来。。只好写水题。。/*Easy*/#include#include#include#include#include#include#include#include#include#includeusing namespace std;typedef long long int64;//typedef __int64 int64;typedef pair原创 2013-08-19 16:02:57 · 813 阅读 · 0 评论 -
HDU4551
简单。/*简单题*/#include#include#include#include#include#include#include#includeusing namespace std;typedef long long ll;//typedef __int64 int64;const int maxn = 105;const int inf = 0x7ffff原创 2013-08-09 21:25:08 · 961 阅读 · 0 评论 -
HDU4608+简单题
/*AC&Simple*/#include#include#include#include#include#include#include#includeusing namespace std;typedef long long ll;//typedef __int64 int64;const int maxn = 110005;const int inf = 0x7原创 2013-08-10 15:29:49 · 814 阅读 · 0 评论 -
POJ2527+多项式除法
模拟一遍即可。注意一些特殊情况,见代码。#include#include#include#include#includeusing namespace std;const int maxn = 10005;struct Ploy{ int cnt;//项的数目 int coe[ maxn ];//各项系数 int exp[ maxn ];/原创 2013-08-24 22:08:36 · 915 阅读 · 0 评论 -
HDU2698+字符串
不懂。。sort位置不同就是不同的结果。。。/*字符串处理*/#include#include#include#include#include#include#include#include#include#include#includeusing namespace std;typedef long long int64;//typedef __int64原创 2013-08-13 14:09:35 · 986 阅读 · 0 评论 -
HDU2699+Easy
简单题。/**/#include#include#include#include#include#include#include#include#include#includeusing namespace std;typedef long long int64;//typedef __int64 int64;typedef pair PII;#define原创 2013-08-13 22:35:07 · 1039 阅读 · 1 评论 -
HDU1437—模拟
简单的模拟题。枚举中间可能出现的天气。#include#include#includeconst int maxn = 1005;double mat[ 5 ][ 5 ];void solve( int L,int R,int n ){ double ans[ 5 ],tp[ 5 ]; double res = 0; for( int i=1;i<=n;原创 2013-11-20 11:52:09 · 1137 阅读 · 0 评论