04 2020 档案

摘要:Every (positive) rational number can be expressed as a ratio of two (positive) integers.However, in decimal form, rational numbers often have an infin 阅读全文
posted @ 2020-04-30 21:42 DeaL57 阅读(132) 评论(0) 推荐(0)
摘要:You are given two integers nn and mm. Calculate the number of pairs of arrays (a,b)(a,b) such that: the length of both arrays is equal to mm; each ele 阅读全文
posted @ 2020-04-28 21:20 DeaL57 阅读(187) 评论(0) 推荐(0)
摘要:Recall that MEX of an array is a minimum non-negative integer that does not belong to the array. Examples: for the array [0,0,1,0,2][0,0,1,0,2] MEX eq 阅读全文
posted @ 2020-04-27 10:55 DeaL57 阅读(199) 评论(0) 推荐(0)
摘要:You are given string ss of length nn consisting of 0-s and 1-s. You build an infinite string tt as a concatenation of an infinite number of strings ss 阅读全文
posted @ 2020-04-26 22:24 DeaL57 阅读(147) 评论(0) 推荐(0)
摘要:You are given two strings ss and tt consisting of lowercase Latin letters. Also you have a string zz which is initially empty. You want string zz to b 阅读全文
posted @ 2020-04-26 12:48 DeaL57 阅读(212) 评论(0) 推荐(0)
摘要:考虑全为0的串数。我们有m个1,相当于有m+1的空隙可以用来放0。那么显然我们把这n-m个0匀着放到这m+1个空隙,可以使得每个0的部分尽可能短,进而使得全为0的子串尽可能少。 所以每个空隙放b=(n-m)/(m+1)。因为不能整除,所有有(n-m) % (m+1)个空隙实际上还要再多一个0。 如果 阅读全文
posted @ 2020-04-26 11:18 DeaL57 阅读(124) 评论(0) 推荐(0)
摘要:To become the king of Codeforces, Kuroni has to solve the following problem. He is given nn numbers a1,a2,…,ana1,a2,…,an. Help Kuroni to calculate ∏1≤ 阅读全文
posted @ 2020-04-26 10:00 DeaL57 阅读(164) 评论(0) 推荐(0)
摘要:VK news recommendation system daily selects interesting publications of one of nn disjoint categories for each user. Each publication belongs to exact 阅读全文
posted @ 2020-04-26 00:23 DeaL57 阅读(210) 评论(0) 推荐(0)
摘要:Your task is to calculate the number of arrays such that: each array contains nn elements; each element is an integer from 11 to mm; for each array, t 阅读全文
posted @ 2020-04-25 10:22 DeaL57 阅读(171) 评论(0) 推荐(0)
摘要:Nikolay has only recently started in competitive programming, but already qualified to the finals of one prestigious olympiad. There going to be nn pa 阅读全文
posted @ 2020-04-25 09:34 DeaL57 阅读(192) 评论(0) 推荐(0)
摘要:It is Professor R's last class of his teaching career. Every time Professor R taught a class, he gave a special problem for the students to solve. You 阅读全文
posted @ 2020-04-23 23:34 DeaL57 阅读(155) 评论(0) 推荐(0)
摘要:You are given a string ss consisting of lowercase Latin letters. Let the length of ss be |s||s|. You may perform several operations on this string. In 阅读全文
posted @ 2020-04-23 22:07 DeaL57 阅读(175) 评论(0) 推荐(0)
摘要:Eugene likes working with arrays. And today he needs your help in solving one challenging task. An array cc is a subarray of an array bb if cc can be 阅读全文
posted @ 2020-04-23 21:05 DeaL57 阅读(252) 评论(0) 推荐(0)
摘要:You are given an array aa consisting of nn integers (it is guaranteed that nn is even, i.e. divisible by 22). All aiai does not exceed some integer kk 阅读全文
posted @ 2020-04-22 15:31 DeaL57 阅读(360) 评论(0) 推荐(0)
摘要:Severe acute respiratory syndrome (SARS), an atypical pneumonia of unknown aetiology, was recognized as a global threat in mid-March 2003. To minimize 阅读全文
posted @ 2020-04-20 23:49 DeaL57 阅读(110) 评论(0) 推荐(0)
摘要:An earthquake takes place in Southeast Asia. The ACM (Asia Cooperated Medical team) have set up a wireless network with the lap computers, but an unex 阅读全文
posted @ 2020-04-20 17:18 DeaL57 阅读(127) 评论(0) 推荐(0)
摘要:You are assigned to design network connections between certain points in a wide area. You are given a set of points in the area, and a set of possible 阅读全文
posted @ 2020-04-20 15:57 DeaL57 阅读(106) 评论(0) 推荐(0)
摘要:The base (or radix) of a positional numeral system is the number of symbols that can be used to represent a number in that system. The base 1010 syste 阅读全文
posted @ 2020-04-20 11:15 DeaL57 阅读(194) 评论(0) 推荐(0)
摘要:A group of friends snuck away from their school campus, but now they must return from the main campus gate to their dorm while remaining undetected by 阅读全文
posted @ 2020-04-19 22:52 DeaL57 阅读(214) 评论(0) 推荐(0)
摘要:The Head Elder of the tropical island of Lagrishan has a problem. A burst of foreign aid money was spent on extra roads between villages some years ag 阅读全文
posted @ 2020-04-19 09:28 DeaL57 阅读(170) 评论(0) 推荐(0)
摘要:Let s be a given string of up to 10^6106 digits. Find the maximal kk for which it is possible to partition ss into kk consecutive contiguous substring 阅读全文
posted @ 2020-04-16 20:02 DeaL57 阅读(144) 评论(0) 推荐(0)
摘要:N (1 ≤ N ≤ 100) cows, conveniently numbered 1..N, are participating in a programming contest. As we all know, some cows code better than others. Each 阅读全文
posted @ 2020-04-15 15:54 DeaL57 阅读(105) 评论(0) 推荐(0)
摘要:BIT has recently taken delivery of their new supercomputer, a 32 processor Apollo Odyssey distributed shared memory machine with a hierarchical commun 阅读全文
posted @ 2020-04-15 14:50 DeaL57 阅读(109) 评论(0) 推荐(0)
摘要:While exploring his many farms, Farmer John has discovered a number of amazing wormholes. A wormhole is very peculiar because it is a one-way path tha 阅读全文
posted @ 2020-04-13 22:14 DeaL57 阅读(111) 评论(0) 推荐(0)
摘要:Several currency exchange points are working in our city. Let us suppose that each point specializes in two particular currencies and performs exchang 阅读全文
posted @ 2020-04-13 17:07 DeaL57 阅读(255) 评论(0) 推荐(0)
摘要:One cow from each of N farms (1 ≤ N ≤ 1000) conveniently numbered 1..N is going to attend the big cow party to be held at farm #X (1 ≤ X ≤ N). A total 阅读全文
posted @ 2020-04-13 10:46 DeaL57 阅读(138) 评论(0) 推荐(0)
摘要:You have array of nn numbers a1,a2,…,ana1,a2,…,an. Rearrange these numbers to satisfy |a1−a2|≤|a2−a3|≤…≤|an−1−an||a1−a2|≤|a2−a3|≤…≤|an−1−an|, where |x 阅读全文
posted @ 2020-04-13 08:20 DeaL57 阅读(261) 评论(0) 推荐(0)
摘要:BackgroundHugo Heavy is happy. After the breakdown of the Cargolifter project he can now expand business. But he needs a clever man who tells him whet 阅读全文
posted @ 2020-04-12 09:03 DeaL57 阅读(165) 评论(0) 推荐(0)
摘要:E. Sleeping Schedule time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Vova had a pretty w 阅读全文
posted @ 2020-04-11 23:41 DeaL57 阅读(182) 评论(0) 推荐(0)
摘要:D. Ehab the Xorcist time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Given 2 integers uu a 阅读全文
posted @ 2020-04-11 14:59 DeaL57 阅读(132) 评论(0) 推荐(0)
摘要:C. Game with Chips time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Petya has a rectangula 阅读全文
posted @ 2020-04-11 11:56 DeaL57 阅读(219) 评论(0) 推荐(0)
摘要:D. Walk on Matrix time limit per test 2 seconds memory limit per test 512 megabytes input standard input output standard output Bob is playing a game 阅读全文
posted @ 2020-04-11 11:03 DeaL57 阅读(298) 评论(0) 推荐(0)
摘要:C. Circle of Monsters time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output You are playing ano 阅读全文
posted @ 2020-04-11 09:47 DeaL57 阅读(328) 评论(0) 推荐(0)
摘要:#include "stdafx.h" #include <iostream> #include <vector> #include <algorithm> #include <string> #include <set> #include <queue> #include <map> #inclu 阅读全文
posted @ 2020-04-09 19:55 DeaL57 阅读(144) 评论(0) 推荐(0)
摘要:Today is Jaime’s birthday and, to celebrate, his friends ordered a cake decorated with eggfruits and persimmons. When the cake arrived, to their surpr 阅读全文
posted @ 2020-04-07 21:23 DeaL57 阅读(504) 评论(0) 推荐(0)
摘要:Subsequence Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 30334 Accepted: 12752 Description A sequence of N positive integers (10 < N < 1 阅读全文
posted @ 2020-04-07 15:34 DeaL57 阅读(229) 评论(0) 推荐(0)
摘要:Jessica's Reading Problem Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 23019 Accepted: 7776 Description Jessica's a very lovely girl woo 阅读全文
posted @ 2020-04-07 15:30 DeaL57 阅读(254) 评论(0) 推荐(0)
摘要:The sequence of mm integers is called the permutation if it contains all integers from 11 to mm exactly once. The number mm is called the length of th 阅读全文
posted @ 2020-04-05 16:23 DeaL57 阅读(305) 评论(0) 推荐(0)