上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 29 下一页
摘要: 4720: [Noip2016]换教室 Description 对于刚上大学的牛牛来说,他面临的第一个问题是如何根据实际情况申请合适的课程。在可以选择的课程中,有2n节 课程安排在n个时间段上。在第i(1≤i≤n)个时间段上,两节内容相同的课程同时在不同的地点进行,其中,牛牛预先 被安排在教室ci上 阅读全文
posted @ 2017-11-06 14:48 安月冷 阅读(165) 评论(0) 推荐(0) 编辑
摘要: 1202: [HNOI2005]狡猾的商人 Description ***姹接到一个任务,为税务部门调查一位商人的账本,看看账本是不是伪造的。账本上记录了n个月以来的收入情况,其中第i 个月的收入额为Ai(i=1,2,3...n-1,n), 。当 Ai大于0时表示这个月盈利Ai 元,当 Ai小于0时表示 阅读全文
posted @ 2017-11-05 21:58 安月冷 阅读(220) 评论(0) 推荐(0) 编辑
摘要: P3400 仓鼠窝 题目描述 萌萌哒的Created equal是一只小仓鼠,小仓鼠自然有仓鼠窝啦。 仓鼠窝是一个由n*m个格子组成的行数为n、列数为m的矩阵。小仓鼠现在想要知道,这个矩阵中有多少个子矩阵!(实际上就是有多少个子长方形嘛。)比如说有一个2*3的矩阵,那么1*1的子矩阵有6个,1*2的 阅读全文
posted @ 2017-11-05 17:20 安月冷 阅读(234) 评论(0) 推荐(0) 编辑
摘要: 2093: [Poi2010]Frog Description 一个条河无限宽,上面有n块石头,石头离左边的河岸(无限宽,右边河岸不晓得在哪)距离严格递增,现在Zxl想锻炼自己的跳跃能力(谁叫他在班里外号是鸟怪。。畸形),他在某一块石头上,想跳到离他这块石头第k远的石头上去,假如离他第k远的石头不是 阅读全文
posted @ 2017-11-05 15:03 安月冷 阅读(253) 评论(0) 推荐(0) 编辑
摘要: 三向城 灵魂画师 香子兰 阅读全文
posted @ 2017-11-03 21:52 安月冷 阅读(192) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2017-11-03 21:41 安月冷 阅读(126) 评论(0) 推荐(0) 编辑
摘要: 不会分块 #include <iostream> #include <cstdio> #include <algorithm> #include <cstring> #include <cstdlib> #include <ctime> using namespace std; const int 阅读全文
posted @ 2017-11-02 21:30 安月冷 阅读(197) 评论(0) 推荐(0) 编辑
摘要: #include #include #include #include #define N 1000010 using namespace std; int n,a[N],cnt1,cnt2; int read() { int x=0,f=1;char c=getchar(); while(c>'9'||c='0'&&c #include #include #in... 阅读全文
posted @ 2017-11-02 21:07 安月冷 阅读(252) 评论(0) 推荐(0) 编辑
摘要: /* (4,1)*(3,1)*(2,1)的话1变成2然后一直是2 2变成1然后变成3 3变成1然后变成4 4变成1 */ #include #include #include #define N 1007 using namespace std; int n,m,p,k,ans,cnt,tmp; int a[N],pos[N]; struct node{ int le... 阅读全文
posted @ 2017-11-01 21:46 安月冷 阅读(189) 评论(0) 推荐(0) 编辑
摘要: /* C(n,k) */ #include #include #include #define ll long long #define N 1000007 #define M 1000000007 using namespace std; ll n,k,ans,cnt1,cnt0; ll inv[N]={1,1},fac[N]={1,1},f[N]={1,1}; inline ... 阅读全文
posted @ 2017-11-01 21:34 安月冷 阅读(219) 评论(0) 推荐(0) 编辑
摘要: /* 辗转相除,每次计算多出现了几个数。 */ #include<iostream> #include<cstdio> #include<cstring> #include<cmath> #define ll long long using namespace std; ll a1,a2,a3,a4 阅读全文
posted @ 2017-10-31 21:58 安月冷 阅读(190) 评论(0) 推荐(0) 编辑
摘要: LI /* 没有考虑次大值有大于一个的情况 */ #include<iostream> #include<cstdio> #include<cstring> #define N 1000007 using namespace std; int n,m,ans,cnt,mx; int a[N]; in 阅读全文
posted @ 2017-10-31 21:51 安月冷 阅读(160) 评论(0) 推荐(0) 编辑
摘要: /* 可以并查集维护 可以发现,某个联通快出现大于等于2个环,一定无法分配。 有解要么一个环,要么没有环。 一个环时答案等于点数乘2(顺时针或逆时针)。 没有环是树,对于一个n个点的树,方案一定有n种(不连某个点)。 */ #include<iostream> #include<cstdio> #i 阅读全文
posted @ 2017-10-30 22:30 安月冷 阅读(212) 评论(1) 推荐(0) 编辑
摘要: P3043 [USACO12JAN]牛联盟Bovine Alliance 题目描述 Bessie and her bovine pals from nearby farms have finally decided that they are going to start connecting th 阅读全文
posted @ 2017-10-30 22:27 安月冷 阅读(374) 评论(0) 推荐(0) 编辑
摘要: 3252: 攻略 Description 题目简述:树版[k取方格数] 众所周知,桂木桂马是攻略之神,开启攻略之神模式后,他可以同时攻略k部游戏。 今天他得到了一款新游戏《XX半岛》,这款游戏有n个场景(scene),某些场景可以通过不同的选择支到达其他场景。所有场景和选择支构成树状结构:开始游戏时 阅读全文
posted @ 2017-10-30 21:26 安月冷 阅读(225) 评论(0) 推荐(0) 编辑
上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 29 下一页