
cf
文章平均质量分 84
Elicsyd
这个作者很懒,什么都没留下…
展开
-
Codeforces Round #741 (Div. 2)
A. The Miracle and the Sleepertime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou are given two integersllandrr,l≤rl≤r. Find the largest possible value ofamodbamodbover all pairs...原创 2021-08-27 16:06:25 · 361 阅读 · 0 评论 -
Codeforces Round #739 (Div. 3)
A. Dislike of Threestime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputPolycarp doesn't like integers that are divisible by33or end with the digit33in their decimal representation. Int...原创 2021-08-19 13:18:54 · 679 阅读 · 0 评论 -
Codeforces Round #734 (Div. 3)
A. Polycarp and Coinstime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputPolycarp must payexactlynnburles at the checkout. He has coins of two nominal values:11burle and22burles. Pol...原创 2021-07-24 09:57:52 · 320 阅读 · 2 评论 -
B. Putting Platestime limit per test
To celebrate your birthday you have prepared a festive table! Now you want to seat as many guests as possible.The table can be represented as a rectangle with heighthhand widthww, divided intoh×wh×wcells. Let(i,j)(i,j)denote the cell in theii-t...原创 2021-07-18 15:19:48 · 365 阅读 · 0 评论 -
A. Binary Decimal
A. Binary Decimaltime limit per test1 secondmemory limit per test512 megabytesinputstandard inputoutputstandard outputLet's call a number abinary decimalif it's a positive integer and all digits in its decimal notation are either00or...原创 2021-07-18 15:15:04 · 464 阅读 · 0 评论 -
Codeforces Round #730 (Div. 2)
A. Exciting BetsInputThe first line of input contains a single integertt(1≤t≤5⋅1031≤t≤5⋅103) — the number of test cases.The first and the only line of each test case contains two integersaaandbb(0≤a,b≤10180≤a,b≤1018).OutputFor each test cas...原创 2021-07-08 20:11:28 · 94 阅读 · 0 评论 -
B. String LCM
B. String LCMtime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputLet's define a multiplication operation between a stringaaand a positive integerxx:a⋅xa⋅xis the string that is a resul...原创 2021-06-01 16:36:56 · 170 阅读 · 0 评论 -
Codeforces Round #723 (Div. 2)
Codeforces Round #723 (Div. 2)原创 2021-05-29 16:54:18 · 280 阅读 · 1 评论 -
Codeforces Round #720 (Div. 2)
A. Nastia and Nearly Good Numberstime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputNastia has 2 positive integers A and B. She defines that:The integer is good if it is divisible by A⋅B;Otherwise, t原创 2021-05-08 11:15:11 · 95 阅读 · 0 评论 -
Codeforces Round #719 (Div. 3)
A. Do Not Be Distracted!Polycarp has 26 tasks. Each task is designated by a capital letter of the Latin alphabet.The teacher asked Polycarp to solve tasks in the following way: if Polycarp began to solve some task, then he must solve it to the end, witho原创 2021-05-06 15:16:44 · 602 阅读 · 3 评论 -
B. GCD Length
B. GCD Lengthtime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou are given three integers a, b and c.Find two positive integers x and y (x>0, y>0) such that:the decimal representation of x原创 2021-04-29 20:03:31 · 384 阅读 · 1 评论 -
动态规划
数字三角形(POJ1163)在上面的数字三角形中寻找一条从顶部到底边的路径,使得路径上所经过的数字之和最大。路径上的每一步都只能往左下或 右下走。只需要求出这个最大和即可,不必给出具体路径。 三角形的行数大于1小于等于100,数字为 0 - 99输入格式:5 //表示三角形的行数 接下来输入三角形73 88 1 02 7 4 44 5 2 6 5要求输出最大和从下往上加如代码:#include<原创 2020-12-20 20:04:00 · 85 阅读 · 0 评论 -
B. Sum of Medians
B. Sum of Medianstime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputA median of an array of integers of length n is the number standing on the ⌈n2⌉ (rounding up) position in the non-decreasing ordering原创 2020-11-22 20:13:15 · 295 阅读 · 0 评论 -
A. Matrix Game
A. Matrix Gametime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputAshish and Vivek play a game on a matrix consisting of n rows and m columns, where they take turns claiming cells. Unclaimed cells are r原创 2020-10-29 22:27:40 · 262 阅读 · 0 评论 -
A. Shovels and Swords
A. Shovels and Swordstime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputPolycarp plays a well-known computer game (we won’t mention its name). In this game, he can craft tools of two types — shovels an原创 2020-10-29 22:26:23 · 178 阅读 · 0 评论 -
B. K-th Beautiful String
B. K-th Beautiful Stringtime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputFor the given integer n (n>2) let’s write down all the strings of length n which contain n−2 letters ‘a’ and two letters ‘b原创 2020-10-29 22:24:42 · 173 阅读 · 0 评论 -
A. Initial Bet
A. Initial Bettime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputThere are five people playing a game called “Generosity”. Each person gives some non-zero number of coins b as an initial bet. After all原创 2020-10-29 22:23:07 · 134 阅读 · 0 评论 -
A. Arpa’s hard exam and Mehrdad’s naive cheat
A. Arpa’s hard exam and Mehrdad’s naive cheattime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputThere exists an island called Arpa’s land, some beautiful girls live there, as ugly ones do.Mehrdad want原创 2020-10-29 22:21:29 · 217 阅读 · 0 评论 -
B. Same Parity Summands
B. Same Parity Summandstime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou are given two positive integers n (1≤n≤109) and k (1≤k≤100). Represent the number n as the sum of k positive integers of th原创 2020-10-29 22:19:36 · 185 阅读 · 0 评论 -
CodeForces - 1029A
You are given a string t consisting of n lowercase Latin letters and an integer number k.Let’s define a substring of some string s with indices from l to r as s[l…r].Your task is to construct such string s of minimum possible length that there are exactl原创 2020-10-29 22:16:17 · 198 阅读 · 0 评论 -
CodeForces - 1047B
There are n points on the plane, (x1,y1),(x2,y2),…,(xn,yn).You need to place an isosceles triangle with two sides on the coordinate axis to cover all points (a point is covered if it lies inside the triangle or on the side of the triangle). Calculate the原创 2020-10-29 22:14:31 · 188 阅读 · 0 评论 -
CodeForces 1047A
Little C loves number «3» very much. He loves all things about it.Now he has a positive integer n. He wants to split n into 3 positive integers a,b,c, such that a+b+c=n and none of the 3 integers is a multiple of 3. Help him to find a solution.InputA si原创 2020-10-29 22:12:20 · 121 阅读 · 0 评论 -
B. Same Parity Summands
B. Same Parity Summandstime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou are given two positive integers n (1≤n≤109) and k (1≤k≤100). Represent the number n as the sum of k positive integers of th原创 2020-10-25 19:04:01 · 243 阅读 · 0 评论 -
A. IQ test
A. IQ testA. IQ testtime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputBob is preparing to pass IQ test. The most frequent task in this test is to find out which one of the given n numbers differs fr原创 2020-10-25 18:55:33 · 268 阅读 · 0 评论 -
A. Cheap Travel
A. Cheap Traveltime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputAnn has recently started commuting by subway. We know that a one ride subway ticket costs a rubles. Besides, Ann found out that she can原创 2020-10-25 18:47:08 · 247 阅读 · 0 评论 -
A. New Year Candles
A. New Year Candlestime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputVasily the Programmer loves romance, so this year he decided to illuminate his room with candles.Vasily has a candles.When Vasily原创 2020-10-25 18:45:56 · 161 阅读 · 0 评论 -
C. Given Length and Sum of Digits
C. Given Length and Sum of Digits…time limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou have a positive integer m and a non-negative integer s. Your task is to find the smallest and the largest of the原创 2020-10-25 18:44:21 · 212 阅读 · 0 评论 -
map排序A. Football
题目A. Footballtime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputOne day Vasya decided to have a look at the results of Berland 1910 Football Championship’s finals. Unfortunately he didn’t find the ov原创 2020-07-31 12:03:20 · 205 阅读 · 0 评论 -
A. Duff and Meat和Dragons
A. Duff and Meat和DragonsdragonA. Dragonstime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputKirito is stuck on a level of the MMORPG he is playing now. To move on in the game, he’s got to defeat all原创 2020-07-30 20:58:01 · 202 阅读 · 0 评论