Gym 100801B Black and White(构造)】的更多相关文章

题意:给定X,Y,分别表示由'.'和'@'组成的连通块的个数. 思路:假如X<Y,我们用两部分来构造这个结果,第一部分由一个'.'连通块和Y-(X-1)割'@'连通块组成,第二个部分由X-1个'.'连通块和X-1个'@'连通块组成. 其他情况同理. #include<bits/stdc++.h> using namespace std; ; int main() { freopen("black.in","r",stdin); freopen(&q…
K. Perpetuum Mobile Time Limit: 2 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/gym/100187/problem/K Description The world famous scientist Innokentiy almost finished the creation of perpetuum mobile. Its main part is the energy generator which…
H - Football BetsTime Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://acm.hust.edu.cn/vjudge/contest/view.action?cid=87493#problem/H Description While traveling to England, it is impossible not to catch the English passion for football. Almost everyon…
题意:求 n 个哈希值相同的串. 析:直接构造,通过取模来查找相同的串. 代码如下: #pragma comment(linker, "/STACK:1024000000,1024000000") #include <cstdio> #include <string> #include <cstdlib> #include <cmath> #include <iostream> #include <cstring>…
I - Infinite Improbability Drivehttp://codeforces.com/gym/241750/problem/I不断构造,先填n-1个0,然后能放1就放1,最后这个序列的长度就是(1<<n)+n-1,也就是每添加1位就要匹配出来一个. #include<iostream> #include<cstdio> #include<queue> #include<algorithm> #include<cmath…
要back的题目 目标是全绿!back一题删一题! acmm7 1003 1004 acmm8 1003 1004 sysu20181013 Stat Origin Title Solved A Gym 100624A Kingdoms   B Gym 100624B Who wants to live forever? Solved C Gym 100624C Chemist's vows   D Gym 100624D Non-boring sequences Attempted E Gym…
$$2015-2016\ ACM-ICPC,\ NEERC,\ Northern\ Subregional\ Contest$$ \(A.Alex\ Origami\ Squares\) 签到 //#pragma comment(linker, "/STACK:1024000000,1024000000") #include<bits/stdc++.h> using namespace std; int main(){ int a,b; freopen("alex…
当前文档版本:v0.16.0.post0 VMobject 继承自Mobject V的意思是向量化的,vectorized mobject fill_color=None, fill_opacity=0.0, stroke_color=None, stroke_opacity=1.0, stroke_width=DEFAULT_STROKE_WIDTH, background_stroke_color=BLACK, background_stroke_opacity=1.0, backgroun…
Problem H. Hard TestTime Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/gym/100342/attachments Description Andrew is having a hard time preparing his 239-th contest for Petrozavodsk. This time the solution to the problem is based on Di…
Problem I. Instruction 题目连接: http://codeforces.com/gym/100531/attachments Description Ingrid is a head of a big railway station and, among other duties, is responsible for routing trains to the right platforms. The station has one entrance, and there…