![](https://img-blog.csdnimg.cn/20201014180756919.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
codefoces
文章平均质量分 51
聪明绝顶的你与即将秃头的我
这个作者很懒,什么都没留下…
展开
-
Watermelon
One hot summer day Pete and his friend Billy decided to buy a watermelon. They chose the biggest and the ripest one, in their opinion. After that the watermelon was weighed, and the scales showed w ki...原创 2018-04-17 19:25:30 · 899 阅读 · 0 评论 -
HQ9+
HQ9+ is a joke programming language which has only four one-character instructions: "H" prints "Hello, World!", "Q" prints the source code of the program itself, "9" prints the lyrics of "99 Bottles o...原创 2018-04-20 19:43:09 · 1367 阅读 · 0 评论 -
Boy or Girl
Those days, many boys use beautiful girls' photos as avatars in forums. So it is pretty hard to tell the gender of a user at the first glance. Last year, our hero went to a forum and had a nice chat w...原创 2018-04-20 20:04:49 · 944 阅读 · 0 评论 -
Soldier and Bananas
A soldier wants to buy w bananas in the shop. He has to pay k dollars for the first banana, 2k dollars for the second one and so on (in other words, he has to pay i·k dollars for the i-th banana). He ...原创 2018-04-20 20:13:17 · 192 阅读 · 0 评论 -
Lucky Division
Petya loves lucky numbers. Everybody knows that lucky numbers are positive integers whose decimal representation contains only the lucky digits 4 and 7. For example, numbers 47, 744, 4 are lucky and 5...原创 2018-04-20 20:29:29 · 386 阅读 · 0 评论 -
Twins
Imagine that you have a twin brother or sister. Having another person that looks exactly like you seems very unusual. It's hard to say if having something of an alter ego is good or bad. And if you do...原创 2018-04-21 09:11:26 · 445 阅读 · 0 评论 -
Taxi
After the lessons n groups of schoolchildren went outside and decided to visit Polycarpus to celebrate his birthday. We know that the i-th group consists of si friends (1 ≤ si ≤ 4), and they want to g...原创 2018-04-21 13:49:17 · 526 阅读 · 0 评论 -
Young Physicist
A guy named Vasya attends the final grade of a high school. One day Vasya decided to watch a match of his favorite hockey team. And, as the boy loves hockey very much, even more than physics, he forgo...原创 2018-04-25 15:07:27 · 212 阅读 · 1 评论 -
George and Accommodation
George has recently entered the BSUCP (Berland State University for Cool Programmers). George has a friend Alex who has also entered the university. Now they are moving into a dormitory. George and Al...原创 2018-04-25 15:22:08 · 148 阅读 · 0 评论 -
Nearly Lucky Number
Petya loves lucky numbers. We all know that lucky numbers are the positive integers whose decimal representations contain only the lucky digits 4 and 7. For example, numbers 47, 744, 4 are lucky and 5...原创 2018-04-25 16:14:02 · 237 阅读 · 0 评论 -
Presents
原题http://codeforces.com/contest/136/problem/A这道题拿例一来说Input42 3 4 1(对其编号从1-4)对2 3 4 1从大到小排序, 排序完之后是1 2 3 4它们的原编号是4 1 2 3。#include<stdio.h>#include<string.h>#include<algori...原创 2018-07-30 16:21:56 · 224 阅读 · 0 评论 -
Insomnia cure
原题目链接http://codeforces.com/contest/148/problem/A题目大意就是说有个公主失眠所以数龙睡觉,一共经过d个龙,第k个龙被锅砸,第l个龙尾巴被夹,第m个龙爪子受伤,第n个龙叫了老妈,问有多少个龙经受身体和心里上的摧残。简而言之就是求倍数是k,l,m,n的个数。#include<stdio.h>#include<string....原创 2018-07-30 16:27:17 · 534 阅读 · 0 评论 -
Expression
原题目链接http://codeforces.com/contest/479/problem/A题目大意是给三个数字a,b,c中间插入运算符+或*,求算出的最大值,注意它说abc位置是不能换的,所以情况一共就六种a+b+c a*b*ca+b*ca*b+c(a+b)*ca*(b+c)列出情况计算最大值即可#include<stdio.h>#incl...原创 2018-07-30 16:32:12 · 195 阅读 · 0 评论 -
Beautiful Year
原题目链接http://codeforces.com/contest/271/problem/A这道题题目大意就是让你找比它大的最小年份,且各个位的数字不一样,拿1987来说,+1就是1988,88重复不符合题意接着+1,1989,两个9又重了,以此类推直到找到大于它的最小年份2013.我用了两个方法,不过思路都是一样的:方法一:(因为看到题目说年份在1000到9000之间,不过不能设在1...原创 2018-07-30 16:38:04 · 641 阅读 · 0 评论 -
Tram
Linear Kingdom has exactly one tram line. It has n stops, numbered from 1 to n in the order of tram's movement. At the i-th stop ai passengers exit the tram, while bi passengers enter it. The tram is ...原创 2018-04-18 21:44:28 · 933 阅读 · 0 评论 -
Helpful Maths
Xenia the beginner mathematician is a third year student at elementary school. She is now learning the addition operation.The teacher has written down the sum of multiple numbers. Pupils should calcul...原创 2018-04-18 19:26:22 · 587 阅读 · 0 评论 -
Way Too Long Words
Sometimes some words like "localization" or "internationalization" are so long that writing them many times in one text is quite tiresome.Let's consider a word too long, if its length is strictly more...原创 2018-04-17 19:25:24 · 614 阅读 · 0 评论 -
Next Round
"Contestant who earns a score equal to or greater than the k-th place finisher's score will advance to the next round, as long as the contestant earns a positive score..." — an excerpt from contest ru...原创 2018-04-17 19:25:45 · 430 阅读 · 0 评论 -
cAPS lOCK
wHAT DO WE NEED cAPS LOCK FOR?Caps lock is a computer keyboard key. Pressing it sets an input mode in which typed letters are capital by default. If it is pressed by accident, it leads to accidents li...原创 2018-04-17 19:25:15 · 884 阅读 · 0 评论 -
Theatre Square
Theatre Square in the capital city of Berland has a rectangular shape with the size n × m meters. On the occasion of the city's anniversary, a decision was taken to pave the Square with square granite...原创 2018-04-17 19:25:03 · 500 阅读 · 0 评论 -
String Task
Petya started to attend programming lessons. On the first lesson his task was to write a simple program. The program was supposed to do the following: in the given string, consisting if uppercase and ...原创 2018-04-17 19:23:04 · 799 阅读 · 0 评论 -
Domino piling
You are given a rectangular board of M × N squares. Also you are given an unlimited number of standard domino pieces of 2 × 1 squares. You are allowed to rotate the pieces. You are asked to place as m...原创 2018-04-17 19:52:39 · 775 阅读 · 0 评论 -
Football
Petya loves football very much. One day, as he was watching a football match, he was writing the players' current positions on a piece of paper. To simplify the situation he depicted it as a string co...原创 2018-04-18 14:10:27 · 431 阅读 · 0 评论 -
Petya and Strings
Little Petya loves presents. His mum bought him two strings of the same size for his birthday. The strings consist of uppercase and lowercase Latin letters. Now Petya wants to compare those two string...原创 2018-04-18 15:08:48 · 434 阅读 · 0 评论 -
Team
One day three best friends Petya, Vasya and Tonya decided to form a team and take part in programming contests. Participants are usually offered several problems during programming contests. Long befo...原创 2018-04-18 15:52:45 · 314 阅读 · 0 评论 -
Stones on the Table
There are n stones on the table in a row, each of them can be red, green or blue. Count the minimum number of stones to take from the table so that any two neighboring stones had different colors. Sto...原创 2018-04-18 16:39:41 · 299 阅读 · 0 评论 -
Word Capitalization
Capitalization is writing a word with its first letter as a capital letter. Your task is to capitalize the given word.Note, that during capitalization all the letters except the first one remains unch...原创 2018-04-18 17:00:22 · 449 阅读 · 0 评论 -
Beautiful Matrix
You've got a 5 × 5 matrix, consisting of 24 zeroes and a single number one. Let's index the matrix rows by numbers from 1 to 5 from top to bottom, let's index the matrix columns by numbers from 1 to 5...原创 2018-04-08 18:51:54 · 410 阅读 · 2 评论 -
Bit++
The classic programming language of Bitland is Bit++. This language is so peculiar and complicated.The language is that peculiar as it has exactly one variable, called x. Also, there are two operation...原创 2018-04-18 18:27:15 · 482 阅读 · 0 评论 -
Translation
原题目链接: http://codeforces.com/problemset/problem/41/A就是简单地比较正序逆序是否一样=-=没什么好说的了#include<stdio.h>#include<string.h>int main(){ char str1[106],str2[106]; int len1,len2,flag; ...原创 2018-07-30 16:40:59 · 355 阅读 · 0 评论