codeforce A. 2Char(水题,暴力)】的更多相关文章

Counterfeit Dollar Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 35774   Accepted: 11390 Description Sally Jones has a dozen Voyageur silver dollars. However, only eleven of the coins are true silver dollars; one coin is counterfeit ev…
A. Wet Shark and Odd and Even time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Today, Wet Shark is given n integers. Using any of these integers no more than once, Wet Shark wants to get ma…
今晚发了个蛇精病,然后CF了,第一题这好难啊,然而水题一个,暴力飘过. 链接http://codeforces.com/contest/593/problem/A: 题意比较难懂吗?傻逼百度都翻译不对,更别说我这22了,但后来还是看懂了,没办法,就这么任性. 题意是给你N个串,然后让你选这选串中的几个要求是最后有这几个串组成的串就只有最多两个不同的字符构成,并且要最长. 那么开始分析,因为就26个因为字母爆力求一下枚举不同组合就行了,然后再从所给的字串中找符合要求的字串,用maxx记录最大值,开…
Description Farmer John最近发明了一个游戏,来考验自命不凡的贝茜.游戏开始的时 候,FJ会给贝茜一块画着N (2 <= N <= 200)个不重合的点的木板,其中第i个点 的横.纵坐标分别为X_i和Y_i (-1,000 <= X_i <=1,000: -1,000 <= Y_i <= 1,000). 贝茜可以选两个点画一条过它们的直线,当且仅当平面上不存在与画出直线 平行的直线.游戏结束时贝茜的得分,就是她画出的直线的总条数.为了在游戏 中胜出,…
题意:给定 n 和 k,然后是 n 个数,表示1-k的一个值,问你修改最少的数,使得所有的1-k的数目都等于n/k. 析:水题,只要用每个数减去n/k,然后取模,加起来除以2,就ok了. 代码如下: #pragma comment(linker, "/STACK:1024000000,1024000000") #include <cstdio> #include <string> #include <cstdlib> #include <cma…
http://wikioi.com/problem/1229/ 赤裸裸的水题啊. 一开始我认为不用用完全部的牌,以为爆搜会tle.. 可是我想多了. 将所有状态全部求出,排序后暴力判断即可. (水题有点严重啊) #include <cstdio> #include <algorithm> using namespace std; int n, m; int h[440000], cnt, a[12]; bool vis[12]; void dfs(int x, int sum, i…
Friendship of Frog Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://acm.hdu.edu.cn/showproblem.php?pid=5578 Description N frogs from different countries are standing in a line. Each country is represented by a lowercase letter. The distance betwee…
实在没忍住就去打比赛了然后一耗就是一天 最后Rank19还是挺好的(要不是乐多赛不然炸飞),这是唯一一套在Luogu上号称水题大赛的而实际上真的是水题大赛的比赛 好了我们开始看题 T1 八百标兵奔北坡 首先看到这道题你要先仔细想一想切比雪夫距离是什么 我们更加形象地理解一下就会知道这是一个等腰三角形(算了还是看图吧,对于红色的格子,所有黄色的格子对于它都在北面): 然后仔细看一下就发现每一个点可以设计一个DP的思想(类似于过河卒): \(f_{i,j}=0(if\ (i,j)\ is\ a\ m…
为什么是水题选做呢?因为我只会水题啊 ( 为什么是$Atcoder$呢?因为暑假学长来讲课的时候讲了三件事:不要用洛谷,不要用dev-c++,不要用单步调试.$bzoj$太难了,$Topcoder$整了好久没学会用,中国人要长期打$codeforces$那作息简直反人类,所以就选到$atcoder$啦.而且$AT$的英语感觉比较好懂,或许是因为都是亚洲人,思维比较同步? 那么哪些题目会被放到这个地方呢?$ABC$的后两题,也就是$ARC$的前两题(如果同时举办的话).至于$ARC$的后两题以及$…
A. Checking the Calendar 题目连接: http://codeforces.com/contest/724/problem/A Description You are given names of two days of the week. Please, determine whether it is possible that during some non-leap year the first day of some month was equal to the f…