就是一个组合数水题 偷个图 去掉阴影部分  把整个图看成上下两个矩形 对于上面的矩形求出起点到每个绿点的方案 对于下面的矩形 求出每个绿点到终点的方案 上下两个绿点的方案相乘后相加 就是了 想想为什么 #include <iostream> #include <cstdio> #include <sstream> #include <cstring> #include <map> #include <cctype> #include…
题目 //行开始看被吓一跳,那么大,没有头绪, //看了解题报告,发现这是一道大大大的水题,,,,,//2009 = 7 * 7 * 41//对2009分解,看它有哪些质因子,它最大的质因子是41,那么对于大于等于41的数,直接输出0就行了. #include<stdio.h> #include<string.h> #include<algorithm> using namespace std; int main() { int n; while(scanf("…
Problem Description 谁画8画的好,画的快,今后就发的快,学业发达,事业发达,祝大家发,发,发. Input 输入的第一行为一个整数N,表示后面有N组数据. 每组数据中有一个字符和一个整数,字符表示画笔,整数(>=5)表示高度. Output 画横线总是一个字符粗,竖线随着总高度每增长6而增加1个字符宽.当总高度从5增加到6时,其竖线宽度从1增长到2.下圈高度不小于上圈高度,但应尽量接近上圈高度,且下圈的内径呈正方形. 每画一个"8"应空一行,但最前和最后都无空…
水题,想想就过了 题目如下: 链接:https://ac.nowcoder.com/acm/contest/625/I来源:牛客网 攒机一时爽,一直攒机一直爽. 沉迷攒机的胡老师很快就发现,他每天只能靠吃泡面过活了.为了改善伙食,同时继续攒机大业,胡老师决定下海炒股. 胡老师有特别的炒股技巧.首先他会选定一支他看好的股票,然后永远只买这一支股票.此外,胡老师每天要么只买入股票要么只卖出股票,且出于某种不为人知的原因,胡老师手上最多只能持有 1 股的股票.胡老师每天会根据当天的股价及手上的持股数决…
题意: 给你01字符串的长度再给你一个串. 然后你可以在这个串中选择一个起点和一个终点使得这个连续区间内所有的位取反. 求: 经过处理后最多会得到多少次01变换. 例如:0101是4次,0001是2次,000110是3次. 分析: 区间内部的数目是不会发生变化的,因为每一位都是按位取反,相当于都没变,唯一发生变化的是区间边缘,所以考虑到连续的两个或多个1或者0的时候在其中某处设置断点会使得变换次数增加,很容易理解当某处有两个连续点的时候变换次数增加1,因为一个区间只有两个端点所以变换次数最多增加…
Spreadsheet Tracking Data in spreadsheets are stored in cells, which are organized in rows (r) and columns (c). Some operations on spreadsheets can be applied to single cells (r,c), while others can be applied to entire rows or columns. Typical cell…
http://arc066.contest.atcoder.jp/tasks/arc066_c?lang=en 这类题目是我最怕的,没有什么算法,但是却很难想, 这题的题解是这样的,观察到,在+号里面添加括号是没用的, 那么看看减号,任意两个相邻减号, 比如1 - 20 + 8 - 13 - 5 + 6 + 7 - 8 可以变成1 - (20 + 8 - 13) + 5 + 6 + 7 + 8 为什么后面的可以全部都变成正数呢? 因为可以这样变,1 - (20 + 8 - 13 - (5 + 6…
Por Costel and Azerah Descriptions 给你n个数 问你,有多少个子序列 的和是偶数 Example Input 233 10 124 2 Output 33 题目链接 https://vjudge.net/problem/Gym-100923A   恶心死了   freopen("azerah.in","r",stdin); freopen("azerah.out","w",stdout); 必…
Bakery Descriptions 玛莎想在从1到n的n个城市中开一家自己的面包店,在其中一个城市烘焙松饼. 为了在她的面包房烘焙松饼,玛莎需要从一些储存的地方建立面粉供应.只有k个仓库,位于不同的城市编号为a1, a2,…,ak. 不幸的是,玛莎居住的那个国家的法律禁止在任何一个有仓库的城市开设面包店.她只能在另一个n - k城市中的一个开这家店,当然,面粉配送也要付费——从仓库到面包房每走一公里,玛莎就得支付1卢布. 形式上,玛莎将支付x卢布,如果她将打开面包店在一些城市b (ai≠b每…
Ladygod Time Limit: 3000/1000MS (Java/Others)     Memory Limit: 65535/65535KB (Java/Others) Submit Status 有一天人诹Lee在随手帮女神做题,突然女神发现了自己演算纸上的一个式子,但是式子只有两个加数却没有结果,最近在学不同进制加减法的女神忘了这个两个数字是多少进制了(只记得是小于等于1010),但是她很好奇在可能的多少进制下这个式子得到的答案长度最长,为了从人赢Lee手中抢走女神,你需要快速…
A few years ago Sajjad left his school and register to another one due to security reasons. Now he wishes to find Amir, one of his schoolmates and good friends. There are n schools numerated from 1 to n. One can travel between each pair of them, to d…
题目链接:http://poj.org/problem?id=1852 题意:木板长为n,    蚂蚁数量为k,    后面k个数,依次代表蚂蚁的位置,  当蚂蚁到达边界的时候会立马掉下,当两个蚂蚁相碰面的时候,两蚂蚁各种反向走.(蚂蚁走的方向不定,但秒速度为1)   求所有蚂蚁都掉下来的最早时间和最晚时间. 思路:最早时间很容易求,就不多说了. 对于最晚时间,    对于两个蚂蚁相碰面,两个蚂蚁各自反向走,在这里可以看成两个蚂蚁方向都不变,沿着相同方向继续行走,得到的效果是一样的. AC代码:…
---恢复内容开始--- output standard output The final match of the Berland Football Cup has been held recently. The referee has shown n yellow cards throughout the match. At the beginning of the match there were a_1 players in the first team and a_2 players…
为什么是水题选做呢?因为我只会水题啊 ( 为什么是$Atcoder$呢?因为暑假学长来讲课的时候讲了三件事:不要用洛谷,不要用dev-c++,不要用单步调试.$bzoj$太难了,$Topcoder$整了好久没学会用,中国人要长期打$codeforces$那作息简直反人类,所以就选到$atcoder$啦.而且$AT$的英语感觉比较好懂,或许是因为都是亚洲人,思维比较同步? 那么哪些题目会被放到这个地方呢?$ABC$的后两题,也就是$ARC$的前两题(如果同时举办的话).至于$ARC$的后两题以及$…
题意:给你一个数,让你求需要复制粘贴多少次才能达到这个数. 析:这真是一个水题,相当水,很容易知道每次都翻倍,只要大于等于给定的数就ok了. 代码如下: #include <iostream> #include <cstdio> #include <cmath> using namespace std; int main(){ int n, kase = 0; while(scanf("%d", &n) && n >=…
Codeforces Round #258 (Div. 2) Game With Sticks A. Game With Sticks time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output After winning gold and silver in IOI 2014, Akshat and Malvika want to hav…
Hard Code Time Limit: 1 Sec Memory Limit: 256 MB 题目连接 http://acm.hust.edu.cn/vjudge/contest/view.action?cid=95149#problem/A Description Some strange code is sent to Da Shan High School. It's said to be the prophet's note. The note is extremely hard t…
Problem G.Giant ScreenTime Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://acm.hust.edu.cn/vjudge/contest/view.action?cid=86821#problem/G Description You are working in Advanced Computer Monitors (ACM), Inc. The company is building and selling giant c…
Problem Description We divide the HZNU Campus into N*M grids. As you can see from the picture below, the green grids represent the buidings. Given the size of the HZNU Campus, and the color of each grid, you should count how many green grids in the N…
前言:两题都是省选题不过水的惊人,且都可以用二分图最大匹配做哎--- 1854: [Scoi2010]游戏 Time Limit: 5 Sec  Memory Limit: 162 MBSubmit: 4725  Solved: 1854 Description lxhgww最近迷上了一款游戏,在游戏里,他拥有很多的装备,每种装备都有2个属性,这些属性的值用[1,10000]之间的数表示.当他使用某种装备时,他只能使用该装备的某一个属性.并且每种装备最多只能使用一次. 游戏进行到最后,lxhgw…
Zhuge Liang's Password Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 59    Accepted Submission(s): 47 Problem Description In the ancient three kingdom period, Zhuge Liang was the most famous a…
C. Purification time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output You are an adventurer currently journeying inside an evil temple. After defeating a couple of weak zombies, you arrived at a…
就像title说的,是昨天(2017/9/17)周赛的两道水题…… 题目链接:http://codeforces.com/problemset/problem/14/A time limit per test: 1 second memory limit per test: 64 megabytes A boy Bob likes to draw. Not long ago he bought a rectangular graph (checked) sheet with n rows and…
引子: 本以为搜索的题目老师也不会检查,结果今天早上loli慢悠悠的说:“请同学们提交一下搜索的题目~”,顿时心旌摇曳,却也只能装作镇定自若的样子,点了点头.. 然后就开始了今天的疯狂做题,虽说题目都不是太难,但题多势众啊... 刷了那么多题,小有收获,总结+复习一下,也是为了以后避免类似错误(十分直观而又影响巨大的) 所做题目链接:openjudge  2.5 题面不一一附上 1.letters 看到这道题,就想到了前几天刚刚学会的STLmap映射,然后没怎么想就敲了一遍代码,结果跑的巨慢无比…
11.9 线段树 http://acm.hdu.edu.cn/showproblem.php?pid=6315 求逆序对个数 http://acm.hdu.edu.cn/showproblem.php?pid=6318 必赢博弈 http://acm.hdu.edu.cn/showproblem.php?pid=6312 欧拉回路 http://acm.hdu.edu.cn/showproblem.php?pid=6311 好难的构造题目 http://acm.hdu.edu.cn/showpr…
https://codeforc.es/contest/1194/problem/B 好像也没什么思维,就是一个水题,不过蛮有趣的.意思是找缺黑色最少的行列十字.用O(n)的空间预处理掉一维,然后用O(n)的时间根据另一维计算出答案. #include<bits/stdc++.h> using namespace std; typedef long long ll; int n, m; string g[50005]; int rq[50005]; int main() { #ifdef Yi…
Nasty Hacks Time Limit: 3000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 3049    Accepted Submission(s): 2364 Problem Description You are the CEO of Nasty Hacks Inc., a company that creates small pieces of…
CSU 1772 漫漫上学路 Time Limit: 1000MS   Memory Limit: 131072KB   64bit IO Format: %lld & %llu Submit Status Description 对于csuxushu来说,能够在CSU(California State University)上学是他一生的荣幸.CSU校园内的道路设计的十分精巧,由n+1条水平道路和n+1条竖直道路等距交错而成,充分体现了校园深厚的文化底蕴.然而不幸的是CS市每到夏季,天降大雨,…
1050: 写一个函数,使给定的一个二维数组(3×3)转置,即行列互换 Time Limit: 1 Sec  Memory Limit: 128 MBSubmit: 154  Solved: 112[Submit][Status][Web Board] Description 写一个函数,使给定的一个二维数组(3×3)转置,即行列互换. Input 一个3x3的矩阵 Output 转置后的矩阵 Sample Input 1 2 3 4 5 6 7 8 9 Sample Output 1 4 7…
DP 水题 Description A number whose only prime factors are 2,3,5 or 7 is called a humble number. The sequence 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 14, 15, 16, 18, 20, 21, 24, 25, 27, ... shows the first 20 humble numbers. Write a program to find and print…