题解
文章平均质量分 64
日常做题的题解
samamthawyy
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
Irreducible Polynomial(数学)
Irreducible Polynomial题目描述In mathematics, a polynomial is an expression consisting of variables (also called indeterminate) and coefficients, that involves only the operations of addition, subtraction, multiplication, and non-negative integer exponents原创 2021-08-19 17:47:47 · 761 阅读 · 0 评论 -
This Message Will Self-Destruct in 5s
This Message Will Self-Destruct in 5s题目描述You are the top spy of AtCoder Kingdom. To prevent the stolen secret from being handed to AlDebaran Kingdom, you have sneaked into the party where the transaction happens.There are N attendees in the party, and原创 2021-08-19 17:27:39 · 232 阅读 · 0 评论 -
Peaks
Peaks题目描述There are N observatories in AtCoder Hill, called Obs. 1, Obs. 2, …, Obs. N. The elevation of Obs. i is Hi. There are also M roads, each connecting two different observatories. Road j connects Obs. Aj and Obs. Bj.Obs. i is said to be good when原创 2021-08-19 17:26:40 · 213 阅读 · 0 评论 -
奶酪题解(洛谷P3958)
奶酪P3958 [NOIP2017 提高组] 奶酪题目描述现有一块大奶酪,它的高度为 h ,它的长度和宽度我们可以认为是无限大的,奶酪中间有许多半径相同的球形空洞。我们可以在这块奶酪中建立空间坐标系,在坐标系中,奶酪的下表面为 z = 0 ,奶酪的上表面为 z = h 。现在,奶酪的下表面有一只小老鼠 Jerry ,它知道奶酪中所有空洞的球心所在的坐标。如果两个空洞相切或是相交,则 Jerry 可以从其中一个空洞跑到另一个空洞,特别地,如果一个空洞与下表面相切或是相交, Jerry 则可以从奶酪下表原创 2021-08-18 17:06:42 · 647 阅读 · 0 评论 -
逆序对数量
逆序对定义:对于给定的一段正整数序列,逆序对就是序列中 ai>aj, 且 i<j 的有序对求一列数有多少对逆序对例题:P1908 逆序对#include<iostream>#include<string.h>#include<algorithm>#include<math.h>using namespace std;const int N=500010;int n,a[N],tmp[N];long long ans=0;.原创 2021-08-14 20:44:15 · 392 阅读 · 0 评论 -
土地恢复(贪心)
土地恢复(贪心)宣文胜的家乡山西省是我国的产煤大省,因为长期挖煤导致了他家乡的某些地方出现了地陷的情况。近几年国家大力开展环境整治和土地复耕,让人民不仅享受经济发展所带来的红利更要还老百姓绿水青山。为了把这些地陷的土地恢复平整,他的家乡决定聘请他负责这项工作。他负责恢复的是一条长度为n的土地,恢复土地的主要工作是填平下陷的地表。需要恢复的土地可以看作是n块首尾相连的区域,一开始,第i块区域下陷的深度为di。宣文胜决定每天选择一段连续区间[M, N] ,填充这段区间中的每块区域,让其下陷深度减少1。在选原创 2021-08-10 18:17:01 · 122 阅读 · 0 评论
分享