- 博客(62)
- 收藏
- 关注
原创 Codeforces 483B Friends and Presents (二分+数论基础知识)
题目链接:http://codeforces.com/problemset/problem/483/B#include<bits/stdc++.h>using namespace std;#define debug puts("YES");#define rep(x,y,z) for(int (x)=(y);(x)<(z);(x)++)#define ll lon...
2018-10-31 21:05:00 196
原创 UVA 11481 Arrange the Numbers (简单容斥)
#include<bits/stdc++.h>using namespace std;#define debug puts("YES");#define rep(x,y,z) for(int (x)=(y);(x)<(z);(x)++)#define ll long long#define lrt int l,int r,int rt#define lson l...
2018-10-31 11:52:56 152
原创 Codeforces 439E Devu and Birthday Celebration (容斥定理+组合)
题目链接:http://codeforces.com/problemset/problem/439/E#include<bits/stdc++.h>using namespace std;#define debug puts("YES");#define rep(x,y,z) for(int (x)=(y);(x)<(z);(x)++)#define ll lon...
2018-10-30 20:24:46 195
原创 UVA 294 Divisors (水)
#include<bits/stdc++.h>using namespace std;#define debug puts("YES");#define rep(x,y,z) for(int (x)=(y);(x)<(z);(x)++)#define ll long long#define lrt int l,int r,int rt#define lson l...
2018-10-30 17:29:25 119
原创 HDU 6415 Rikka with Nash Equilibrium (计数dp好题)
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=6415#include<bits/stdc++.h>using namespace std;#define debug puts("YES");#define rep(x,y,z) for(int (x)=(y);(x)<(z);(x)++)#define ll lon...
2018-10-30 17:10:12 157
原创 HDU 6415 K-Multiple Free set (容斥定理)*
题目链接:https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=2203#include<bits/stdc++.h>using namespace std;#define debug puts("YES");#...
2018-10-30 15:41:51 177
原创 HDU 6301 Distinct Values (贪心+维护区间)
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=6301#include<bits/stdc++.h>using namespace std;#define debug puts("YES");#define rep(x,y,z) for(int (x)=(y);(x)<(z);(x)++)#define mst(a,...
2018-10-30 09:28:49 101
原创 HDU 4678 Mine (bfs+博弈SG)
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4678#include<bits/stdc++.h>using namespace std;#define debug puts("YES");#define rep(x,y,z) for(int (x)=(y);(x)<(z);(x)++)#define ll lon...
2018-10-29 15:49:04 130
原创 HDU 4631 Sad Love Story (暴力+剪枝)
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4631#include<bits/stdc++.h>using namespace std;#define debug puts("YES");#define rep(x,y,z) for(int (x)=(y);(x)<(z);(x)++)#define ll lon...
2018-10-28 20:57:37 140
原创 HDU 6125 Free from square (状压+背包思想)*
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=6125#include<bits/stdc++.h>using namespace std;#define debug puts("YES");#define rep(x,y,z) for(int (x)=(y);(x)<(z);(x)++)#define ll lon...
2018-10-28 13:04:26 169
原创 UVA 1510 Neon Sign (计数+思维)*
题目链接:https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=4256#include<bits/stdc++.h>using namespace std;#define debug puts("YES");#...
2018-10-27 20:30:38 153
原创 UVA 10542 Hyper-drive (容斥定理+规律)*
题目链接:https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=1483#include<bits/stdc++.h>using namespace std;#define debug puts("YES");#...
2018-10-27 15:25:45 140
原创 HDU 4908 BestCoder Sequence (计数问题)水
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4908#include<bits/stdc++.h>using namespace std;#define debug puts("YES");#define rep(x,y,z) for(int (x)=(y);(x)<(z);(x)++)#define ll lon...
2018-10-27 13:53:31 108
原创 Codeforces 1066D Boxes Packing (模拟+题意。。。)
题目链接:http://codeforces.com/problemset/problem/1066/D#include<bits/stdc++.h>using namespace std;#define debug puts("YES");#define rep(x,y,z) for(int (x)=(y);(x)<(z);(x)++)#define ll lo...
2018-10-27 10:58:54 279
原创 Codeforces 1072C Cram Time (贪心)
题目链接:http://codeforces.com/problemset/problem/1072/C#include<bits/stdc++.h>using namespace std;#define debug puts("YES");#define rep(x,y,z) for(int (x)=(y);(x)<(z);(x)++)#define ll lo...
2018-10-27 07:54:10 209
原创 HDU 6149 Valley Numer II (背包+状压+滚动数组)
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=6149#include<bits/stdc++.h>using namespace std;#define debug puts("YES");#define rep(x,y,z) for(int (x)=(y);(x)<(z);(x)++)#define ll lon...
2018-10-26 20:13:40 115
原创 HDU 4666 Hyperspace (曼哈顿距离+线段树维护极值)
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4666#include<bits/stdc++.h>using namespace std;#define debug puts("YES");#define rep(x,y,z) for(int (x)=(y);(x)<(z);(x)++)#define ll lon...
2018-10-26 16:17:32 291
原创 HDU 4672 Present Day, Present Time (博弈+背包)*
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4672#include<bits/stdc++.h>using namespace std;#define debug puts("YES");#define rep(x,y,z) for(int (x)=(y);(x)<(z);(x)++)#define ll lon...
2018-10-26 15:07:39 229
原创 HDU 5117 Fluorescent (状压DP+思维)*
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5117#include<bits/stdc++.h>using namespace std;#define debug puts("YES");#define rep(x,y,z) for(int (x)=(y);(x)<(z);(x)++)#define ll lon...
2018-10-25 23:55:45 158
原创 HDU 6102 GCDispower (花样容斥+DP思维+树状数组维护)*
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=6102#include<bits/stdc++.h>using namespace std;#define debug puts("YES");#define rep(x,y,z) for(int (x)=(y);(x)<(z);(x)++)#define read(x...
2018-10-25 20:25:37 183
原创 HDU 4679 Terrorist’s destroy (树形DP+树的直径)*
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4679#include<bits/stdc++.h>using namespace std;#define debug puts("YES");#define rep(x,y,z) for(int (x)=(y);(x)<(z);(x)++)#define ll lon...
2018-10-23 18:58:27 149
原创 HDU 5011 Game(博弈水题)
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5011#include<bits/stdc++.h>using namespace std;#define debug puts("YES");#define rep(x,y,z) for(int (x)=(y);(x)<(z);(x)++)#define ll lon...
2018-10-23 12:48:53 168
原创 HDU 4994 Revenge of Nim (规律博弈)水
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4994#include<bits/stdc++.h>using namespace std;#define debug puts("YES");#define rep(x,y,z) for(int (x)=(y);(x)<(z);(x)++)#define ll lon...
2018-10-23 12:24:23 103
原创 HDU 2509 Be the Winner (Nim博弈)水
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2509#include<bits/stdc++.h>using namespace std;#define debug puts("YES");#define rep(x,y,z) for(int (x)=(y);(x)<(z);(x)++)#define ll lon...
2018-10-23 10:48:58 141
原创 HDU 5593 ZYB's Tree (树形DP)
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5593#pragma comment(linker,"/STACK:1024000000,1024000000")#include<bits/stdc++.h>using namespace std;#define debug puts("YES");#define rep(...
2018-10-19 08:32:08 173
原创 HDU 5602 Black Jack (记忆化搜索+DP)*
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5602#include<bits/stdc++.h>using namespace std;#define debug puts("YES");#define rep(x,y,z) for(int (x)=(y);(x)<(z);(x)++)#define ll lon...
2018-10-19 06:44:42 185
原创 ZOJ 3905 Cake (贪心+简单DP)
题目链接:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=3905#include<bits/stdc++.h>using namespace std;#define debug puts("YES");#define rep(x,y,z) for(int (x)=(y);(x)<(z);(x...
2018-10-18 17:45:44 205
原创 HDU 5501 The Highest Mark (贪心+背包DP)*
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5501#include<bits/stdc++.h>using namespace std;#define debug puts("YES");#define rep(x,y,z) for(int (x)=(y);(x)<(z);(x)++)#define ll lon...
2018-10-18 12:31:41 147
原创 CodeForces - 496E Distributing Parts (贪心+数据结构应用)
题目链接:http://codeforces.com/problemset/problem/496/E#include<bits/stdc++.h>using namespace std;#define debug puts("YES");#define rep(x,y,z) for(int (x)=(y);(x)<(z);(x)++)#define ll lon...
2018-10-16 16:51:13 185
原创 HDU 5611 Baby Ming and phone number (水)
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5611#include<bits/stdc++.h>using namespace std;#define debug puts("YES");#define rep(x,y,z) for(int (x)=(y);(x)<(z);(x)++)#define read(x...
2018-10-15 23:49:28 93
原创 HDU 5601 N*M bulbs (找规律)
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5601#include<bits/stdc++.h>using namespace std;#define debug puts("YES");#define rep(x,y,z) for(int (x)=(y);(x)<(z);(x)++)#define read(x...
2018-10-15 18:16:41 176
原创 HDU 5600 N bulbs(找规律水题)
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5600#include<bits/stdc++.h>using namespace std;#define debug puts("YES");#define rep(x,y,z) for(int (x)=(y);(x)<(z);(x)++)#define read(x...
2018-10-15 17:20:20 130
原创 HDU 2147 kiki's game (博弈+暴力打表)。。。
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2147#include<bits/stdc++.h>using namespace std;#define debug puts("YES");#define rep(x,y,z) for(int (x)=(y);(x)<(z);(x)++)#define read(x...
2018-10-15 16:13:42 204
原创 Codeforces Round #516 (Div. 2,B. Equations of Mathematical Magic(思维)
题目链接:http://codeforces.com/contest/1064/problem/B#include<bits/stdc++.h>using namespace std;#define debug puts("YES");#define rep(x,y,z) for(int (x)=(y);(x)<(z);(x)++)#define read(x,y...
2018-10-14 21:57:52 292
原创 Codeforces Round #516 (Div. 2,C. Oh Those Palindromes(思维水题)
题目链接:http://codeforces.com/contest/1064/problem/C#include<bits/stdc++.h>using namespace std;#define debug puts("YES");#define rep(x,y,z) for(int (x)=(y);(x)<(z);(x)++)#define read(x,y...
2018-10-14 21:52:35 252
原创 Codeforces Round #516 (Div. 2) D. Labyrinth (简单BFS)
题目链接:http://codeforces.com/contest/1064/problem/D#include<bits/stdc++.h>using namespace std;#define debug puts("YES");#define rep(x,y,z) for(int (x)=(y);(x)<(z);(x)++)#define read(x,y...
2018-10-14 21:49:45 265
原创 HDU 5984 Pocky (概率+简单微分方程)
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5984#include<bits/stdc++.h>using namespace std;#define debug puts("YES");#define rep(x,y,z) for(int (x)=(y);(x)<(z);(x)++)#define read(x...
2018-10-14 20:40:13 415
原创 HDU 5325 Crazy Bobo (树形DP+思维)*
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5325#pragma comment(linker, "/STACK:102400000,102400000")#include<cstdio>#include<cstring>#include<vector>#include<algorithm&...
2018-10-14 18:03:04 160
原创 HDU 5148 Cities (树形DP)*
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5148#include<bits/stdc++.h>using namespace std;#define debug puts("YES");#define rep(x,y,z) for(int (x)=(y);(x)<(z);(x)++)#define read(x...
2018-10-13 19:58:58 110
原创 HDU 4123 Bob’s Race (树形DP+RMQ维护极值)*
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4123#include<bits/stdc++.h>using namespace std;#define debug puts("YES");#define rep(x,y,z) for(int (x)=(y);(x)<(z);(x)++)#define read(x...
2018-10-13 16:58:05 200
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人