个人排位赛
欧阳小百合
始于足下!
展开
-
# 2021 Hubei湖北省赛 F. Battery
F. Battery题目传送门题面:中文题意:给你一堆不同容量的电池和一堆任务的耗电情况。每个任务最多只能用一节电池。问最多完成几个任务。贪就完了。代码:#include <bits/stdc++.h>using namespace std;typedef long long ll;const int MAXN = 3e5 + 10;int a[100005], b[300005];int main() { int n, m; cin >&原创 2021-05-27 13:48:39 · 724 阅读 · 11 评论 -
# 2021年东华大学金马程序设计联赛 K. AEMShana loves games!
K. AEMShana loves games! //注意,不是说有黑球就是-1,白球就是1。因为题目上说了球下落不是一个个的,所以还是用+=1/-=1比较靠谱。 //因为这个点我卡了二十几分钟,感觉dp递推全对的草。原创 2021-05-10 23:52:04 · 125 阅读 · 2 评论 -
# 2021 年东华大学金马程序设计联赛 D. Move the numbers
D. Move the numbers题目传送门:题目传送门题目思路:纯模拟的憨批题。20行解决代码。代码:#include<bits/stdc++.h>using namespace std;typedef long long ll;const int maxn = 114514 + 10;int main() { ios::sync_with_stdio(false); cin.tie(0); int n, m, k; while (原创 2021-05-10 23:40:27 · 118 阅读 · 0 评论 -
# 2021 年东华大学金马程序设计联赛 C. Back
C. Back题目传送门:题目传送门题面:思路:简单的并查集思想。代码:#include<bits/stdc++.h>using namespace std;typedef long long ll;const int maxn = 114514 + 10;//ll const mod = 1e9 + 7;//ll f[maxn] = {0};//ll m, k;ll f[maxn];int n, m;ll find(ll x) { return (原创 2021-05-10 23:38:29 · 90 阅读 · 0 评论 -
# 2021 年东华大学金马程序设计联赛 A. Smart AEMShana!
A. Smart AEMShana!题目传送门:题目链接在此题面:题目大意:给予一个m∗mm*mm∗m加法矩阵:a[i][j]==i+j(i,j≥1)a[i][j]==i+j (i,j≥1)a[i][j]==i+j(i,j≥1)求第k小的那个数字。思路:二分思想。并且找矩阵规律。1,3,6…an=n(n+1)/2a_n=n(n+1)/2an=n(n+1)/2老超时,烦人,用了不常用的IO流。代码:#include<bits/stdc++.h>using n原创 2021-05-10 23:35:22 · 126 阅读 · 0 评论 -
11.25日常PTA训练_7-8 螺旋方阵
7-8 螺旋方阵老实说这题还卡了我一会…题目链接在此!7-8 螺旋方阵 (20分)所谓“螺旋方阵”,是指对任意给定的N,将1到N×N的数字从左上角第1个格子开始,按顺时针螺旋方向顺序填入N×N的方阵里。本题要求构造这样的螺旋方阵。输入格式:输入在一行中给出一个正整数N(<10)。输出格式:输出N×N的螺旋方阵。每行N个数字,每个数字占3位。输入样例:5输出样例:1 2 3 4 516 17 18 19 615 24 25 20 714 23 22 21原创 2020-11-26 14:46:25 · 499 阅读 · 0 评论 -
11.25日常PTA训练_7-1 查找书籍 (20分)
7-1 查找书籍题目链接在此!给定n本书的名称和定价,本题要求编写程序,查找并输出其中定价最高和最低的书的名称和定价。输入格式:输入第一行给出正整数n(<10),随后给出n本书的信息。每本书在一行中给出书名,即长度不超过30的字符串,随后一行中给出正实数价格。题目保证没有同样价格的书。输出格式:在一行中按照“价格, 书名”的格式先后输出价格最高和最低的书。价格保留2位小数。输入样例:3Programming in C21.5Programming in VB18.5Progr原创 2020-11-26 14:36:59 · 393 阅读 · 0 评论 -
# 全国大学生算法设计竞赛 I小x的好路-road
题目链接在此!思路分析每个顶点都对结果有贡献,那么就分别考虑每个顶点——对于每个顶点来说,假设其相连的边按从大到小的权值排序后分别为e1,e2,e3,…,最优的方案就是e1与e2组合,e3与e4组合…这样,该顶点对结果的贡献值为e1+e3+e5+…。处理所有顶点,最终结果即为最终解。可以证明该贪心算法的正确性。代码:#include <iostream>#include <cstdio>#include <cstdlib>#include <st原创 2020-11-18 08:58:54 · 165 阅读 · 0 评论 -
# 全国大学生算法设计竞赛 H最大化
题目链接在此!#include <iostream>#include <cstdio>#include <vector>#include <cstdlib>#include <string>#include <cstring>#include <list>#include <queue>#include <stack>#include <set>#include &原创 2020-11-18 08:34:49 · 158 阅读 · 0 评论 -
# 全国大学生算法设计竞赛 F大数据分析
题目链接在此大数据分析-data Description小x在做大数据分析。第一天分析的数据量为11个单位,此后计算机每天都会进行升级,因此每天能分析的数据量都会不同,设第ii天分析的数据量为AA,第i+1i+1天分析的数据量为A*(A+5)A∗(A+5)。现在小x计划做3030天大数据分析,想知道三十天总计分析的数据量为多少。由于答案会很大,故只需要输出对1e9+71e9+7取模的结果即可。即输出最终结果最10000000071000000007取模的结果。注意,这是一道提交答案题,提交时只需原创 2020-11-18 01:02:15 · 445 阅读 · 0 评论 -
# 全国大学生算法设计竞赛 D兰德索尔杯-cup
题目链接在此#include <iostream>#include <cstdio>#include <cstdlib>#include <string>#include <cstring>#include <list>#include <queue>#include <stack>#include <set>#include <algorithm>#include原创 2020-11-18 00:50:10 · 525 阅读 · 0 评论 -
# 全国大学生算法设计竞赛 B
题目链接在此!数位dp-dpDescription小x对数位dp很感兴趣,现在他在解决一道题目,要求求解出``[x,y]闭区间内所有满足以下性质的数字个数:相邻位数字差值的绝对值不能超过77。 且最低位与最高位差值的绝对值要大于22。现在,给出x=13930,y=457439。x=13930,y=457439。请你告诉小x,满足要求的数字个数。注意,这是一道提交答案题,提交时只需将问题答案输出即可。Input 无Output 注意,这是一道提交答案题,提交时只需将问题答案输出即可。#原创 2020-11-18 00:41:11 · 499 阅读 · 0 评论 -
#11.11 个人排位赛round2_B.双端队列(黑暗爆炸 - 2457)
B.双端队列DescriptionSherry现在碰到了一个棘手的问题,有N个整数需要排序。Sherry手头能用的工具就是若干个双端队列。她需要依次处理这N个数,对于每个数,Sherry能做以下两件事: 1.新建一个双端队列,并将当前数作为这个队列中的唯一的数;2.将当前数放入已有的队列的头之前或者尾之后。 对所有的数处理完成之后,Sherry将这些队列排序后就可以得到一个非降的序列。Input 第一行包含一个整数N,表示整数的个数。接下来的N行每行包含一个整数Di,其中Di表示所需处理的原创 2020-11-13 20:00:11 · 157 阅读 · 0 评论 -
#11.11 个人排位赛round2_A.Diana and Liana(CodeForces 1121D)
A.Diana and Liana题目链接在此!这题也是心理变态出的。头疼!A.Diana and Liana(CodeForces 1121D)At the first holiday in spring, the town Shortriver traditionally conducts a flower festival. Townsfolk wear traditional wreaths duringthese festivals. Each wreath contains exac原创 2020-11-13 15:15:24 · 131 阅读 · 0 评论 -
#11.9 团队排位赛round1_H - PepperLa‘s String(Gym - 102801H)
H - PepperLa’s String未完,晚点细补,这题肯定是心理变态出的。PepperLa loves strings.His desire for strings is infinite, but hisstorage is limited.There is a method to compress strings. A substring whose charactersare all the same and are all lower case letters could be原创 2020-11-09 16:41:43 · 419 阅读 · 0 评论 -
#11.9 团队排位赛round1_Gym - 102801C _C - Function
C - Function题目链接在此C - FunctionDefine function f(x)=∏i=1len(x%10i)%(x+1), where len represents the digit length of x.For example, f(1023)=(3∗23∗23∗1023)%1024.Define function g(n,m)={f(g(n,m−1))f(n)m>1m=1. For example, g(n,2)=f(f(n)).You are given原创 2020-11-09 15:42:05 · 167 阅读 · 0 评论 -
# 11月4日 每周集训队个人排位赛B_I,zombie(HDU 3640)
题目链接在此!B - I, zombieThe “endless” model in “I, zombie” of “Plants vs. Zombies” is my favourite.The aim of the game is to put down the zombies most reasonable in the right-most , to eat the brain protected by Plants in the left-most.To simplify the pro原创 2020-11-05 17:25:39 · 94 阅读 · 0 评论 -
# 11月4日 每周集训队个人排位赛A_Try and catch(codeforces195C)
题目链接在此C. Try and Catchtime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputVasya is developing his own programming language VPL (Vasya Programming Language). Right now he is busy making the system of原创 2020-11-05 12:40:19 · 102 阅读 · 0 评论