
noip
文章平均质量分 77
Ren_Ivan
衡中oier,fight for furture
展开
-
noip2010 引水入城 bfs+贪心
如果能够实现,每个河边的城市对应的控制区域一定是一条线段。所以直接bfs每个河边的城市,贪心线段的右端点#include#include#include#includeusing namespace std;int qx[500005],qy[500005],a[505][505],n,m,bo[505][505],ans;//队列一定要开大!!!!!! bool flag[5原创 2017-07-13 21:31:04 · 294 阅读 · 0 评论 -
noip 2015 斗地主 大爆搜!!!
反正肯定是大模拟但是每一个可以出的牌都搜一定不是最优的考虑最特殊的出牌方案:顺子(单,对,三)每一种方案再加上暴力贪心打出剩下的牌的步数#include#include#include#include#include#define N 35using namespace std;int a[N],num[N],n,T,ANS;void read(){ int原创 2017-07-31 15:01:48 · 388 阅读 · 0 评论 -
noip2011 玛雅游戏 大模拟
深搜+模拟需要剪枝:同一移动向右移了就不需要向左移了#include#include#include#include#includeusing namespace std;int n,bo[6][8],tot,a[6][6][8],b[6][3];bool boo;int print(int x){ printf("\n"); for(int i=0;i<原创 2017-07-27 21:03:46 · 552 阅读 · 0 评论