自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 20210503训练赛

A - Easy hhh-indexThe h-index of an author is the largest h where he has at least h papers with citations not less than h.Bobo has published many papers.Given a0,a1,a2,…,an which means Bobo has published ai papers with citations exactly i, find the h-in

2021-05-04 14:04:29 138

原创 J - Let‘s go hiking

J - Let’s go hikingMichael喜欢滑雪百这并不奇怪, 因为滑雪的确很刺激。可是为了获得速度,滑的区域必须向下倾斜,而且当你滑到坡底,你不得不再次走上坡或者等待升降机来载你。Michael想知道载一个区域中最长底滑坡。区域由一个二维数组给出。数组的每个数字代表点的高度。下面是一个例子1 2 3 4 516 17 18 19 615 24 25 20 714 23 22 21 813 12 11 10 9一个人可以从某个点滑向上下左右相邻四个点之一,当且仅当高度减小。在

2021-05-02 16:27:37 166

原创 L. Lose it!

L. Lose it!You are given an array a consisting of n integers. Each ai is one of the six following numbers: 4,8,15,16,23,42.Your task is to remove the minimum number of elements to make this array good.An array of length k is called good if k is divisibl

2021-05-02 15:33:39 149

原创 M. Sum of 2050

M. Sum of 2050、水题,让我看看是哪个小可爱不会做time limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputA number is called 2050-number if it is 2050, 20500, …, (2050⋅10k for integer k≥0).Given a number n, you are asked to

2021-05-02 14:51:51 152

原创 C.Defuse the Bombs(简单二分)

C.Defuse the BombsWA了九次,让我来看看简单二分有多简单The terrorists have planted some bombs in a building! Our hero, Little Horse, decides to rescue the people in the building. Unfortunately, there is more than one bomb, and Little Horse is unable to defuse all of them.

2021-05-02 14:23:37 322

原创 set的使用

set的使用set是什么set是一个内部有序且不含重复元素的容器使得元素自动有序去除重复元素begin()–返回指向第一个元素的迭代器clear()–清除所有元素count()–返回某个值元素的个数empty()–如果集合为空,返回trueend()–返回指向最后一个元素的迭代器equal_range()–返回集合中与给定值相等的上下限的两个迭代器erase()–删除集合中的元素find()–返回一个指向被查找到元素的迭代器get_allocator()–返回集合的分配器ins

2021-04-28 21:40:40 277

原创 J.Prime

J.Primemaybe也是水题题目描述Give you a positive integer nn, can you find four prime numbers aa, bb, cc and dd satisfied that a + b + c + d = n and minimizing min(a, b, c, d)?a, b, c, d are allowed to be the same prime number.输入格式The first line contains an in

2021-04-06 20:31:20 115

原创 K.Selection

K.Selection签到题,直接交吧。题目描述There are nn vegetable-birds and LHR wants to kick their ass many times.In each round, LHR can select several unique vegetable-birds and kick their ass.To be fair, LHR should follow 22 principles:At the end of all rounds, each

2021-04-06 19:46:20 110

原创 C. Decryption

C. Decryption题目描述Fatwj udgmv ljauck, xdqafy klsjk khjwsv zslw, Yafzsf xsj vsjc vwyjww. Ak kggf sk lzw ygdvwf oafv sfv lzw bsvw vwo ewwl, lzwq oadd oaf lzw affmewjstdw af lzw ogjdv.Twfvwj sk oslwj, zshhq sk s vjwse, twsj lg yg tsuc lg esyhaw tjavyw. Ix l

2021-04-02 11:38:41 163

原创 B. Complete Number Upgrade

B. Complete Number Upgrade这个题在比赛的时候用暴力(就是纯暴力,不带脑子的那种),结果只出来前四个,第五个因为太大一直运行不出来。我们比赛时一直修改范围找第五个数,导致许多时间浪费掉了,如果程序一直在后台运行到比赛结束未必运行不出来,但是时间不够导致这题没有做出来。去看了师哥写的代码,只需要跑30s,(我们真是一群小辣鸡)。#include <bits/stdc++.h>using namespace std;typedef long long ll;typ

2021-04-02 10:19:45 115

原创 SDNUOJ---1083.爬楼梯

SDNUOJ—1083.爬楼梯DescriptionWZ是个蛋痛的人,总是喜欢琢磨蛋痛的事,比如他最近想知道上楼梯总共有多少种方式。已知他一步可以迈一阶、两阶或者三阶,现在给你楼梯的阶数,让你计算总共有多少种方式。Input输入有多组数据,每组数据占一行,表示楼梯的阶数。(1<=N<=35)Output对于每组数据,输出一行,表示上楼方式的总数。Sample Input12Sample Output12#include<stdio.h>#include&l

2021-02-17 10:58:57 324

原创 1286.有多少素数

1286.有多少素数Description给你很多的正整数,只是为了找出有多少素数。Input有很多的测试用例,每个测试用例第一行是正整数N,表示要从N个整数中找。每个整数不超过2147483647,其中每个不小于2。Output对于每种情况输出素数的个数。Sample Input32 3 4Sample Output2#include<stdio.h>#include<iostream>#include<algorithm>#include

2020-11-02 20:51:19 271

原创 深度搜索B - 棋盘问题

B - 棋盘问题在一个给定形状的棋盘(形状可能是不规则的)上面摆放棋子,棋子没有区别。要求摆放时任意的两个棋子不能放在棋盘中的同一行或者同一列,请编程求解对于给定形状和大小的棋盘,摆放k个棋子的所有可行的摆放方案C。input输入含有多组测试数据。每组数据的第一行是两个正整数,n k,用一个空格隔开,表示了将在一个n*n的矩阵内描述棋盘,以及摆放棋子的数目。 n <= 8 , k <= n当为-1 -1时表示输入结束。随后的n行描述了棋盘的形状:每行有n个字符,其中 # 表示棋盘区域

2020-11-01 17:07:43 538 1

原创 广度搜索A - Red and Black

广度搜索A - Red and BlackThere is a rectangular room, covered with square tiles. Each tile is colored either red or black. A man is standing on a black tile. From a tile, he can move to one of four adjacent tiles. But he can’t move on red tiles, he can move o

2020-11-01 16:53:15 128

空空如也

空空如也

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

TA关注的人

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