Virtual contest is a way to take part in past contest, as close as possible to participation on time. It is supported only ICPC mode for virtual contests. If you've seen these problems, a virtual contest is not for you - solve these problems in the archive. If you just want to solve...
Codeforces Beta Round 2 Finished → Virtual participation Virtual contest is a way to take part in past contest, as close as possible to participation on time. It is supported only ICPC mode for virtual contests. If you've seen these problems, a virtual contest is not for you - solve ...
The name of one small but proud corporation consists ofnlowercase English letters. The Corporation has decided to try rebranding — an active marketing strategy, that includes a set of measures to change either the brand (both for the company and the goods it produces) or its components: the ...
CodeForces - Problem 1442 A - Extreme Subtraction - DP 这是一道构造题,之前没练过构造.思路是贪心,DP #include<bits/stdc++.h>using namespacestd;intn,t;intv[30000+4];inta[30000+4],b[30000+4];intmain(){scanf("%d",&t);while(t--){intflag =1;scanf("%d",&n);for(inti=1;i<=n;i...
codeforces ECR 80 minimax problem (二分 构造) 题目大意: 有n个数列,选出第i,j个,我们可以得到新数列如下: for k 1->m: a[z][k]=max(a[i][k],a[j][k]) 问我们得到的新数列z中,哪一个的min(a[z][k])最大 即: max(min (a[z][k]))) {k:1->m }...
Arpa’s obvious problem and Mehrdad’s terrible solution 题目链接 :http://codeforces.com/contest/742/problem/B 题意:给你n个数和一个x,问你n个数中有几对(ai , aj)的xor值为x,而且j>i。 题目比较简单看一下代码就会秒懂了。还有要注意结果用longlong来存。 ......
Codeforces 713C Sonya and Problem Wihtout a Legend(单调DP),【题目链接】 http://codeforces.com/problemset/problem/713/C【题目大意】给出一个数列,请你经过调整使得其成为严格单调递增的数列,调整就是给某些位置加上或者减去某个数,调整的代价是加上或者减去的
A repository to keep track of problem solving practice, containing solutions from platforms: Codeforces AtCoder Contents #TitleSolutionTagsSubmitted 1654 F - Sum Sum Max C++ (GCC 9.2.1) AtCoder *500 Mar/26/2022 18:13 1653 E - Ranges on Tree C++ (GCC 9.2.1) AtCoder *500 Mar/26/2022...
I would like to organize a Codeforces round with my problems. What should I do to achieve that? Are the authors entitled to get any reward? Do you want to organize a round? That's great! We are very pleased to hear that. Please, read the post. What other rules are on Codeforces?
题目链接:Problem - E - Codeforces 题意: t组数据,给定n个点、点u有颜色au的有根树,点1为该树的根,定义f(u,v)为u→v的路径上的颜色数目,u不是v祖先时无定义。对于所有点对(u,v),其中u不一定相异于v,设l为u,v的最近公共祖先,求maxf(l,u)⋅f(l...