思维
文章平均质量分 86
然然zl
这个作者很懒,什么都没留下…
展开
-
B1. Palindrome Game (easy version and hard version)
B1. Palindrome Game (easy version)题目链接The only difference between the easy and hard versions is that the given string s in the easy version is initially a palindrome, this condition is not always true for the hard version.A palindrome is a string that r原创 2021-05-21 14:43:29 · 392 阅读 · 2 评论 -
A. And Then There Were K(思维)
题目链接Given an integer n, find the maximum value of integer k such that the following condition holds:n & (n−1) & (n−2) & (n−3) & … (k) = 0where & denotes the bitwise AND operation.InputThe first line contains a single integer t (1≤t原创 2021-05-21 13:30:31 · 404 阅读 · 0 评论 -
C. Robot Collisions(思维)
题目链接outputstandard outputThere are n robots driving along an OX axis. There are also two walls: one is at coordinate 0 and one is at coordinate m.The i-th robot starts at an integer coordinate xi (0<xi<m) and moves either left (towards the 0) or r原创 2021-05-18 19:12:58 · 476 阅读 · 0 评论 -
A. Potion-making(思维)
You have an initially empty cauldron, and you want to brew a potion in it. The potion consists of two ingredients: magic essence and water. The potion you want to brew should contain exactly k % magic essence and (100−k) % water.In one step, you can pour原创 2021-05-18 18:39:40 · 241 阅读 · 0 评论 -
A. Do you want a date?(思维)
time limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputLeha decided to move to a quiet town Vičkopolis, because he was tired by living in Bankopolis. Upon arrival he immediately began to expand his network原创 2021-05-06 17:46:50 · 281 阅读 · 0 评论 -
B. Phoenix and Puzzle(思维)
time limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputPhoenix is playing with a new puzzle, which consists of n identical puzzle pieces. Each puzzle piece is a right isosceles triangle as shown below.A原创 2021-05-06 11:35:56 · 338 阅读 · 0 评论 -
C. Vasya and Basketball(思维)
题目描述Vasya follows a basketball game and marks the distances from which each team makes a throw. He knows that each successful throw has value of either 2 or 3 points. A throw is worth 2 points if the distance it was made from doesn’t exceed some value of原创 2021-04-30 14:12:23 · 121 阅读 · 0 评论 -
C. Berland Regional(思维)
time limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputPolycarp is an organizer of a Berland ICPC regional event. There are n universities in Berland numbered from 1 to n. Polycarp knows all competitive pr原创 2021-04-30 01:25:21 · 444 阅读 · 0 评论 -
B. The Cake Is a Lie(思维)
time limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputThere is a n×m grid. You are standing at cell (1,1) and your goal is to finish at cell (n,m).You can move to the neighboring cells to the right or do原创 2021-04-30 01:15:54 · 398 阅读 · 0 评论 -
A. Red and Blue Beans(思维)
time limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou have r red and b blue beans. You’d like to distribute them among several (maybe, one) packets in such a way that each packet:has at least one red原创 2021-04-30 01:11:00 · 324 阅读 · 1 评论 -
CF490D Chocolate(思维)
题目链接题目描述Polycarpus likes giving presents to Paraskevi. He has bought two chocolate bars, each of them has the shape of a segmented rectangle. The first bar is a_{1}×b_{1} a1 ×b1 segments large and the second one is a_{2}×b_{2} a2 ×b2 segm原创 2021-04-29 14:48:53 · 91 阅读 · 0 评论