E - Roaming Atcoder】的更多相关文章

题解:https://blog.csdn.net/qq_40655981/article/details/104459253 题目大意:n个房间,,每个房间都有一个人,一共k天,在一天,一个人可以到任何一个房间.问n个房间一共有多少个状态. 每个人最多能选择n-1个房间,如果k>=n-1,那么结果就是C(n+m-1,n-1)类似与球盒模型,也就是C(n+n-1,n-1). 如果k<n-1,那么肯定会有n-1-k个人不能移动.我们用总的减去不满足的就行了,设有x个人不动,x~(1,n-1-k)是…
点击打开链接 如你在由一个以上AP组成的Wifi 无线网中,拿著一部WindowXP 笔记本电脑,乘著汽车在Wifi网中往来,不断通过无线卡Ping 一个目標,你会发现在无线卡过站时,掉包可以高达半分钟或以上,这不叫漫游,这是脱网后重接,在一个专业无线网中, 当一个 Wifi 无线卡过站时只会暂时中断少於数百ms,我们美其名无缝漫游,要做到无缝漫游,有两个先决条件,一是无线卡的驱动程式能处理漫游过程,二是AP之间有机制去更新网络上 Switch 的MAC table. 世上现时有些系统能做到零漫…
AtCoder Regular Contest 061 C.Many Formulas 题意 给长度不超过\(10\)且由\(0\)到\(9\)数字组成的串S. 可以在两数字间放\(+\)号. 求所有方案的数字和. 思路 \(2^{|S|-1}\)枚举加号的放置状态 代码 Many Formulas D.Snuke's Coloring 题意 在一个\(H \times W(3 \le H,W \le 10^9)\)的棋盘上,有\(N(N \le 10^5)\)个格子被染成黑色,其余格子为白色.…
链接:http://agc001.contest.atcoder.jp/tasks/agc001_c 题解(官方): We use the following well-known fact about trees.Let T be a tree, and let D be the diameter of the tree. • If D is even, there exists an vertex v of T such that for each vertex w inT, the dis…
1>------ 已启动全部重新生成: 项目: BlankCordovaApp2, 配置: Debug Android ------1>  Your environment has been set up for using Node.js 0.12.2 (ia32) and npm.1>  ------ 确保源程序包目录的程序包的全局安装正确无误: C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Exten…
我都出了F了……结果并没有出E……atcoder让我差4分上橙是啥意思啊…… C - Together 题意:把每个数加1或减1或不变求最大众数. #include<cstdio> #include<algorithm> using namespace std; int read_p,read_ca; inline int read(){ read_p=;read_ca=getchar(); ') read_ca=getchar(); +read_ca-,read_ca=getch…
D - Menagerie Time limit : 2sec / Memory limit : 256MB Score : 500 points Problem Statement Snuke, who loves animals, built a zoo. There are N animals in this zoo. They are conveniently numbered 1 through N, and arranged in a circle. The animal numbe…
在湖蓝跟衡水大佬们打的第二场atcoder,不知不觉一星期都过去了. 任意门 C - Reconciled? 题意:n只猫,m只狗排队,猫与猫之间,狗与狗之间是不同的,同种动物不能相邻排,问有多少种方案. #include<cstdio> #include<algorithm> using namespace std; ; ; int main(){ scanf("%d%d",&n,&m); if (n<m) swap(n,m); ) ;…
在雅礼和衡水的dalao们打了一场atcoder 然而窝好菜啊…… A - Shrinking 题意:定义一次操作为将长度为n的字符串变成长度n-1的字符串,且变化后第i个字母为变化前第i 或 i+1 个字母,求使整个字符串为同一字母的最少变换次数. 题解:求同一字母的最大间距(包括首尾)的最小值即可. #include<cstdio> #include<algorithm> #define MN 1111 using namespace std; int mmh=1e9; cha…
A - K-City Time limit : 2sec / Memory limit : 256MB Score : 100 points Problem Statement In K-city, there are n streets running east-west, and m streets running north-south. Each street running east-west and each street running north-south cross each…