自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

张洪基

keep hungry and calm

  • 博客(359)
  • 收藏
  • 关注

原创 数据结构专题(好久没更新ing...)

///

2019-09-23 18:35:35 232

原创 2021/5/9 省赛总结

五题银尾,比赛前我们分工读题我读ABCD,CDX读EFGHI,SGL读JKLM。开始感觉C题可以写,但是构造时只敢猜是个二叉树,后面得到答案的式子根本想不出来,当时过的人只有两个,跟CDX说完题意后推出式子把C题写过了,后来CDX给我讲C题时发现用的是树的基本知识,更偏向考察构造的思路。后来读BD题,想BD思路,都是卡在BD最后结论数据的处理上,没有头绪然后去看了M跟H题。m题最后还少读了一个四连块,m题最后猜了个假解法光速被驳回,后来回宿舍想了想自己的结论确实有点幼稚,不能想到啥就说啥。h题是个背包的板子

2021-05-10 09:12:56 348 4

原创 Codeforces Round #681 (Div. 2, based on VK Cup 2019-2020 - Final) A B C D

A. Kids Seating题意:要求理想的座位数之间gcd不为1且不能相互整除座位直接从4*n开始每次递减2倒序输出满足gcd为2且不会互相整除int main(){ int t=read(); while(t--){ int n=read(); for(int i=4*n;i>2*n;i-=2){ cout<<i<<" "; } cout<<endl; } return 0;}B. Saving the City

2020-11-03 23:47:03 225

原创 Educational Codeforces Round 97 (Rated for Div. 2) A B C D

