CodeForce 614B Gena's Code(水题)】的更多相关文章

B. Gena's Code 题目连接: http://www.codeforces.com/contest/614/problem/B Description It's the year 4527 and the tanks game that we all know and love still exists. There also exists Great Gena's code, written in 2016. The problem this code solves is: give…
这道题提醒我两点: 1.break时一定要检查清楚 2.字符串直接赋值一定要注意结束符,最好能用strcpy 以上是debug的惨痛教训 #include <iostream> #include <string> #include <cstring> #include <cstdlib> #include <cstdio> #include <cmath> #include <algorithm> #include <…
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…
BestCoder 2nd Anniversary: 1001.Oracle There is once a king and queen, rulers of an unnamed city, who have three daughters of conspicuous beauty. The youngest and most beautiful is Psyche, whose admirers, neglecting the proper worship of the love god…
#include <stdio.h> #include <string.h> #include <iostream> #include <algorithm> #include <math.h> using namespace std; int flag; +]; int zero; +]; bool Perfect() { int len=strlen(s); ; i<len; i++) ; ]!=; ; } int main() { f…
CODE FESTIVAL 2017 qual B B - Problem Set 确实水题,但当时没想到map,用sort后逐个比较解决的,感觉麻烦些,虽然效率高很多.map确实好写点. 用map: #include<iostream> #include<cstdio> #include<cstdlib> #include<map> using namespace std; map<int,int>mp; int main() { int n,…
B - Gena's Code It's the year 4527 and the tanks game that we all know and love still exists. There also exists Great Gena's code, written in 2016. The problem this code solves is: given the number of tanks that go into the battle from each country,…
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…
今晚发了个蛇精病,然后CF了,第一题这好难啊,然而水题一个,暴力飘过. 链接http://codeforces.com/contest/593/problem/A: 题意比较难懂吗?傻逼百度都翻译不对,更别说我这22了,但后来还是看懂了,没办法,就这么任性. 题意是给你N个串,然后让你选这选串中的几个要求是最后有这几个串组成的串就只有最多两个不同的字符构成,并且要最长. 那么开始分析,因为就26个因为字母爆力求一下枚举不同组合就行了,然后再从所给的字串中找符合要求的字串,用maxx记录最大值,开…
It's the year 4527 and the tanks game that we all know and love still exists. There also exists Great Gena's code, written in 2016. The problem this code solves is: given the number of tanks that go into the battle from each country, find their produ…