思维
文章平均质量分 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 · 405 阅读 · 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) = 0 where & denotes the bitwise AND operation. Input The first line contains a single integer t (1≤t原创 2021-05-21 13:30:31 · 415 阅读 · 0 评论 -
C. Robot Collisions(思维)
题目链接 outputstandard output There 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 · 484 阅读 · 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 · 249 阅读 · 0 评论 -
A. Do you want a date?(思维)
time limit per test2 seconds memory limit per test256 megabytes inputstandard input outputstandard output Leha 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 · 289 阅读 · 0 评论 -
B. Phoenix and Puzzle(思维)
time limit per test2 seconds memory limit per test256 megabytes inputstandard input outputstandard output Phoenix 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 · 346 阅读 · 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 · 127 阅读 · 0 评论 -
C. Berland Regional(思维)
time limit per test2 seconds memory limit per test256 megabytes inputstandard input outputstandard output Polycarp 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 · 456 阅读 · 0 评论 -
B. The Cake Is a Lie(思维)
time limit per test2 seconds memory limit per test256 megabytes inputstandard input outputstandard output There 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 · 416 阅读 · 0 评论 -
A. Red and Blue Beans(思维)
time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard output You 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 · 335 阅读 · 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} a 1 ×b 1 segments large and the second one is a_{2}×b_{2} a 2 ×b 2 segm原创 2021-04-29 14:48:53 · 95 阅读 · 0 评论