Codeforces Round #195 (Div. 2)】的更多相关文章

水题,注意数据范围即可 #include <iostream> #include <algorithm> #include <utility> using namespace std; typedef pair<int,int> Point; int main(){ int x,y; cin >> x >>y; Point a,b; if((x>0 && y > 0) || (x < 0 &&…
这场CF,脑子乱死啊...C题,搞了很长时间,结束了,才想到怎么做.B题,没看,D题,今天看了一下,很不错的组合题. 如果n和m都挺多的时候 以下情况都是变为1,根据偶数个0,最后将会为1,奇数个0,最后变为0,以1开头,全都是0. 0 1.. 0 0 0 1.... 0 0 0 0 0 1.... 总的情况是C(n+m,m),算1也可以算出来.注意m = 1的时候特判,0的时候,我也全写的特判. 10^5的组合数,用费马小定理求逆元.看了下题解,题解直接来了个逆元.. inv(a) = a^(…
记次CF吧 1题...B题..因为循环的i没设成long long 却参与了运算 结果就悲剧了 一直交 一直挂 ..上题 A 水.. 第一次少了个空格还.. #include <iostream> #include<cstdio> #include<cstring> #include<stdlib.h> #include<algorithm> using namespace std; #define LL long long LL x,y; in…
太困了于是没做...第二天看题蘑菇题居多就只切了简单的两个... A:直接输出... int main() { //FIN; //FOUT; int x,y; cin>>x>>y; int q = abs(abs(x) + abs(y)); && y > ) cout<<"<<endl; && y > ) cout<<-q<<"<<" 0 "…
Codeforces Round #366 (Div. 2) A I hate that I love that I hate it水题 #I hate that I love that I hate it n = int(raw_input()) s = "" a = ["I hate that ","I love that ", "I hate it","I love it"] for i in ran…
Codeforces Round #354 (Div. 2) Problems     # Name     A Nicholas and Permutation standard input/output 1 s, 256 MB    x3384 B Pyramid of Glasses standard input/output 1 s, 256 MB    x1462 C Vasya and String standard input/output 1 s, 256 MB    x1393…
直达–>Codeforces Round #368 (Div. 2) A Brain’s Photos 给你一个NxM的矩阵,一个字母代表一种颜色,如果有”C”,”M”,”Y”三种中任意一种就输出”#Color”,如果只有”G”,”B”,”W”就输出”#Black&White”. #include <cstdio> #include <cstring> using namespace std; const int maxn = 200; const int INF =…
 cf之路,1,Codeforces Round #345 (Div. 2) ps:昨天第一次参加cf比赛,比赛之前为了熟悉下cf比赛题目的难度.所以做了round#345连试试水的深浅.....       其实这个应该是昨天就写完的,不过没时间了,就留到了今天.. 地址:http://codeforces.com/contest/651/problem/A A. Joysticks time limit per test 1 second memory limit per test 256…
Codeforces Round #279 (Div. 2) 做得我都变绿了! Problems     # Name     A Team Olympiad standard input/output 1 s, 256 MB  x2377 B Queue standard input/output 2 s, 256 MB  x1250 C Hacking Cypher standard input/output 1 s, 256 MB  x740 D Chocolate standard in…
Codeforces Round #262 (Div. 2) 1003 C. Present time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Little beaver is a beginner programmer, so informatics is his favorite subject. Soon his info…