codeforces A.Vacations

Vasya has n days of vacations! So he decided to improve his IT skills and do sport. Vasya knows the following information about each of this n days...

2016-08-31 23:55:42

阅读数:140

评论数:0

codeforces C.Coloring Trees

ZS the Coder and Chris the Baboon has arrived at Udayland! They walked in the park where n trees grow. They decided to be naughty and color the tre...

2016-08-31 20:24:43

阅读数:293

评论数:0

codeforces 687A - NP-Hard Problem(dfs

Recently, Pari and Arya did some research about NP-Hard problems and they found the minimum vertex cover problem very interesting. Suppose the gra...

2016-08-26 11:15:19

阅读数:251

评论数:0

codeforces Codeforces Round #363 (Div. 2) One Bomb

You are given a description of a depot. It is a rectangular checkered field of n × m size. Each cell in a field can be empty (".") or it ...

2016-08-25 16:08:48

阅读数:195

评论数:0

codeforces AIM Tech Round 3 (Div. 2) B. Checkpoints

Vasya takes part in the orienteering competition. There are n checkpoints located along the line at coordinates x1, x2, ..., xn. Vasya starts at th...

2016-08-25 13:18:30

阅读数:377

评论数:0

codeforces 687C - The Values You Can Make(背包+滚动数组)

Pari wants to buy an expensive chocolate from Arya. She has n coins, the value of the i-th coin is ci. The price of the chocolate is k, so Pari will ...

2016-08-25 11:17:50

阅读数:323

评论数:0

codeforces 710D Two Arithmetic Progressions

You are given two arithmetic progressions: a1k + b1 and a2l + b2. Find the number of integers x such that L ≤ x ≤ R andx = a1k' + b1 = a2l' + b2, f...

2016-08-24 01:17:32

阅读数:432

评论数:0

codeforces 710C Magic Odd Square

Find an n × n matrix with different numbers from 1 to n2, so the sum in each row, column and both main diagonals are odd. Input The only ...

2016-08-23 00:34:04

阅读数:387

评论数:0

Codeforces Round #365 (Div. 2) D. Mishka and Interesting sum(精简的代码)

Little Mishka enjoys programming. Since her birthday has just passed, her friends decided to present her with array of non-negative integers a1, a2, ...

2016-08-22 17:35:24

阅读数:278

评论数:0

codeforces 689A Mike and Cellphone(模拟)

While swimming at the beach, Mike has accidentally dropped his cellphone into the water. There was no worry as he bought a cheap replacement phone wi...

2016-08-22 15:43:58

阅读数:220

评论数:0

codeforces 681C Heap Operations

Petya has recently learned data structure named "Binary heap". The heap he is now operating with allows the following operations: p...

2016-08-21 22:07:28

阅读数:234

评论数:0

codeforces 701C They Are Everywhere(尺取法)

Sergei B., the young coach of Pokemons, has found the big house which consists of n flats ordered in a row from left to right. It is possible to en...

2016-08-21 14:31:13

阅读数:254

评论数:0

codeforces 707C Pythagorean Triples

Katya studies in a fifth grade. Recently her class studied right triangles and the Pythagorean theorem. It appeared, that there are triples of positi...

2016-08-21 11:02:18

阅读数:302

评论数:0

codeforces 707B - Bakery

Masha wants to open her own bakery and bake muffins in one of the n cities numbered from 1 to n. There are m bidirectional roads, each of whose con...

2016-08-21 09:25:18

阅读数:224

评论数:0

codeforces 702C Cellular Network

You are given n points on the straight line — the positions (x-coordinates) of the cities and m points on the same line — the positions (x-coordina...

2016-08-20 20:20:58

阅读数:311

评论数:0

codeforces 702B - Powers of Two

You are given n integers a1, a2, ..., an. Find the number of pairs of indexes i, j (i j) that ai + aj is a power of 2 (i. e. some integer xexis...

2016-08-20 20:16:40

阅读数:202

评论数:0

Codeforces Round #367 (Div. 2) D Vasiliy's Multiset(查找树)

Author has gone out of the stories about Vasiliy, so here is just a formal task description. You are given q queries and a multiset A, initially...

2016-08-19 15:52:29

阅读数:248

评论数:0

codeforces 706C Hard problem

Vasiliy is fond of solving different tasks. Today he found one he wasn't able to solve himself, so he asks you to help. Vasiliy is given n strings...

2016-08-19 08:57:58

阅读数:219

评论数:0

FOJ 1018 Maximal Sum(三维子矩最大和)

Problem 1018 Maximal Sum Accept: 339    Submit: 904 Time Limit: 1000 mSec    Memory Limit : 32768 KB Problem Description Given a cube of positi...

2016-08-16 11:14:42

阅读数:303

评论数:0

FOJ Playing with Calculator (模运算)

Problem Description Pete is playing a game. He types on a calculator a natural number K and then presses the '+' key. The display still shows K. P...

2016-08-15 22:12:51

阅读数:197

评论数:0

提示
确定要删除当前文章?
取消 删除
关闭
关闭