A. Cows and Primitive Roots

time limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputThe cows have just learned what a primitive root is! Given a prime p, a primitive root  is an integer x (1 ≤ x < p) such that none of integers x 

A. Football

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

B. Coins

time limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputIn Berland a money reform is being prepared. New coins are being introduced. After long economic calculations was decided that the most expensive

A. Arrival of the General

time limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputA Ministry for Defense sent a general to inspect the Super Secret Military Squad under the command of the Colonel SuperDuper. Having learned the

A. Irrational problem

time limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputLittle Petya was given this problem for homework:You are given function  (here  represents the operation of taking the remainder). His task is to

A. Is your horseshoe on the other hoof?

time limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputValera the Horse is going to the party with friends. He has been following the fashion trends for a while, and he knows that it is very popular to

B. Before an Exam

time limit per test1 secondmemory limit per test64 megabytesinputstandard inputoutputstandard outputTomorrow Peter has a Biology exam. He does not like this subject much, but d days ago he learnt that he would have to take this exam. Peter's strict

B. Queue at the School

time limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputDuring the break the schoolchildren, boys and girls, formed a queue of n people in the canteen. Initially the children stood in the order they

B. Lucky String

time limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputPetya loves lucky numbers. We all know that lucky numbers are the positive integers whose decimal representations contain only the lucky

A. Stones on the Table

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

A. Comparing Strings

time limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputSome dwarves that are finishing the StUDY (State University for Dwarven Youngsters) Bachelor courses, have been told "no genome, no degree". That

A. Lunch Rush

time limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputHaving written another programming contest, three Rabbits decided to grab some lunch. The coach gave the team exactly ktime units for the lunch

A. Chat room

time limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputVasya has recently learned to type and log on to the Internet. He immediately entered a chat room and decided to say hello to everybody. Vasya

B. Vasya’s Calendar

time limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputVasya lives in a strange world. The year has n months and the i-th month has ai days. Vasya got a New Year present — the clock that shows not only

A. Perfect Permutation

time limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputA permutation is a sequence of integers p1, p2, ..., pn, consisting of n distinct positive integers, each of them doesn't exceedn. Let's denote the 

B. Unlucky Ticket

time limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputEach of you probably has your personal experience of riding public transportation and buying tickets. After a person buys a ticket (which

A. Fancy Fence

time limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputEmuskald needs a fence around his farm, but he is too lazy to build it himself. So he purchased a fence-building robot.He wants the fence to be a

A. Wizards and Demonstration

time limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputSome country is populated by wizards. They want to organize a demonstration.There are n people living in the city, x of them are the wizards who

A. System of Equations

time limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputFurik loves math lessons very much, so he doesn't attend them, unlike Rubik. But now Furik wants to get a good mark for math. For that Ms. Ivanova,

A. I_love_%username%

time limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputVasya adores sport programming. He can't write programs but he loves to watch the contests' progress. Vasya even has a favorite coder and Vasya

總頁數: 61357 1 .... 19716 19717 19718 19719 19720 .... 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.