题目链接: E. The Values You Can Make time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Pari wants to buy an expensive chocolate from Arya. She has n coins, the value of the i-th coin is ci. The…
time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output 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 P…
E - The Values You Can Make Description 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 take a subset of her coins with sum equal to k and give it to…
E. 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 take a subset of her coins with sum equal to k and give it to Arya. Lo…
题目链接: 题目 E. The Values You Can Make time limit per test:2 seconds memory limit per test:256 megabytes 问题描述 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…
Codeforces#262_1002 B. Little Dima and Equation time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Little Dima misbehaved during a math lesson a lot and the nasty teacher Mr. Pickles gave him…
1.前言 虽然这次我依旧没有参加正式比赛,但是事后还是看了看题目的...一般不怎么刷Codeforces. A.Raising Bacteria You are a lover of bacteria. You want to raise some bacteria in a box. Initially, the box is empty. Each morning, you can put any number of bacteria into the box. And each night…
C. Polycarp at the Radio time limit per test: 2 seconds memory limit per test: 256 megabytes input: standard input output: standard output Polycarp is a music editor at the radio station. He received a playlist for tomorrow, that can be represented a…
http://acm.hust.edu.cn/vjudge/contest/view.action?cid=102271#problem/B Description Kevin Sun has just finished competing in Codeforces Round #334! The round was 120 minutes long and featured five problems with maximum point values of 500, 1000, 1500,…
Description An array of positive integers a1, a2, ..., an is given. Let us consider its arbitrary subarray al, al + 1..., ar, where 1 ≤ l ≤ r ≤ n. For every positive integer s denote by Ks the number of occurrences of s into the subarray. We call the…
Megacity Time Limit: 2000MS Memory Limit: 262144KB 64bit IO Format: %I64d & %I64u Submit Status Description The administration of the Tomsk Region firmly believes that it's time to become a megacity (that is, get population of one million). Inste…
Guess a number! Time Limit: 1000MS Memory Limit: 262144KB 64bit IO Format: %I64d & %I64u Submit Status Description A TV show called "Guess a number!" is gathering popularity. The whole Berland, the old and the young, are watching the sho…
Unusual Product Time Limit: 1000MS Memory Limit: 262144KB 64bit IO Format: %I64d & %I64u Submit Status Description Little Chris is a huge fan of linear algebra. This time he has been given a homework about the unusual square of a square matrix. T…
A. Currency System in Geraldion Time Limit: 1 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/contest/560/problem/A Description A magic island Geraldion, where Gerald lives, has its own currency system. It uses banknotes of several values. But th…
A. Lineland MailTime Limit: 2 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/contest/567/problem/A Description All cities of Lineland are located on the Ox coordinate axis. Thus, each city is associated with its position xi — a coordinate on the…
G. FacePalm Accounting Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/gym/100513/problem/G Description An owner of a small company FacePalm has recently learned that the city authorities plan to offer to small businesses to partic…
http://codeforces.com/contest/678/problem/D D. Iterated Linear Function Consider a linear function f(x) = Ax + B. Let's define g(0)(x) = x and g(n)(x) = f(g(n - 1)(x)) for n > 0. For the given integer values A, B, nand x find the value of g(n)(x) mod…
Hacking Cypher Time Limit:1000MS Memory Limit:262144KB 64bit IO Format:%I64d & %I64u Submit Status Practice CodeForces 490C Description Polycarpus participates in a competition for hacking into a new secure messenger. He's almost won. Having…
Table Decorations Time Limit:1000MS Memory Limit:262144KB 64bit IO Format:%I64d & %I64u Submit Status Practice CodeForces 478C Description You have r red, g green and b blue balloons. To decorate a single table for the banquet you need exactl…