摘要: You are given two binary strings aa and bb of the same length. You can perform the following two operations on the string aa: Swap any two bits at ind 阅读全文
posted @ 2020-02-21 16:32 DeaL57 阅读(202) 评论(0) 推荐(0)
摘要: You're given an integer nn. For every integer ii from 22 to nn, assign a positive integer aiai such that the following conditions hold: For any pair o 阅读全文
posted @ 2020-02-20 10:06 DeaL57 阅读(265) 评论(0) 推荐(0)
摘要: Dreamoon is standing at the position 0 on a number line. Drazil is sending a list of commands through Wi-Fi to Dreamoon's smartphone and Dreamoon foll 阅读全文
posted @ 2020-02-18 17:52 DeaL57 阅读(186) 评论(0) 推荐(0)
摘要: Polycarpus has a ribbon, its length is n. He wants to cut the ribbon in a way that fulfils the following two conditions: After the cutting each ribbon 阅读全文
posted @ 2020-02-18 11:50 DeaL57 阅读(281) 评论(0) 推荐(0)
摘要: Vova promised himself that he would never play computer games... But recently Firestorm — a well-known game developing company — published their newes 阅读全文
posted @ 2020-02-17 17:25 DeaL57 阅读(218) 评论(0) 推荐(0)
摘要: The only difference between easy and hard versions is constraints. There are nn kids, each of them is reading a unique book. At the end of any day, th 阅读全文
posted @ 2020-02-17 11:46 DeaL57 阅读(230) 评论(0) 推荐(0)
摘要: Pavel loves grid mazes. A grid maze is an n × m rectangle maze where each cell is either empty, or is a wall. You can go from one cell to another only 阅读全文
posted @ 2020-02-17 11:11 DeaL57 阅读(169) 评论(0) 推荐(0)
摘要: A company has n employees numbered from 1 to n. Each employee either has no immediate manager or exactly one immediate manager, who is another employe 阅读全文
posted @ 2020-02-16 16:06 DeaL57 阅读(149) 评论(0) 推荐(0)
摘要: DZY loves chessboard, and he enjoys playing with it. He has a chessboard of n rows and m columns. Some cells of the chessboard are bad, others are goo 阅读全文
posted @ 2020-02-14 17:56 DeaL57 阅读(192) 评论(0) 推荐(0)
摘要: Berland shop sells nn kinds of juices. Each juice has its price cici. Each juice includes some set of vitamins in it. There are three types of vitamin 阅读全文
posted @ 2020-02-12 16:50 DeaL57 阅读(187) 评论(0) 推荐(0)