上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 15 下一页
摘要: J - Til the Cows Come Home Bessie is out in the field and wants to get back to the barn to get as much sleep as possible before Farmer John wakes her 阅读全文
posted @ 2023-02-22 22:38 Keith- 阅读(23) 评论(0) 推荐(0)
摘要: E - Networking You are assigned to design network connections between certain points in a wide area. You are given a set of points in the area, and a 阅读全文
posted @ 2023-02-22 22:26 Keith- 阅读(40) 评论(0) 推荐(0)
摘要: D - Equals Problem Statement We have a permutation of the integers from 1 through$ N, p_1, p_2, .., p_N$. We also have $M$ pairs of two integers betwe 阅读全文
posted @ 2023-02-22 21:56 Keith- 阅读(24) 评论(0) 推荐(0)
摘要: C - The Suspects 2019冠状病毒病(英语:Coronavirus disease 2019,缩写:COVID-19 ),是一种由严重急性呼吸系统综合症冠状病毒2型(缩写:SARS-CoV-2)引发的传染病。此病在全球各国大规模爆发并急速扩散,成为人类历史上致死人数最多的流行病之一。 阅读全文
posted @ 2023-02-22 21:37 Keith- 阅读(21) 评论(0) 推荐(0)
摘要: A - Largest Rectangle in a Histogram A histogram(直方图)is a polygon(多边形) composed of a sequence of rectangles(矩形) aligned at a common base line. The rec 阅读全文
posted @ 2023-02-22 21:17 Keith- 阅读(42) 评论(0) 推荐(0)
摘要: 单调栈 给定一个长度为 N 的整数数列,输出每个数左边第一个比它小的数,如果不存在则输出 −1。 输入格式 第一行包含整数 N,表示数列长度。 第二行包含 N 个整数,表示整数数列。 输出格式 共一行,包含 N 个整数,其中第 i 个数表示第 i 个数的左边第一个比它小的数,如果不存在则输出 −1。 阅读全文
posted @ 2023-02-22 11:57 Keith- 阅读(62) 评论(0) 推荐(0)
摘要: H - 线段树 1 原题链接 题目描述 如题,已知一个数列,你需要进行下面两种操作: 将某区间每一个数加上 $k$。 求出某区间每一个数的和。 输入格式 第一行包含两个整数 $n, m$,分别表示该数列数字的个数和操作的总个数。 第二行包含 $n$ 个用空格分隔的整数,其中第 $i$ 个数字表示数列 阅读全文
posted @ 2023-02-20 23:18 Keith- 阅读(23) 评论(0) 推荐(0)
摘要: G - 逆序对 原题链接 题目描述 猫猫 TOM 和小老鼠 JERRY 最近又较量上了,但是毕竟都是成年人,他们已经不喜欢再玩那种你追我赶的游戏,现在他们喜欢玩统计。 最近,TOM 老猫查阅到一个人类称之为“逆序对”的东西,这东西是这样定义的:对于给定的一段正整数序列,逆序对就是序列中 $a_i>a 阅读全文
posted @ 2023-02-19 17:47 Keith- 阅读(98) 评论(0) 推荐(0)
摘要: A - k-rounding [原题链接] 思路 求$n$和$10^k$的最小公倍数 最小公倍数和最大公因数的关系 $a \cdot b = 最小公倍数 \cdot 最大公因数$ 代码 点击查看代码 #include<iostream> #include<cstdio> #include<cstri 阅读全文
posted @ 2023-02-19 13:01 Keith- 阅读(14) 评论(0) 推荐(0)
摘要: F - 树状数组 2 原题链接 题目描述 如题,已知一个数列,你需要进行下面两种操作: 将某区间每一个数加上 $x$; 求出某一个数的值。 输入格式 第一行包含两个整数 $N$、$M$,分别表示该数列数字的个数和操作的总个数。 第二行包含 $N$ 个用空格分隔的整数,其中第 $i$ 个数字表示数列第 阅读全文
posted @ 2023-02-19 12:14 Keith- 阅读(39) 评论(0) 推荐(0)
上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 15 下一页