自定义博客皮肤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 97 (Rated for Div. 2) 题解 A-D

题目点这里A.Marketing Scheme给一个区间[ l , r ],取一个数a,对于区间内任何一个数x,都满足x%a >= a/2;l<=a<=r时,肯定能取到x = a 这时 x%a = 0,不符合;a>r时,x%a = x,因此只要满足l>=a/2就可以了,故 2l >=a>r, 2l>r时满足;a<l时,[ l , r ]%a>=a/2时 ,必须满足r-l+1<a/2, r-l+1<l/2,第二种情况已经包含了

2020-10-28 17:24:23 135

原创 Codeforces Round #643 (Div. 2) A~E题题解

A. Sequence with Digits找规律可以发现进行足够多次操作后,一定会出现一个数字含有0,mindigit(x)=0;从那以后,数字就不会再变了;#include<bits/stdc++.h>using namespace std;#define int long long#define mem(a) memset(a,0,sizeof(a))#define lb(x) (x&(-x))const int inf=0x3f3f3f3f;const long

2020-05-19 19:06:17 184

原创 Educational Codeforces Round 87 (Rated for Div. 2)

题目在这A. Alarm Clock一个人要睡够a分钟,一开始睡了b分钟,闹钟响了,如果没睡足a分钟,那么他就将闹钟调后c分钟,同时要花d分钟再次入睡。问:睡够a分钟需要多久#include<bits/stdc++.h>using namespace std;#define int long long#define mem(a) memset(a,0,sizeof(a))#define lb(x) (x&(-x))const int inf=0x3f3f3f3f;co

2020-05-18 18:23:08 209

原创 Codeforces Round #597 (Div. 2) C. Constanze's Machine [基础DP]

https://codeforces.com/contest/1245/problem/CC. Constanze’s Machinetime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputConstanze is the smartest ...

2019-11-25 13:18:58 171

原创 p-binary(二进制数操作)

C. p-binarytime limit per test2 secondsmemory limit per test512 megabytesinputstandard inputoutputstandard outputVasya will fancy any number as long as it is an integer power of two. Petya, on th...

2019-11-23 13:07:47 320

原创 Codeforces Round #600 (Div. 2) C. Sweets Eating

题目链接C. Sweets Eatingtime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputTsumugi brought n delicious sweets to the Light Music Club. They are numb...

2019-11-23 09:32:19 286

原创 CodeForce 601 div2 Fridge Lockers (思维+模拟+贪心)

B. Fridge Lockerstime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputHanh lives in a shared apartment. There are n people (including Hanh) living ...

2019-11-20 20:07:27 197

原创 Codeforces Round #599 (Div. 2) B2 Character Swap (Hard Version)

CodeForce 1243 B2 Character Swap (Hard Version)https://codeforces.com/contest/1243/problem/B2题意: 给定两个长度为n的字符串,每次操作可以将两个字符串中任意两个位置的字母互换。问在m次操作中,能否使两个字符串相等;m<=2n;思路:首先统计下两个字符串中出现的字母的个数。如果某个字母出现了奇数...

2019-11-14 14:58:14 116

原创 Codeforces 1257 C. Dominated Subarray

Codeforces 1257 C. Dominated Subarrayhttps://codeforces.com/contest/1257/problem/C思路:从数组的开始将每个出现过的数字进行标记(位置),直到某个位置的数字(假设为i)之前出现过,即这个时候就说明存在子数组被i主导,记录下该子数组的长度,后面一直更新即可.下面是ac代码:#include<iostream...

2019-11-14 11:59:45 166

空空如也

空空如也

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

TA关注的人

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