A. Cakeminator

time limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou are given a rectangular cake, represented as an r × c grid. Each cell either has an evil strawberry, or is empty. For example, a 3 × 4 cake may

A. Double Cola

time limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputSheldon, Leonard, Penny, Rajesh and Howard are in the queue for a "Double Cola" drink vending machine; there are no other people in the queue. The

A. Winner

time limit per test1 secondmemory limit per test64 megabytesinputstandard inputoutputstandard outputThe winner of the card game popular in Berland "Berlogging" is determined according to the following rules. If at the end of the game there is only

A. Boys and Girls

time limit per test1 secondmemory limit per test256 megabytesinputinput.txtoutputoutput.txtThere are n boys and m girls studying in the class. They should stand in a line so that boys and girls alternated there as much as possible. Let's assume that

B. Road Construction

time limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputA country has n cities. Initially, there is no road in the country. One day, the king decides to construct some roads connecting pairs of cities.

A. Slightly Decreasing Permutations

time limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputPermutation p is an ordered set of integers p1,  p2,  ...,  pn, consisting of n distinct positive integers, each of them doesn't exceed n. We'll

A. Tram

time limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputLinear 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 aipassengers exit

A. Petr and Book

time limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputOne Sunday Petr went to a bookshop and bought a new book on sports programming. The book had exactly n pages.Petr decided to start reading it

A. Down the Hatch!

time limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputEverybody knows that the Berland citizens are keen on health, especially students. Berland students are so tough that all they drink is orange

B. Opposites Attract

time limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputEverybody knows that opposites attract. That is the key principle of the "Perfect Matching" dating agency. The "Perfect Matching" matchmakers have

A. Epic Game

time limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputSimon and Antisimon play a game. Initially each player receives one fixed positive integer that doesn't change throughout the game. Simon receives

A. Wasted Time

time limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputMr. Scrooge, a very busy man, decided to count the time he wastes on all sorts of useless stuff to evaluate the lost profit. He has already counted

A. Panoramix’s Prediction

time limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputA prime number is a number which has exactly two distinct divisors: one and itself. For example, numbers 2, 7, 3 are prime, and 1, 6, 4 are not.The

A. String Task

time limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputPetya started to attend programming lessons. On the first lesson his task was to write a simple program. The program was supposed to do the

A. cAPS lOCK

time limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputwHAT 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.

A. Cupboards

time limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputOne foggy Stockholm morning, Karlsson decided to snack on some jam in his friend Lillebror Svantenson's house. Fortunately for Karlsson, there wasn'

A. Two Bags of Potatoes

time limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputValera had two bags of potatoes, the first of these bags contains x (x ≥ 1) potatoes, and the second — y (y ≥ 1) potatoes. Valera — very scattered

B. Books

time limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputWhen Valera has got some free time, he goes to the library to read some books. Today he's got t free minutes to read. That's why Valera

A. Domino piling

time limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou are given a rectangular board of M × N squares. Also you are given an unlimited number of standard domino pieces of 2 × 1squares. You are

B. Little Girl and Game

time limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputThe Little Girl loves problems on games very much. Here's one of them.Two players have got a string s, consisting of lowercase English letters.

總頁數: 61357 1 .... 19712 19713 19714 19715 19716 .... 61357 Go to: 前往

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.