自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 Educational Codeforces Round 111 EditorialA-C题解

Educational Codeforces Round 111 Editorial 1550A - Find The Array 思路:取n个数和最大情况为1,3,5,…,和为n²,那么对于(n-1)²-n²的数x,前n-1个取最大,最后一个取x-(n-1)²,实际上会发现最后一个数是在前面的范围内+1或者+2得到也就是说合法的,故只要判断哪个n²比和大就行了 代码 #include <bits/stdc++.h> #define maxn 105 using namespace std; i

2021-07-16 20:12:45 130

原创 Codeforces Round #714(Div.2)A-C

Codeforces Round #714(Div.2)A-C补题 A. Array and Peaks A sequence of n integers is called a permutation if it contains all integers from 1 to n exactly once. Given two integers n and k, construct a permutation a of numbers from 1 to n which has exactly k pea

2021-04-12 14:07:06 497

原创 CF156B - Suspects

CF156B - Suspects(枚举) As Sherlock Holmes was investigating a crime, he identified n suspects. He knows for sure that exactly one of them committed the crime. To find out which one did it, the detective lines up the suspects and numbered them from 1 to n. A

2021-03-25 13:41:41 139

原创 Maximum Value

Maximum Value(枚举剪枝+二分) You are given a sequence a consisting of n integers. Find the maximum possible value of (integer remainder of ai divided by aj), where 1 ≤ i, j ≤ n and ai ≥ aj. Input The first line contains integer n — the length of the sequence (1

2021-03-14 22:55:03 273

原创 A - Mike and Children

A - Mike and Children(枚举) Mike decided to teach programming to children in an elementary school. He knows that it is not an easy task to interest children in that age to code. That is why he decided to give each child two sweets. Mike has n sweets with siz

2021-03-14 18:34:20 107

原创 2021-03-14

Codeforces Round #707 Div.2补题 A.Alexey and Train 这题就从前往后模拟就行了 #include <cstdio> #include <iostream> #include <cstring> #include <vector> #include <algorithm> #include <iomanip> using namespace std; int a[105],b[105],tme[

2021-03-14 13:58:00 96

原创 2021-01-28

Best Cow Line(头尾比较字典序) Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 53473 Accepted: 13477 Description FJ is about to take his N (1 ≤ N ≤ 2,000) cows to the annual"Farmer of the Year" competition. In this contest every farmer arranges his co

2021-01-28 17:20:48 107

原创 练习题2

Cubes Sorting For god’s sake, you’re boxes with legs! It is literally your only purpose! Walking onto buttons! How can you not do the one thing you were designed for? Oh, that’s funny, is it? Oh it’s funny? Because we’ve been at this for twelve hours and y

2020-10-25 17:49:19 144

原创 练习题1

Copy-paste — Hey folks, how do you like this problem? — That’ll do it. BThero is a powerful magician. He has got n piles of candies, the i-th pile initially contains ai candies. BThero can cast a copy-paste spell as follows: He chooses two piles (i,j) such

2020-10-25 16:03:55 141

空空如也

空空如也

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

TA关注的人

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