随笔分类 - codeforces
摘要:You are given an integer nn from 11 to 10181018 without leading zeroes. In one move you can swap any two adjacent digits in the given number in such a
        阅读全文
                
摘要:After a terrifying forest fire in Berland a forest rebirth program was carried out. Due to it N rows with M trees each were planted and the rows were 
        阅读全文
                
摘要:Elections in Berland are coming. There are only two candidates — Alice and Bob. The main Berland TV channel plans to show political debates. There are
        阅读全文
                
摘要:Arkady and his friends love playing checkers on an n×nn×n field. The rows and the columns of the field are enumerated from 11 to nn. The friends have 
        阅读全文
                
摘要:When registering in a social network, users are allowed to create their own convenient login to make it easier to share contacts, print it on business
        阅读全文
                
摘要:On his free time, Chouti likes doing some housework. He has got one new task, paint some bricks in the yard. There are nn bricks lined in a row on the
        阅读全文
                
摘要:Time Limit: 2 sec / Memory Limit: 1024 MB Score : 600600 points Problem Statement Snuke has a blackboard and a set SS consisting of NN integers. The i
        阅读全文
                
摘要:There are nn players sitting at the card table. Each player has a favorite number. The favorite number of the jj-th player is fjfj. There are k⋅nk⋅n c
        阅读全文
                
摘要:There are nn cities and mm roads in Berland. Each road connects a pair of cities. The roads in Berland are one-way. What is the minimum number of new 
        阅读全文
                
摘要:Kuro is living in a country called Uberland, consisting of nn towns, numbered from 11to nn, and n−1n−1 bidirectional roads connecting these towns. It 
        阅读全文
                
摘要:Let's suppose you have an array a, a stack s (initially empty) and an array b (also initially empty). You may perform the following operations until b
        阅读全文
                
摘要:You are given an integer array of length nn. You have to choose some subsequence of this array of maximum length such that this subsequence forms a in
        阅读全文
                
摘要:You are given a sequence of integers of length nn and integer number kk. You should print any integer number xx in the range of [1;109][1;109] (i.e. 1
        阅读全文
                
摘要:Polycarp likes to play with numbers. He takes some integer number xx, writes it down on the board, and then performs with it n−1n−1 operations of the 
        阅读全文
                
摘要:Country of Metropolia is holding Olympiad of Metrpolises soon. It mean that all jury members of the olympiad should meet together in Metropolis (the c
        阅读全文
                
摘要:Petya studies at university. The current academic year finishes with nn special days. Petya needs to pass mm exams in those special days. The special 
        阅读全文
                
摘要:The busses in Berland are equipped with a video surveillance system. The system records information about changes in the number of passengers in a bus
        阅读全文
                
摘要:You are given a connected undirected graph consisting of nn vertices and mm edges. There are no self-loops or multiple edges in the given graph. You h
        阅读全文
                
摘要:You are given two strings ss and tt, both consisting of exactly kk lowercase Latin letters, ss is lexicographically less than tt. Let's consider list 
        阅读全文
                
摘要:C. Five Dimensional Points time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output C. Five Dimen
        阅读全文
                
                    
                
浙公网安备 33010602011771号