반응형
[codeforces] A. Bit++
알고리즘(Python,Java)2019. 8. 22. 18:20[codeforces] A. Bit++

problem 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 operations: Operation ++ increases the value of variable x by 1. Operation -- decreases the value of variable x by 1. A statement in language Bit++ is a sequence, consisting of exactly one operation..

[codeforces] A. Domino piling
알고리즘(Python,Java)2019. 8. 22. 17:34[codeforces] A. Domino piling

problem 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 many dominoes as possible on the board so as to meet the following conditions: 1. Each domino completely covers two squares. 2. No two dominoes overlap. 3. Each domino lies entirely inside th..

[codeforces] A. Team
알고리즘(Python,Java)2019. 8. 22. 16:26[codeforces] A. Team

problem 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 before the start the friends decided that they will implement a problem if at least two of them are sure about the solution. Otherwise, the friends won't write the problem's solution. This conte..

[codeforces] A. String Task
알고리즘(Python,Java)2019. 8. 21. 20:34[codeforces] A. String Task

problem 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 lowercase Latin letters, it: deletes all the vowels, inserts a character "." before each consonant, replaces all uppercase consonants with corresponding lowercase ones. Vowels are letters "A..

[codeforces] A. Next Round
알고리즘(Python,Java)2019. 8. 21. 19:12[codeforces] A. Next Round

problem "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 rules. A total of n participants took part in the contest (n ≥ k), and you already know their scores. Calculate how many participants will advance to the next round. using language : python3 N..

[Codeforces]A. Way Too Long Words
알고리즘(Python,Java)2019. 8. 18. 19:33[Codeforces]A. Way Too Long Words

problem 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 than 10 characters. All too long words should be replaced with a special abbreviation. This abbreviation is made like this: we write down the first and the last letter of a word and betwee..

반응형
image