最新 最热

PAT (Advanced Level) Practice 1096 Consecutive Factors (20 分)

Among all the factors of a positive integer N, there may exist several consecutive numbers. For example, 630 can be factored as 3×5×6×7, where 5, 6, and 7 are t...

2020-09-28
1

Codeforces Round #613 (Div. 2)A. Mezo Playing Zoma

Today, Mezo is playing a game. Zoma, a character in that game, is initially at position x=0x=0. Mezo starts sending nn commands to Zoma. There are two possible ...

2020-09-28
1

PAT (Advanced Level) Practice 1049 Counting Ones (30分)

The task is simple: given any positive integer N, you are supposed to count the total number of 1's in the decimal form of the integers from 1 to N. For example...

2020-09-28
1

Codeforces Round #615 (Div. 3)A. Collecting Coins

Polycarp has three sisters: Alice, Barbara, and Cerene. They're collecting coins. Currently, Alice has aa coins, Barbara has bb coins and Cerene has cc coins. R...

2020-09-28
1

PAT (Advanced Level) Practice 1029 Median (25分)

Given an increasing sequence S of N integers, the median is the number at the middle position. For example, the median of S1 = { 11, 12, 13, 14 } is 12, and the...

2020-09-28
1

PAT (Advanced Level) Practice 1003 Emergency (25 分)

As an emergency rescue team leader of a city, you are given a special map of your country. The map shows several scattered cities connected by some roads. Amoun...

2020-09-28
1

AIM Tech Round 5 (rated, Div. 1 + Div. 2)C. Rectangles

You are given nn rectangles on a plane with coordinates of their bottom left and upper right points. Some (n−1)(n−1) of the given nn rectangles have some common...

2020-09-28
1

Codeforces Round #199 (Div. 2)C. Cupboard and Balloons

A girl named Xenia has a cupboard that looks like an arc from ahead. The arc is made of a semicircle with radius r (the cupboard's top) and two walls of height ...

2020-09-28
1

2018-2019 ICPC, NEERC, Southern Subregional Contest D. Garbage Disposal

Enough is enough. Too many times it happened that Vasya forgot to dispose of garbage and his apartment stank afterwards. Now he wants to create a garbage dispos...

2020-09-28
1

Codeforces Beta Round #72 (Div. 1 Only)B. Doctor

There are n animals in the queue to Dr. Dolittle. When an animal comes into the office, the doctor examines him, gives prescriptions, appoints tests and may app...

2020-09-28
1