摘要: A - Buggy Sorting Little boy Valera studies an algorithm of sorting an integer array. After studying the theory, he went on to the practical tasks. As 阅读全文
posted @ 2020-04-26 10:13 西瓜0 阅读(144) 评论(0) 推荐(0)
摘要: 链接:https://ac.nowcoder.com/acm/contest/5278/A来源:牛客网 A.组队比赛 时间限制:C/C++ 1秒,其他语言2秒 空间限制:C/C++ 524288K,其他语言1048576K 64bit IO Format: %lld 题目描述 Compute, Cu 阅读全文
posted @ 2020-04-25 20:03 西瓜0 阅读(889) 评论(0) 推荐(0)
摘要: A - Balloons There are quite a lot of ways to have fun with inflatable balloons. For example, you can fill them with water and see what happens. Grigo 阅读全文
posted @ 2020-04-18 17:15 西瓜0 阅读(180) 评论(0) 推荐(0)
摘要: A - Wrestling Match Nowadays, at least one wrestling match is held every year in our country. There are a lot of people in the game is "good player”, 阅读全文
posted @ 2020-04-18 16:58 西瓜0 阅读(196) 评论(0) 推荐(0)
摘要: A. Petr stands in line of n people, but he doesn't know exactly which position he occupies. He can say that there are no less than a people standing i 阅读全文
posted @ 2020-04-12 21:23 西瓜0 阅读(245) 评论(0) 推荐(0)
摘要: Problem A : Electric Bill 题目大意:进行电量分级制收费,1000kwh及以下一档收费,1000kwh以上按另一档收费,给出每个人的电量总额,问每人应支付多少钱。 思路:基础if else题,对于每个电量判断是否大于1000,再分别计算≤1000的价格和>1000的价格,最后 阅读全文
posted @ 2020-04-12 16:43 西瓜0 阅读(213) 评论(0) 推荐(0)
摘要: A.Majestic 10 签到题。 #include<iostream> #include<cstdio> #include<cstring> #include<algorithm> #include<bitset> #include<cassert> #include<cctype> #incl 阅读全文
posted @ 2020-04-05 19:29 西瓜0 阅读(168) 评论(0) 推荐(0)
摘要: A Appeal to the Audience 要想使得总和最大,就要使最大值被计算的次数最多。要想某个数被计算的多,就要使得它经过尽量多的节点。于是我们的目标就是找到 k 条从长到短的链,这些链互不重合,且一端是叶子节点。可以通过长链剖分来将这棵树分为 k 条互不相交的长链,然后按照长度分配元素 阅读全文
posted @ 2020-03-26 22:28 西瓜0 阅读(171) 评论(0) 推荐(0)
摘要: 1.A题 题意:给定第一行的值表示m列的最大值,第m行的值表示n行的最大值,问是否会行列冲突 思路:挺简单的,不过我在一开始理解题意上用了些时间,按我的理解是输入两组数组,找出每组最大数,若相等则输出possible,否则输出impossible,代码很直接用的C语言 1 #include<stdi 阅读全文
posted @ 2020-03-18 14:11 西瓜0 阅读(145) 评论(0) 推荐(0)