竞赛
文章平均质量分 76
joker_zh53
这个作者很懒,什么都没留下…
展开
-
Codeforces Round #747 (Div. 2), problem: (C) Make Them Equal,
C. Make Them Equaltime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputTheofanis has a string s1s2…sn and a character c. He wants to make all characters of the string equal to c using the minimum number原创 2021-10-09 11:04:15 · 347 阅读 · 0 评论 -
Codeforces Round #747 (Div. 2), problem: (B) Special Numbers,
B. Special Numberstime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputTheofanis really likes sequences of positive integers, thus his teacher (Yeltsa Kcir) gave him a problem about a sequence that cons原创 2021-10-09 08:52:50 · 660 阅读 · 0 评论 -
Codeforces Round #747 (Div. 2), problem: (A) Consecutive Sum Riddle,
A - Consecutive Sum RiddleA. Consecutive Sum Riddletime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputTheofanis has a riddle for you and if you manage to solve it, he will give you a Cypriot snack ha原创 2021-10-09 08:29:40 · 347 阅读 · 0 评论 -
A. Bottle Return
链接:https://ac.nowcoder.com/acm/contest/18462/A来源:牛客网题目描述In the United States, beverage container deposit laws, or so-called bottle bills, are designed to reduce litter and reclaim bottles, cans and other containers for recycling. Ten states currently ha原创 2021-08-26 17:58:30 · 87 阅读 · 0 评论 -
P2550
题目描述为了丰富人民群众的生活、支持某些社会公益事业,北塔市设置了一项彩票。该彩票的规则是:每张彩票上印有 77 个各不相同的号码,且这些号码的取值范围为 1\sim331∼33。每次在兑奖前都会公布一个由七个各不相同的号码构成的中奖号码。共设置 77 个奖项,特等奖和一等奖至六等奖。兑奖规则如下:特等奖:要求彩票上 77 个号码都出现在中奖号码中。一等奖:要求彩票上有 66 个号码出现在中奖号码中。二等奖:要求彩票上有 55 个号码出现在中奖号码中。三等奖:要求彩票上有 44 个号码出现原创 2021-07-18 11:08:49 · 196 阅读 · 0 评论 -
P1138
题目描述现有n个正整数,n≤10000,要求出这n个正整数中的第k个最小整数(相同大小的整数只计算一次),k≤1000,正整数均小于30000。输入格式第一行为n和k; 第二行开始为n个正整数的值,整数间用空格隔开。输出格式第k个最小整数的值;若无解,则输出“NO RESULT”。输入输出样例输入 #1复制10 31 3 3 7 2 5 1 2 4 6输出 #1复制3说明/提示n≤10000题解:对于本题的求解,我们只要对于所输入的数组进行排序后,在进行相关的去重,那么此时所得到原创 2021-07-18 10:35:06 · 273 阅读 · 0 评论 -
暑期训练2:AtCoder Beginner Contest 208 B - Factorial Yen Coin
B - Factorial Yen CoinTime Limit: 2 sec Memory Limit: 1024 MBScore :200pointsProblem StatementThe coins used in the Kingdom of Takahashi are1!-yen coins,2!-yen coins,…, and10!-yen coins. Here,N!1×2×⋯×N.Takahashi has100of ever原创 2021-07-04 23:20:15 · 471 阅读 · 0 评论 -
暑期训练2:AtCoder Beginner Contest 208 A Rolling Dice
A - Rolling Dice /Time Limit: 2 sec / Memory Limit: 1024 MBScore :100pointsProblem StatementIs it possible to get a sum ofBwhen throwing a die with six faces1,2,…,6Atimes?Constraints1≤A≤1001≤B≤1000AandBare integers.InputI原创 2021-07-04 22:54:26 · 153 阅读 · 0 评论 -
暑期训练1:Codeforces Round #729 (Div. 2)B. Plus and Multiply
B. Plus and Multiplytime limit per test3 secondsmemory limit per test512 megabytesinputstandard inputoutputstandard outputThere is an infinite set generated as follows:1 is in this set.If x is in this set, x⋅a and x+b both are in this set.For examp原创 2021-07-04 15:20:22 · 662 阅读 · 0 评论 -
暑期训练1:Codeforces Round #729 (Div. 2)(A) Odd Set,
记错了比赛时间,临时进去签到了,后面的一天之内更新吧A. Odd Settime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou are given a multiset (i. e. a set that can contain multiple equal integers) containing 2n integers. Determine原创 2021-07-03 23:16:06 · 241 阅读 · 0 评论 -
Codeforces Round #715 (Div. 2), problem: (A) Average Height
停更了很久,日后会疯狂刷题,继续淦!!!!!!!!!!!!!!!!!A. Average Heighttime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputSayaka Saeki is a member of the student council, which has n other members (excluding Sayaka). The原创 2021-04-26 22:08:39 · 219 阅读 · 0 评论 -
刷题记录2021.3.19之100题
深夜刷题第一天1.A - LCM Challenge2.B - Let's Play Osu!1.A - LCM ChallengeA. LCM Challengetime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputSome days ago, I learned the concept of LCM (least common multipl原创 2021-03-19 03:37:59 · 1215 阅读 · 0 评论 -
刷题2021.3.15
Codeforces Round #158 (Div. 2A. Adding DigitsB. Ancient ProphesyC. Balls and BoxesD. Black and White TreeE. Dividing KingdomA. Adding DigitsA. Adding Digitstime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandar原创 2021-03-15 23:56:23 · 907 阅读 · 0 评论 -
Codeforces Round #704 (Div. 2), problem: (A) Three swimmers
A. Three swimmerstime limit per test1 secondmemory limit per test512 megabytesinputstandard inputoutputstandard outputThree swimmers decided to organize a party in the swimming pool! At noon, they started to swim from the left side of the pool.It tak原创 2021-02-24 13:26:32 · 221 阅读 · 0 评论 -
Codeforces Round #704 (Div. 2), problem: (B) Card Deck,
B. Card Decktime limit per test1 secondmemory limit per test512 megabytesinputstandard inputoutputstandard outputYou have a deck of n cards, and you’d like to reorder it to a new one.Each card has a value between 1 and n equal to pi. All pi are pairw原创 2021-02-24 13:19:50 · 304 阅读 · 0 评论 -
Codeforces Round #700 (Div. 2), problem: (B) The Great Hero,
B. The Great Herotime limit per test2 secondsmemory limit per test512 megabytesinputstandard inputoutputstandard outputThe great hero guards the country where Homer lives. The hero has attack power A and initial health value B. There are n monsters in原创 2021-02-08 01:50:36 · 2480 阅读 · 2 评论 -
Codeforces Round #700 (Div. 2), problem: (A) Yet Another String Game
A. Yet Another String Gametime limit per test2 secondsmemory limit per test512 megabytesinputstandard inputoutputstandard outputHomer has two friends Alice and Bob. Both of them are string fans.One day, Alice and Bob decide to play a game on a string原创 2021-02-08 00:53:29 · 483 阅读 · 1 评论 -
Codeforces Round #699 (Div. 2), problem: (B)New Colony
B. New Colonytime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputAfter reaching your destination, you want to build a new colony on the new planet. Since this planet has many mountains and the colony m原创 2021-02-06 11:10:34 · 274 阅读 · 0 评论 -
Codeforces Round #699 (Div. 2), problem: (A) Space Navigation
A. Space Navigationtime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou were dreaming that you are traveling to a planet named Planetforces on your personal spaceship. Unfortunately, its piloting sy原创 2021-02-06 10:36:04 · 291 阅读 · 0 评论 -
Codeforces Round #690 (Div. 3), problem: (A) Favorite Sequence,
A. Favorite Sequencetime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputPolycarp has a favorite sequence a[1…n] consisting of n integers. He wrote it out on the whiteboard as follows:he wrote the numb原创 2021-01-30 14:30:58 · 257 阅读 · 0 评论 -
Codeforces Round #693 (Div. 3), problem: (B) Fair Division
B. Fair Divisiontime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputAlice and Bob received n candies from their parents. Each candy weighs either 1 gram or 2 grams. Now they want to divide all candies原创 2021-01-30 13:51:45 · 211 阅读 · 0 评论 -
A. Die Roll
A. Die Rolltime limit per test1 secondmemory limit per test64 megabytesinputstandard inputoutputstandard outputYakko, Wakko and Dot, world-famous animaniacs, decided to rest from acting in cartoons, and take a leave to travel a bit. Yakko dreamt to go原创 2021-01-29 18:44:47 · 273 阅读 · 0 评论 -
Codeforces Round #698 (Div. 2), problem: (B) Nezzar and Lucky Number
B. Nezzar and Lucky Numbertime limit per test1 secondmemory limit per test512 megabytesinputstandard inputoutputstandard outputNezzar’s favorite digit among 1,…,9 is d. He calls a positive integer lucky if d occurs at least once in its decimal represe原创 2021-01-29 11:14:27 · 561 阅读 · 1 评论 -
Codeforces Round #698 (Div. 2), problem: (A) Nezzar and Colorful Balls
A. Nezzar and Colorful Ballstime limit per test1 secondmemory limit per test512 megabytesinputstandard inputoutputstandard outputNezzar has n balls, numbered with integers 1,2,…,n. Numbers a1,a2,…,an are written on them, respectively. Numbers on those原创 2021-01-29 10:57:15 · 1407 阅读 · 0 评论 -
Codeforces Round #697 (Div. 3), problem: (B) New Year‘s Number,
B. New Year’s Numbertime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputPolycarp remembered the 2020-th year, and he is happy with the arrival of the new 2021-th year. To remember such a wonderful mome原创 2021-01-26 13:19:08 · 396 阅读 · 0 评论 -
Codeforces Round #697 (Div. 3), problem: (A) Odd Divisor,
A. Odd Divisortime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou are given an integer n. Check if n has an odd divisor, greater than one (does there exist such a number x (x>1) that n is divisi原创 2021-01-26 13:16:18 · 861 阅读 · 0 评论 -
A. Floor Number
A. Floor Numbertime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputVasya goes to visit his classmate Petya. Vasya knows that Petya’s apartment number is n.There is only one entrance in Petya’s house an原创 2021-01-25 15:09:32 · 203 阅读 · 0 评论 -
P2240 【深基12.例1】部分背包问题--------用了快读的
题目描述阿里巴巴走进了装满宝藏的藏宝洞。藏宝洞里面有 N(N \le 100)N(N≤100) 堆金币,第 ii 堆金币的总重量和总价值分别是 m_i,v_i(1\le m_i,v_i \le 100)mi ,vi (1≤mi ,vi ≤100)。阿里巴巴有一个承重量为 T(T \le 1000)T(T≤1000) 的背包,但并不一定有办法将全部的金币都装进去。他想装走尽可能多价值的金币。所有金币都可以随意分割,分割完的金币重量价值比(也就是单位价格)不变。请问阿里巴巴最多原创 2021-01-18 17:49:19 · 353 阅读 · 0 评论 -
P1464function--------记忆宏
题目描述对于一个递归函数w(a,b,c)w(a,b,c)如果a \le 0a≤0 or b \le 0b≤0 or c \le 0c≤0就返回值11.如果a>20a>20 or b>20b>20 or c>20c>20就返回w(20,20,20)w(20,20,20)如果a<ba<b并且b<cb<c 就返回w(a,b,c-1)+w(a,b-1,c-1)-w(a,b-1,c)w(a,b,c−1)+w(a,b−1,c−1)−w(a,b−1,c)原创 2021-01-18 16:54:03 · 200 阅读 · 0 评论 -
codeforces round 99 A~C题
codeforces round 99 A~C题A题 A. Strange FunctionsB题 Jumps(逆向思维)C题 Strange Functions(水题)A题 A. Strange FunctionsA. Strange Functionstime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputLet’s define a func原创 2020-12-01 12:51:43 · 477 阅读 · 0 评论 -
codeforces #687 div2 B. Repainting Street
B. Repainting Streettime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputThere is a street with n houses in a line, numbered from 1 to n. The house i is initially painted in color ci. The street is consi原创 2020-11-29 17:39:20 · 431 阅读 · 0 评论 -
codeforces #687 div2 A.Prison Break(签到题)
A. Prison Breaktime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputThere is a prison that can be represented as a rectangular matrix with n rows and m columns. Therefore, there are n⋅m prison cells. The原创 2020-11-29 17:23:22 · 507 阅读 · 0 评论 -
codeforces #686 div3 B. Unique Bid Auction
B. Unique Bid Auctiontime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputThere is a game called “Unique Bid Auction”. You can read more about it here: https://en.wikipedia.org/wiki/Unique_bid_auction (t原创 2020-11-25 01:16:25 · 386 阅读 · 0 评论 -
codeforces #686 div3 A. Special Permutation(找规律)
A. Special Permutationtime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou are given one integer n (n>1).Recall that a permutation of length n is an array consisting of n distinct integers from 1原创 2020-11-25 01:11:02 · 269 阅读 · 0 评论 -
Buy a Shovel(暴力即可)
A. Buy a Shoveltime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputPolycarp urgently needs a shovel! He comes to the shop and chooses an appropriate one. The shovel that Policarp chooses is sold for原创 2020-11-24 12:56:43 · 208 阅读 · 0 评论 -
Sum of Round Numbers
A. Sum of Round Numberstime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputA positive (strictly greater than zero) integer is called round if it is of the form d00…0. In other words, a positive inte原创 2020-11-24 12:52:00 · 196 阅读 · 1 评论 -
codeforces #685 div2 Subtract or Divide(水题)
A. Subtract or Dividetime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputRidbit starts with an integer n.In one move, he can perform one of the following operations:divide n by one of its proper divis原创 2020-11-22 01:13:10 · 609 阅读 · 1 评论 -
带有小数的数字反转(大水题)
第一次写,如有不好之处,欢迎指正,但不要喷比较简单的一道题第一种方法:用字符去代替数字的输出,从而在输出的时候直接去翻转相应的字符,从而达到数字的输出。代码:#include//C++的输入输出#include//此可以用C的标准输入输出using namespace std;int main(){char a,b,c,d;scanf("%c%c%c.%c",&a,&b,&c,&d);//输入相对应的数字printf("%c.%c%c%c",d,c,b.原创 2020-09-24 09:03:30 · 2603 阅读 · 1 评论 -
小学数学N合一
这个题目很简单,可以用程序写出运行过程,也可以直接暴力输出结果就行,后者比较方便,这道题只不过是一些基础问题的累积,在输出格式注意一下,和有效小数的位数就行了附上代码:#include#include#includeusing namespace std;int main() {int T;cin >> T;if (T == 1) {cout << “I love Luogu!”;} else if (T == 2) { cout <<...原创 2020-09-25 12:36:48 · 587 阅读 · 0 评论 -
codeforces 4A Watermelon
本题比较简单,但是也是有坑点,对于测试数字2来说,我们对它进行平分的时候,只能对半,而此时得到的并不是两个偶数-------即奇数,对于我们满足题意------挑选偶数来说,就是个例外,故而只要瓜的重量是偶数即可,同时排除2即可,此题规模(n<100)不大,我们既可用循环去判断每次分割情况,也可直接判断瓜的总重,代码如下:...原创 2020-10-16 10:31:30 · 193 阅读 · 0 评论