自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(11)
  • 收藏
  • 关注

原创 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 348

原创 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 150

原创 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 135

原创 基础算法——暑期打卡

刷题打卡快速排序1.第k个数第k个数Description给定一个长度为n的整数数列,以及一个整数k,请用快速选择算法求出数列的第k小的数是多少。Input一行包含两个整数 n 和 k。第二行包含 n 个整数(所有整数均在1~10^9范围内),表示整数数列。1≤n≤100000,1≤k≤nOutput输出一个整数,表示数列的第k小数。Sample Input 15 32 4 1 5 3Sample Output 13代码:#include<iostream&g

2021-08-19 01:01:30 172

原创 奶酪题解(洛谷P3958)

奶酪P3958 [NOIP2017 提高组] 奶酪题目描述现有一块大奶酪,它的高度为 h ,它的长度和宽度我们可以认为是无限大的,奶酪中间有许多半径相同的球形空洞。我们可以在这块奶酪中建立空间坐标系,在坐标系中,奶酪的下表面为 z = 0 ,奶酪的上表面为 z = h 。现在,奶酪的下表面有一只小老鼠 Jerry ,它知道奶酪中所有空洞的球心所在的坐标。如果两个空洞相切或是相交,则 Jerry 可以从其中一个空洞跑到另一个空洞,特别地,如果一个空洞与下表面相切或是相交, Jerry 则可以从奶酪下表

2021-08-18 17:06:42 493

原创 排序模板(记录)

冒泡排序#include <iostream>#include <cstdio>#include <algorithm>using namespace std;int a[1001];int main(){ int n; cin>>n; for(int i=0;i<n;i++) cin>>a[i];//从0开始 for(int i=0;i<n;i++){ for(int j=0;j<n-i-1;j++

2021-08-15 17:18:06 59

原创 逆序对数量

逆序对定义:对于给定的一段正整数序列,逆序对就是序列中 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 259

原创 Rope Folding

Contest2892 - 2021个人训练赛第39场Rope Folding时间限制: 1 Sec 内存限制: 64 MB题目描述Farmer John has a long rope of length L (1 <= L <= 10,000) that he uses for various tasks around his farm. The rope has N knots tied into it at various distinct locations (1 <

2021-08-12 17:09:56 323

原创 Insurance

Contest2892 - 2021个人训练赛第39场**Insurance**时间限制: 1 Sec 内存限制: 128 MB Special Judge题目描述Snuke has read his own fortune for tomorrow, and learned that there are N scenarios that can happen, one of which will happen tomorrow with equal probability. The i-t

2021-08-12 17:09:10 209

原创 土地恢复(贪心)

土地恢复(贪心)宣文胜的家乡山西省是我国的产煤大省,因为长期挖煤导致了他家乡的某些地方出现了地陷的情况。近几年国家大力开展环境整治和土地复耕,让人民不仅享受经济发展所带来的红利更要还老百姓绿水青山。为了把这些地陷的土地恢复平整,他的家乡决定聘请他负责这项工作。他负责恢复的是一条长度为n的土地,恢复土地的主要工作是填平下陷的地表。需要恢复的土地可以看作是n块首尾相连的区域,一开始,第i块区域下陷的深度为di。宣文胜决定每天选择一段连续区间[M, N] ,填充这段区间中的每块区域,让其下陷深度减少1。在选

2021-08-10 18:17:01 66

原创 UCF Local Programming Contest Round 1A记录

A、 Briefcases Full of Money题目描述输入描述:输出描述:示例1输入84 111 2 3 2 3输出5示例2输入200 3 20 5 4 1输出50示例3输入1000 2 2 2 2 2输出1题意:有6个箱子,里面分别装1,5,10,20,50,100的钞票,给出每个箱子里会装多少张钞票,求那个箱子里的钱最多,如果有两个箱子的钱一样多,选择钞票数少的那个,因为重量轻。代码:#include<iostream>#i

2021-07-20 17:05:14 354

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除