Educational Codeforces Round 37 (Rated for Div. 2) 920E E. Connected Components?
题OvO http://codeforces.com/contest/920/problem/E解模拟一遍……1.首先把所有数放到一个集合 s 中,并创建一个队列 que2.然后每次随便取一个数,并且从集合中删除这个数,将这个数放入 que3.取 que 首元素,记为 now,然后枚举集合 s,每次...
codeforces 920 EFG 题解合集 ( Educational Codeforces Round 37 )
E. Connected Components?time limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou are given an undirec...
Educational Codeforces Round 37 (Rated for Div. 2)
我的代码应该不会被hack,立个flagA. Water The Gardentime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputIt is wint...
Educational Codeforces Round 16 E. Generate a String dp
题目链接:http://codeforces.com/problemset/problem/710/EE. Generate a Stringtime limit per test 2 secondsmemory limit per test 512 megabytes#### 问题描述> z...
「暑期训练」「Brute Force」 Optimal Point on a Line (Educational Codeforces Round 16, B)
题意You are given n points on a line with their coordinates $x_i$. Find the point x so the sum of distances to the given points is minimal.分析答案是直觉上显然的:输...
C Make a Square Educational Codeforces Round 42 (Rated for Div. 2) (暴力枚举,字符串匹配)
C. Make a Squaretime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou are given a positive integer...
Educational Codeforces Round 60 (Rated for Div. 2) - C. Magic Ship
Problem Educational Codeforces Round 60 (Rated for Div. 2) - C. Magic ShipTime Limit: 2000 mSecProblem DescriptionInputOutputThe only line should co...
Educational Codeforces Round 42 (Rated for Div. 2)
A. Equator(模拟)找权值的中位数,直接模拟。。代码写的好丑qwq。。#include<cstdio>#include<cstring>#include<algorithm>#include<cmath>using namespace std;...
Educational Codeforces Round 39 (Rated for Div. 2) G
Educational Codeforces Round 39 (Rated for Div. 2) G题意:给一个序列\(a_i(1 <= a_i <= 10^{9}),2 <= n <= 200000\), 如果至多删除其中的一个数之后该序列为严格上升序列,那么称原序列为...
[Educational Codeforces Round 16]A. King Moves
[Educational Codeforces Round 16]A. King Moves试题描述The only king stands on the standard chess board. You are given his position in format "cd", where c...
Educational Codeforces Round 35 (Rated for Div. 2)
Educational Codeforces Round 35 (Rated for Div. 2)https://codeforces.com/contest/911A模拟 #include<bits/stdc++.h> using namespace std; #define lso...
Educational Codeforces Round 69 (Rated for Div. 2) E. Culture Code
Educational Codeforces Round 69 (Rated for Div. 2) E. Culture Code题目链接题意:给出\(n\)个俄罗斯套娃,每个套娃都有一个\(in_i,out_i\),并满足\(out_i>in_i\)。定义套娃\(i\)能套在套娃\(j\)...
Educational Codeforces Round 69 (Rated for Div. 2) D. Yet Another Subarray Problem 背包dp
D. Yet Another Subarray ProblemYou are given an array \(a_1, a_2, \dots , a_n\) and two integers \(m\) and \(k\).You can choose some subarray \(a_l, a...
Educational Codeforces Round 42 (Rated for Div. 2)F - Simple Cycles Edges
http://codeforces.com/contest/962/problem/F求没有被两个及以上的简单环包含的边解法:双联通求割顶,在bcc中看这是不是一个简单环,是的话把整个bcc的环加到答案中即可(正确性显然,因为bcc一定是环了,然后如果一个bcc不是简单环,那么所有边一定包含在两个简...
Educational Codeforces Round 48 (Rated for Div. 2) CD题解
Educational Codeforces Round 48 (Rated for Div. 2)C. Vasya And The Mushrooms题目链接:https://codeforces.com/contest/1016/problem/C题意:emmm,说不清楚,还是直接看题目吧。题解...
Educational Codeforces Round 69 (Rated for Div. 2) C. Array Splitting 水题
C. Array SplittingYou are given a sorted array
Educational Codeforces Round 69 (Rated for Div. 2) A~D Sloution
A. DIY Wooden Ladder题意:有一些不能切的木板,每个都有一个长度,要做一个梯子,求梯子的最大台阶数做梯子的木板分为两种,两边的两条木板和中间的若干条台阶木板台阶数为 $k$ 的梯子要求两边的木板长度大于等于 $k+1$ ,中间的木板数等于 $k$。直接找到最大和次大的木板放两边,剩...
Educational Codeforces Round 42 (Rated for Div. 2) A
A. Equatortime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputPolycarp has created his own training ...
Educational Codeforces Round 69 E - Culture Code (最短路计数+线段树优化建图)
题意:有n个空心物品,每个物品有外部体积outi和内部体积ini,如果ini>outj,那么j就可以套在i里面。现在我们要选出n个物品的一个子集,这个子集内的k个物品全部套在一起,且剩下的物品都无法添加到这个子集中(没有空间塞进去)。定义浪费的空间为子集中空心的部分,即ini1+(ini2−o...
Educational Codeforces Round 5
616A - Comparing Two Long Integers 20171121直接暴力莽就好了...没什么好说的#include<stdlib.h>#include<stdio.h>#include<math.h>#include<cstrin...