12 2019 档案
摘要:链接: https://codeforces.com/contest/1270/problem/E 题意: You are given a set of n≥2 pairwise different points with integer coordinates. Your task is to p
阅读全文
摘要:链接: https://codeforces.com/contest/1270/problem/D 题意: This problem is interactive. We have hidden an array a of n pairwise different numbers (this mea
阅读全文
摘要:链接: https://codeforces.com/contest/1270/problem/C 题意: Let's call an array a1,a2,…,am of nonnegative integer numbers good if a1+a2+⋯+am=2⋅(a1⊕a2⊕⋯⊕am),
阅读全文
摘要:链接: https://codeforces.com/contest/1270/problem/B 题意: For an array a of integers let's denote its maximal element as max(a), and minimal as min(a). We
阅读全文
摘要:链接: https://codeforces.com/contest/1270/problem/A 题意: Two players decided to play one interesting card game. There is a deck of n cards, with values f
阅读全文
摘要:链接: https://codeforces.com/contest/1279/problem/D 题意: Santa Claus has received letters from n different kids throughout this year. Of course, each kid
阅读全文
摘要:链接: https://codeforces.com/contest/1279/problem/C 题意: Santa has to send presents to the kids. He has a large stack of n presents, numbered from 1 to n
阅读全文
摘要:链接: https://codeforces.com/contest/1279/problem/B 题意: New Year is coming! Vasya has prepared a New Year's verse and wants to recite it in front of San
阅读全文
摘要:链接: https://codeforces.com/contest/1279/problem/A 题意: Polycarp is sad — New Year is coming in few days but there is still no snow in his city. To brin
阅读全文
摘要:链接: https://codeforces.com/contest/1281/problem/D 题意: You are an all powerful being and you have created a rectangular world. In fact, your world is s
阅读全文
摘要:链接: https://codeforces.com/contest/1281/problem/C 题意: outputstandard output We start with a string s consisting only of the digits 1, 2, or 3. The len
阅读全文
摘要:链接: https://codeforces.com/contest/1281/problem/B 题意: Your friend Jeff Zebos has been trying to run his new online company, but it's not going very we
阅读全文
摘要:链接: https://codeforces.com/contest/1282/problem/C 题意: Petya has come to the math exam and wants to solve as many problems as possible. He prepared and
阅读全文
摘要:链接: https://codeforces.com/contest/1282/problem/B2 题意: This is the hard version of this problem. The only difference is the constraint on k — the numb
阅读全文
摘要:链接: https://codeforces.com/contest/1282/problem/A 题意: Polycarp lives on the coordinate axis Ox and travels from the point x=a to x=b. It moves uniform
阅读全文
摘要:链接: https://codeforces.com/contest/1271/problem/E 题意: At first, let's define function f(x) as follows: f(x)={x2x−1if x is evenotherwise We can see tha
阅读全文
摘要:链接: https://codeforces.com/contest/1271/problem/D 题意: You play a strategic video game (yeah, we ran out of good problem legends). In this game you con
阅读全文
摘要:链接: https://codeforces.com/contest/1271/problem/C 题意: The map of the capital of Berland can be viewed on the infinite coordinate plane. Each point wit
阅读全文
摘要:链接: https://codeforces.com/contest/1271/problem/B 题意: There are n blocks arranged in a row and numbered from left to right, starting from one. Each bl
阅读全文
摘要:链接: https://codeforces.com/contest/1271/problem/A 题意: A new delivery of clothing has arrived today to the clothing store. This delivery consists of a
阅读全文
摘要:链接: https://codeforces.com/contest/1269/problem/D 题意: You are given a Young diagram. Given diagram is a histogram with n columns of lengths a1,a2,…,an
阅读全文
摘要:链接: https://codeforces.com/contest/1269/problem/C 题意: You are given an integer x of n digits a1,a2,…,an, which make up its decimal notation in order f
阅读全文
摘要:链接: https://codeforces.com/contest/1269/problem/B 题意: You are given a positive integer m and two integer sequence: a=[a1,a2,…,an] and b=[b1,b2,…,bn].
阅读全文
摘要:链接: https://codeforces.com/contest/1269/problem/A 题意: Let's call a positive integer composite if it has at least one divisor other than 1 and itself.
阅读全文
摘要:链接: https://codeforces.com/contest/1278/problem/D 题意: As the name of the task implies, you are asked to do some work with segments and trees. Recall t
阅读全文
摘要:链接: https://codeforces.com/contest/1278/problem/C 题意: Karlsson has recently discovered a huge stock of berry jam jars in the basement of the house. Mo
阅读全文
摘要:链接: https://codeforces.com/contest/1278/problem/B 题意: You are given two integers a and b. You can perform a sequence of operations: during the first o
阅读全文
摘要:链接: https://codeforces.com/contest/1278/problem/A 题意: Polycarp has built his own web service. Being a modern web service it includes login feature. An
阅读全文
摘要:链接: http://acm.hdu.edu.cn/showproblem.php?pid=1848 题意: 任何一个大学生对菲波那契数列(Fibonacci numbers)应该都不会陌生,它是这样定义的: F(1)=1; F(2)=2; F(n)=F(n 1)+F(n 2)(n =3); 所以,
阅读全文
摘要:链接: https://codeforces.com/contest/1263/problem/E 题意: The development of a text editor is a hard problem. You need to implement an extra module for br
阅读全文
摘要:链接: https://codeforces.com/contest/1263/problem/D 题意: One unknown hacker wants to get the admin's password of AtForces testing system, to get problems
阅读全文
摘要:链接: https://codeforces.com/contest/1263/problem/C 题意: On the well known testing system MathForces, a draw of n rating units is arranged. The rating wi
阅读全文
摘要:链接: https://codeforces.com/contest/1263/problem/B 题意: A PIN code is a string that consists of exactly 4 digits. Examples of possible PIN codes: 7013,
阅读全文
摘要:链接: https://codeforces.com/contest/1263/problem/A 题意: You have three piles of candies: red, green and blue candies: the first pile contains only red c
阅读全文
摘要:链接: https://codeforces.com/contest/1272/problem/E 题意: You are given an array a consisting of n integers. In one move, you can jump from the position i
阅读全文
摘要:链接: https://codeforces.com/contest/1272/problem/D 题意: You are given an array a consisting of n integers. You can remove at most one element from this
阅读全文
摘要:链接: https://codeforces.com/contest/1272/problem/C 题意: Recently, Norge found a string s=s1s2…sn consisting of n lowercase Latin letters. As an exercise
阅读全文
摘要:链接: https://codeforces.com/contest/1272/problem/B 题意: Recently you have bought a snow walking robot and brought it home. Suppose your home is a cell (
阅读全文
摘要:链接: https://codeforces.com/contest/1272/problem/A 题意: outputstandard output Three friends are going to meet each other. Initially, the first friend st
阅读全文
摘要:链接: http://acm.hdu.edu.cn/showproblem.php?pid=2196 题意: A school bought the first computer some time ago(so this computer's id is 1). During the recent
阅读全文
摘要:链接: https://vjudge.net/problem/LightOJ 1333 题意: You have to color an M x N two dimensional grid. You will be provided K different colors for this. You
阅读全文
摘要:链接: https://vjudge.net/problem/LightOJ 1326 题意: Disky and Sooma, two of the biggest mega minds of Bangladesh went to a far country. They ate, coded an
阅读全文
摘要:链接: https://vjudge.net/problem/LightOJ 1322 题意: In Computer Science Trie or prefix tree is a data structure which is usually used to store some string
阅读全文
摘要:链接: https://vjudge.net/problem/LightOJ 1318 题意: In a country named "Ajob Desh", people play a game called "Ajob Game" (or strange game). This game is
阅读全文
摘要:链接: https://vjudge.net/problem/LightOJ 1299 题意: 考虑成,U位置的点要往后放,D位置往前放 Dp[i][j]表示处于i位置,还有j个U没有放下。 s[i] == 'D' : Dp[i][j] = Dp[i 1][j] j+Dp[i 1][j+1] (j+
阅读全文
摘要:链接: https://vjudge.net/problem/LightOJ 1246 题意: You are given a rectangular board. You are asked to draw M horizontal lines and N vertical lines in th
阅读全文
摘要:链接: https://vjudge.net/problem/LightOJ 1226 题意: OUM is a one unit machine which processes jobs. Since it can't handle heavyweight jobs; jobs needs to
阅读全文
摘要:链接: https://vjudge.net/problem/LightOJ 1173 题意: The coach of a football team, after suffering for years the adverse comments of the media about his ta
阅读全文
摘要:链接: https://vjudge.net/problem/LightOJ 1170 题意: BST is the acronym for Binary Search Tree. A BST is a tree data structure with the following propertie
阅读全文
摘要:链接: https://codeforces.com/contest/1265/problem/E 题意: Creatnx has n mirrors, numbered from 1 to n. Every day, Creatnx asks exactly one mirror "Am I be
阅读全文
摘要:链接: https://codeforces.com/contest/1265/problem/D 题意: An integer sequence is called beautiful if the difference between any two consecutive numbers is
阅读全文
摘要:链接: https://codeforces.com/contest/1265/problem/C 题意: So the Beautiful Regional Contest (BeRC) has come to an end! n students took part in the contest
阅读全文
摘要:链接: https://codeforces.com/contest/1265/problem/B 题意: You are given a permutation p=[p1,p2,…,pn] of integers from 1 to n. Let's call the number m (1≤m
阅读全文
摘要:链接: https://codeforces.com/contest/1265/problem/A 题意: A string is called beautiful if no two consecutive characters are equal. For example, "ababcb",
阅读全文
摘要:链接: https://vjudge.net/problem/SPOJ BALNUM 题意: Balanced numbers have been used by mathematicians for centuries. A positive integer is considered a bal
阅读全文
摘要:链接: https://vjudge.net/problem/HDU 4507 题意: 单身! 依然单身! 吉哥依然单身! DS级码农吉哥依然单身! 所以,他生平最恨情人节,不管是214还是77,他都讨厌! 吉哥观察了214和77这两个数,发现: 2+1+4=7 7+7=7 2 77=7 11 最终
阅读全文
摘要:链接: https://vjudge.net/problem/HDU 4734 题意: For a decimal number x with n digits (A nA n 1A n 2 ... A 2A 1), we define its weight as F(x) = A n 2 n 1
阅读全文
摘要:链接: https://vjudge.net/problem/HDU 3652 题意: A wqb number, or B number for short, is a non negative integer whose decimal form contains the sub string
阅读全文
摘要:链接: https://vjudge.net/problem/HDU 3709 题意: A balanced number is a non negative integer that can be balanced if a pivot is placed at some digit. More
阅读全文
摘要:链接: https://vjudge.net/problem/POJ 3252 题意: The cows, as you know, have no fingers or thumbs and thus are unable to play Scissors, Paper, Stone' (also
阅读全文
摘要:链接: https://vjudge.net/problem/HDU 3555 题意: The counter terrorists found a time bomb in the dust. But this time the terrorists improve on the time bom
阅读全文
摘要:链接: https://vjudge.net/problem/HDU 4352 题意: a 到 b中一个数组成递增子序列长度等于k的数的个数 思路: 因为只有10个数,使用二进制维护一个递增序列,每次更新在注释写了。 然后正常的数位DP, Dp(i, j, k),i是位置,j是当前的递增状态,k是长
阅读全文
摘要:链接: https://vjudge.net/problem/CodeForces 55D 题意: Volodya is an odd boy and his taste is strange as well. It seems to him that a positive integer numb
阅读全文
摘要:链接: https://vjudge.net/problem/LightOJ 1102 题意: As I am fond of making easier problems, I discovered a problem. Actually, the problem is 'how can you
阅读全文