CF 439D(251D题)Devu and his Brother】的更多相关文章

Devu and his Brother time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Devu and his brother love each other a lot. As they are super geeks, they only like to play with arrays. They are given…
D. Devu and his Brother time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Devu and his brother love each other a lot. As they are super geeks, they only like to play with arrays. They are giv…
题目链接:点击打开链接 = - =曾经的三分姿势不对竟然没有被卡掉,,,太逗.. #include<iostream> #include<string> #include<algorithm> #include<cstdlib> #include<cstdio> #include<set> #include<map> #include<vector> #include<cstring> #inclu…
题目链接:http://codeforces.com/contest/798/problem/B 此题是我打河工大校赛前一晚熬夜打CF时硬肛过去的B题,今天补题时,偶然看到dalao的代码,ORZ,string和find函数的用法学到了.啦啦啦 虽然,那天现场赛炸了,但并不影响我的可爱呀,略略略!! #include<string> #include<cstdio> #include<iostream> using namespace std; int main() {…
题目是来自HZW的博客(构造题我是各种不会...) Solved 1 / 1 A CodeForces 500A New Year Transportation Solved 1 / 1 B CodeForces 437C The Child and Toy Solved 1 / 2 C CodeForces 510C Fox And Names Solved 1 / 3 D CodeForces 475B Strongly Connected City Solved 1 / 2 E CodeF…
Description: 遇到了ogo可以变成***如果ogo后面有go统统忽略,输出结果 Solution: 哎如果我一开始对题意的解读如上的话,就不会被整的那么麻烦了 Code: #include <iostream> #include <cstdio> #include <cstring> using namespace std; const int maxn = 150; /***找到一个题目的规律,做题的方法是多么的重要!!***/ /***以后没有好的方法,…
Description: 1 - n个数问你能否经过加减乘除这些运算n -1次的操作得到24 Solutrion: 一开始想暴力递推,发现n的范围太大直接否决,也否决了我的跑dfs,后来就像肯定有个递推规律,然后从1 - n模拟下,1-3直接no,发现4可以了,那么4 6 8 ……都可以了,就是多乘个1而已,但是模拟5的时候一时石乐志,没模拟出来,哎,就是卡脑子了,所以这个题就荣幸的写了博客 Code /* 写出4 和 5 的构造情况,对于后续的就是多乘个1 */ #include <iostr…
http://codeforces.com/problemset/problem/259/A PS9.8日做了但是忘了发博客,所以坚持3天了呦~ 终于读懂了这个题了,心累 Describe: 给你8 * 8的棋盘摆放问题,行的顺序可能是错乱的,问给你的8行是否能组成棋盘 Solution: 所以我们要检查的就是 1.棋盘有没有相邻的颜色相同 2.开头必须得是4 白 + 4黑(嘿嘿嘿,一开始我就是这么想的,但是!!!题目中右For that the friends can choose any r…
CF 1114A  Got Any Grapes(葡萄)? 题目意思:给三个人分葡萄,三个人对葡萄的颜色有一些要求,问所准备的三种颜色的葡萄能否满足三人的要求. 解题意思:直接按条件判断即可. #include<cstdio> #include<cmath> #include<cstring> #define ll long long int using namespace std; int main() { int x,y,z; int g,p,b; ; scanf(…
CF 1108A Two distinct points 题目意思:给你两个线段的起点和终点,让你给出两个不同的点,这两点分别处于两个不同的线段之中.解题思路:题目说如果存在多种可能的点,随意一组答案即可,这样其实我们只需要取最特殊的起点即可.但要注意如果起点相同,那我们需要找一个起点一个终点. #include<cstdio> #include<cmath> #include<cstring> #define ll long long int using namesp…