반응형
[codeforces] A. Boy or Girl
알고리즘(Python,Java)2019. 11. 22. 02:26[codeforces] A. 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 with a beauty (he thought so). After that they talked very often and eventually they became a couple in the network. But yesterday, he came to see "her" in the real world and found out "she" is actua..

[codeforces] A. Beautiful Matrix
알고리즘(Python,Java)2019. 8. 26. 09:33[codeforces] A. Beautiful Matrix

problem 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 from left to right. In one move, you are allowed to apply one of the two following transformations to the matrix: Swap two neighboring matrix rows, that is, rows with indexes i and i + 1 fo..

[codeforces] A. Word Capitalization
알고리즘(Python,Java)2019. 8. 24. 17:51[codeforces] A. Word Capitalization

problem 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 unchanged. Input A single line contains a non-empty word. This word consists of lowercase and uppercase English letters. The length of the word will not exceed 103. Output Output the given word..

[codeforces] A. Helpful Maths
알고리즘(Python,Java)2019. 8. 24. 17:23[codeforces] A. Helpful Maths

problem 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 calculate the sum. To make the calculation easier, the sum only contains numbers 1, 2 and 3. Still, that isn't enough for Xenia. She is only beginning to count, so she can calculate a sum only if..

[codeforces] A. Football
알고리즘(Python,Java)2019. 8. 24. 16:42[codeforces] A. Football

problem 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 consisting of zeroes and ones. A zero corresponds to players of one team; a one corresponds to players of another team. If there are at least 7 players of some team standing one after another,..

[codeforces] A. Petya and Strings
알고리즘(Python,Java)2019. 8. 22. 20:32[codeforces] A. Petya and Strings

problem 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 strings lexicographically. The letters' case does not matter, that is an uppercase letter is considered equivalent to the corresponding lowercase letter. Help Petya perform the comparison. Input E..

반응형
image