A. Marketing Scheme题意:给定一个范围l, r判断r+1是否使得在范围内任选一个数字都满足l%(r+1)>=((r+1)+1)/2int l;int r;int main(){ int t=read(); while(t--){ l=read(); r=read(); int temp=r+1; if(l%temp>=(temp+1)/2){ cout<<"YES"<<endl; }else cout<&l

2020-10-28 20:17:03 339

原创 HDU - 6772 J - Lead of Wisdom(三维数组dfs)

In an online game, “Lead of Wisdom” is a place where the lucky player can randomly get powerful items.There are k types of items, a player can wear at most one item for each type. For the i-th item, it has four attributes ai,bi,ci and di. Assume the set o

2020-10-24 21:49:25 156

原创 2020CCPC秦皇岛赛后总结

第一次参加区域赛,虽然赛前刻意准备了很久比赛状态,但是感觉赛中自己也暴露了许多问题。1.赛前没有定制详细计划,而是延续了之前打牛客和网络赛谁读谁做的出题方案,团队之间更多的是较量2.中间电脑空闲了很久,大家都在读题而削减了后面银牌题的出题时间最后出了五道题,第六题出思路到CDX码代码只剩下半个小时,最后卡超时分析出错误只剩下五分钟,如果时间多争取点成绩应该会更理想。比赛期间大部分时间都是CDX在当键盘手,如果在F题读完题后我立刻上手,K题的出题机会估计会大大增加。赛中一个人读完题目后当作其他两个人的翻

2020-10-19 22:45:04 774

原创 2020/9/24

ccpc网络赛打完了,最后拿到一个名额,比赛过程中也发现很多问题,读题不能过分心切,在能自己清晰讲述出题意的前提下再注意速度,cdx手指骨折了,但比赛期间在前期题意思路跟最后压轴题上起到不可或缺的作用,前期跟sgl把前四道题过了,后来在博弈题上超时,跟cdx讨论完后出了这最后一道题,备战这段时间仍需保持手感,应对区域赛...

2020-09-25 00:05:59 125

原创 2020牛客暑期多校训练营(第十场)E Game

There are n columns of blocks standing in a row. The i-th column has a_iai​ blocks in the beginning. Each block has size 1\times 1\times 11×1×1. Define (x,y) represent the block at column x and is the y-th block from bottom to top. You can perform one o

2020-08-17 11:29:45 201

原创 2020牛客暑期多校训练营(第十场)A Permutation

思路:从 1 开始选,能选 2 的倍数就选 2 * x%p,能选 3 的倍数就选 3 * x%p,不能选就输出 −1bool visit[N];vector <int> res; void solve() { res.clear(); fill (visit, visit+N, false); int p = read(); int cnt = 1, num = 1; visit[num] = true; res.push_back(..

2020-08-17 11:02:02 144

原创 2020牛客暑期多校训练营(第八场)G Game SET

string tmp[5][5]{{"one","two","three"},{"diamond","squiggle","oval"},{"solid","striped","open"},{"red","green","purple"}};map<string,int>id;char s[100];int n,a[300][10];void solve(){ for(int i=1;i<=n;i++) for(int j=i+1;j<=n;j+..

2020-08-04 21:37:38 180

原创 2020牛客暑期多校训练营(第八场)I Interesting Computer Game

ll n;ll a[100005],b[100005];ll suma[100005];pair<__int128,__int128>stb[100005],sta[100005];__int128 ans;__int128 kmax;__int128 k;int main() { ll t=read(); for(ll iii=1; iii<=t; ++iii) { cin>>n; //lirun .

2020-08-04 21:19:53 194

原创 2020/8/1日志

训练一个月,牛客打了七场,从一开始签到到现在开始切中难题,平均每场能出一两道题,cf现在是蓝名,hhh压力还是有的信息学一本通跟进阶分别在石室中学网站和牛客上刷了一半,最近补完cf跟牛客多校继续刷题,顺便复习一下数据结构的图论,然后继续牛客上的进阶...

2020-08-02 21:14:28 209

原创 Educational Codeforces Round 92 (Rated for Div. 2) B. Array Walk(dp)

B. Array Walktime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou are given an array a1,a2,…,an, consisting of n positive integers.Initially you are standing at index 1 and have a score equal to a1

2020-08-02 21:11:22 165

原创 Educational Codeforces Round 92 (Rated for Div. 2) A. LCM Problem(构造)

A. LCM Problemtime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputLet LCM(x,y) be the minimum positive integer that is divisible by both x and y. For example, LCM(13,37)=481, LCM(9,6)=18.You are given

2020-08-02 20:42:22 261

原创 2020牛客暑期多校训练营(第七场)H Dividing

void cal(ll n, ll k){ for (ll l = 2, r; l <= k; l = r + 1) { r = n / l; r = min(r, n); if (r) r = n / r; else r = k; r = min(r, k); int len = (r - l + 1) % mod; i..

2020-08-01 21:25:10 211

原创 2020牛客暑期多校训练营(第七场)D Fake News

int main(){ int t=read(); while (t--) { cin>>n; if (n == 1||n==24) puts("Fake news!"); else puts("Nobody knows it better than me!"); } return 0;}

2020-08-01 21:18:35 244

原创 2020牛客暑期多校训练营(第七场)B Mask Allocation

int t;int n,m; vector <int >ve;void sol(int a,int b) { if(a<b) swap(a,b); if(!b) return ;//1 for(int i=1; i<=b; i++) { ve.push_back(b); } sol(b,a-b);} int main() { t=read(); while(t--) { ve...

2020-08-01 21:16:24 215

原创 CodeForces1388D Captain Flint and Treasure

D. Captain Flint and Treasuretime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputCaptain Fint is involved in another treasure hunt, but have found only one strange problem. The problem may be connected

2020-08-01 00:01:10 227

原创 牛客多校第六场 C Combination of Physics and Maths

int main() { int t; cin>>t; while(t--) { ll n,m; double num=0,arr[205][205]; cin>>n>>m; for(ll i=0; i<n; i++) { for(ll j=0; j<m; j++) { cin>>arr[i][j];..

2020-07-28 16:35:21 140

原创 牛客多校第六场 E-Easy Construction (构造)

题意:给出n,k,构造出一个n的全排列P,使得对于 1~n 中任意的数 i,P 都存在一个长为 i 的子区间,其和模 n 余 k。有解输出任意一组,无解输出 -1转载:https://blog.csdn.net/zjllll123/article/details/107606334首先如果要有解,k 必须是 n(n+1)/2 % n,因为长度为 n 的子区间只有一个,也就是 P 本身,而 P 本身的元素和就是 n(n+1)/2。然后假设 k 满足上述条件,此时是一定有解的。且k的值是固定的。k.

2020-07-28 15:11:42 181

原创 Codeforces Round #659 (Div. 2) C. String Transformation 1

C. String Transformation 1time limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputNote that the only difference between String Transformation 1 and String Transformation 2 is in the move Koa does. In this v

2020-07-27 11:25:33 201

原创 Codeforces Round #659 (Div. 2) A. Common Prefixes

A. Common Prefixestime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputThe length of the longest common prefix of two strings s=s1s2…sn and t=t1t2…tm is defined as the maximum integer k (0≤k≤min(n,m)) su

2020-07-27 11:12:35 140

原创 Codeforces Round #658 (Div. 2) C2. Prefix Flip (Hard Version)

C2. Prefix Flip (Hard Version)time limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputThis is the hard version of the problem. The difference between the versions is the constraint on n and the required num

2020-07-23 18:45:48 130

原创 2020牛客暑期多校训练营(第四场)F Finding the Order

题目描述ZYB has a so-called smart brain: He can always point out the keypoint in a complex problem.There are two parallel lines AB and CD in a plane. {A,B,C,D}A,B,C,D are all distinct points.You only know the Euclidean Distances between {AC,AD,BC,BD}AC,AD,B

2020-07-21 19:46:26 199

原创 2019HDU多校第二场 K - Keen On Everything But Triangle(主席树)

N sticks are arranged in a row, and their lengths are a1,a2,…,aN.There are Q querys. For i-th of them, you can only use sticks between li-th to ri-th. Please output the maximum circumference of all the triangles that you can make with these sticks, or pri

2020-07-17 16:26:41 155

原创 2020牛客暑期多校训练营(第一场)F Infinite String Comparision

int main() { while(cin>>str1&&cin>>str2) { ll len1=strlen(str1); ll len2=strlen(str2); ll len=2*max(len1,len2); bool flag=0; for(ll i=0; i<len; i++) { if(str1[i%len1]==str2[i...

2020-07-16 21:38:58 187

原创 2020牛客暑期多校训练营(第一场)J Easy Integration

void factor (){ ll i=1; fac[0]=1; for (;i<=2000000;i++) { fac[i]=fac[i-1]*i%MOD; }} ll power(ll a,ll n){ ll res=1; while (n) { if (n&1) { res=res*a%MOD; } a*=a; a%=MO..

2020-07-16 21:37:35 93

原创 2020牛客暑期多校训练营(第二场)C Cover the Tree

题目描述Given an unrooted tree, you should choose the minimum number of chains that all edges in the tree are covered by at least one chain. Print the minimum number and one solution. If there are multiple solutions, print any of them.输入描述:The first line co

2020-07-15 21:57:59 182

原创 2020牛客暑期多校训练营(第二场)F Fake Maxpooling(二维滑动窗口)

时间限制:C/C++ 3秒,其他语言6秒空间限制:C/C++ 262144K,其他语言524288K64bit IO Format: %lld题目描述Given a matrix of size n\times mn×m and an integer {k}k, where A_{i,j} = lcm(i, j)A i,j =lcm(i,j), the least common multiple of {i}i and {j}j. You should determine the sum of th

2020-07-13 21:51:43 306

原创 2020/7/10

一点通过完了 明天开始刷洛谷

2020-07-10 21:47:59 117

原创 2020/7/9

一点通明天把剩下的看完

2020-07-09 21:54:04 700

原创 2020/7/8

奥赛入门复习到并查集 翻图论理论速度慢了点争取明天看完

2020-07-08 21:36:06 135

原创 2020/7/7

一点通复习到动态规划一天半左右时间能复习完一遍了

2020-07-07 21:59:23 195

原创 2020/7/6日志

练了半天cf思维下午翻出来一点通题解过到递推明天看完Petya and StringsWord Capitalizationstr[0]=toupper(sr[0]);islower(str[0]) str[0]-=32;Stones on the Table分段函数(信息学奥赛一本通-T1051)0到5 6到10 11到15 16到20 类推t=n/5.0;switch(t){case 0: case 1: case 2}判断闰年(信息学奥赛一本通-T1055)余4

2020-07-06 21:52:56 144

原创 Codeforces Round #654 (Div. 2) C. A Cookie for You

C. A Cookie for Youtime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputAnna is a girl so brave that she is loved by everyone in the city and citizens love her cookies. She is planning to hold a party wi

2020-07-02 11:50:00 158

原创 Codeforces Round #654 (Div. 2) D. Grid-00100

D. Grid-00100time limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputA mad scientist Dr.Jubal has made a competitive programming task. Try to solve it!You are given integers n,k. Construct a grid A with si

2020-07-02 11:47:11 167

原创 Codeforces Round #653 (Div. 3) D - Zero Remainder Array

D. Zero Remainder Arraytime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou are given an arrayaaconsisting ofnnpositive integers.Initially, you have an integerx=0x=0. During one move, you

2020-06-29 10:38:48 216

原创 Educational Codeforces Round 90 (Rated for Div. 2) D. Maximum Sum on Even Positions

**D. Maximum Sum on Even Positions**time limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou are given an array a consisting of n integers. Indices of the array start from zero (i. e. the first element

2020-06-26 12:05:00 247

原创 Educational Codeforces Round 90 (Rated for Div. 2) C Pluses and Minuses

You are given a string s consisting only of characters + and -. You perform some process with this string. This process can be described by the following pseudocode:res = 0for init = 0 to infcur = initok = truefor i = 1 to |s|res = res + 1if s[i] ==

2020-06-26 11:22:58 202

原创 Codeforces Round #652 (Div. 2) C. RationalLee

C. RationalLeetime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputLee just became Master in Codeforces, and so, he went out to buy some gifts for his friends. He bought n integers, now it’s time to dis

2020-06-24 10:18:13 231

空空如也

空空如也

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

TA关注的人

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