
cf
DATELOST
I'm curious.
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
cf-1142c 求上凸包
题目 #include<iostream> #include<string.h> #include<math.h> #include<stdio.h> #include<algorithm> #include<vector> using namespace std; typedef long long ll; const in...原创 2019-10-25 13:21:16 · 146 阅读 · 0 评论 -
CF-1165E 思维
E. Two Arrays and Sum of Functions You are given two arrays a and b, both of length n. Let’s define a function f(l,r)=∑l≤i≤r ai⋅bi. Your task is to reorder the elements (choose an arbitrary order of ...原创 2019-05-15 11:21:43 · 313 阅读 · 0 评论 -
CF 670C 离散化
C. Cinema Moscow is hosting a major international conference, which is attended by n scientists from different countries. Each of the scientists knows exactly one language. For convenience, we enumera...原创 2019-05-29 23:33:48 · 457 阅读 · 0 评论 -
CF 1176C贪心
You are given an array a consisting of n integers. Each ai is one of the six following numbers: 4,8,15,16,23,42. Your task is to remove the minimum number of elements to make this array good. An array...原创 2019-06-10 21:43:06 · 582 阅读 · 0 评论 -
cf-220B 莫队 //对询问分块
http://codeforces.com/problemset/problem/220/B 155ms #include<bits/stdc++.h> using namespace std; const int N=1e5+5; typedef long long ll; int cnt[N],n,m,id; int pos[N],L=1,R,res,ans[N],block; s...原创 2019-07-20 20:07:59 · 157 阅读 · 0 评论 -
cf 600E/570D DSU on the tree 树上启发式合并
学习学习 600E 板子 #include<bits/stdc++.h> using namespace std; typedef long long ll; const int N=2e5+5; int fa[N],son[N],siz[N]; struct Edge{ int to,next; Edge(){} Edge(int to,int next):to(to),nex...原创 2019-07-22 21:56:55 · 141 阅读 · 0 评论 -
cf-1201C 二分答案
C. Maximum Median You are given an array a of n integers, where n is odd. You can make the following operation with it: Choose one of the elements of the array (for example ai) and increase it by 1 (t...原创 2019-08-05 22:21:11 · 410 阅读 · 0 评论 -
cf-1203E 网络流
E. Boxers There are n boxers, the weight of the i-th boxer is ai. Each of them can change the weight by no more than 1 before the competition (the weight cannot become equal to zero, that is, it must ...原创 2019-08-16 16:44:10 · 214 阅读 · 0 评论 -
cf-1019D 旋转坐标系 二分
D. Large Triangle time limit per test3 seconds memory limit per test256 megabytes inputstandard input outputstandard output There is a strange peculiarity: if you connect the cities of Rostov, Taganro...原创 2019-09-22 19:35:14 · 285 阅读 · 0 评论 -
cf-650A unordered_map
A. Watchmen time limit per test 3 seconds memory limit per test 256 megabytes inputstandard input outputstandard output Watchmen are in a danger and Doctor Manhattan together with his friend Daniel Dr...原创 2019-10-02 16:55:35 · 200 阅读 · 0 评论 -
cf-552D 组合数
D. Vanya and Triangles time limit per test4 seconds memory limit per test512 megabytes inputstandard input outputstandard output Vanya got bored and he painted n distinct points on the plane. After th...原创 2019-10-03 19:32:28 · 155 阅读 · 0 评论 -
CF-1165D 分解质因子
D. Almost All Divisors We guessed some integer number x. You are given a list of almost all its divisors. Almost all means that there are all divisors except 1 and x in the list. Your task is to find ...原创 2019-05-15 09:58:47 · 238 阅读 · 0 评论 -
CF 1155C gcd
C. Alarm Clocks Everywhere Ivan is going to sleep now and wants to set his alarm clock. There will be many necessary events tomorrow, the i-th of them will start during the xi-th minute. Ivan doesn’t ...原创 2019-04-23 21:21:41 · 205 阅读 · 0 评论 -
CF 1144D 模拟
D. Equalize Them All You are given an array a consisting of n integers. You can perform the following operations arbitrary number of times (possibly, zero): Choose a pair of indices (i,j) such that |i...原创 2019-04-01 18:05:21 · 397 阅读 · 0 评论 -
CF 1140A模拟
A. Detective Book Ivan recently bought a detective book. The book is so interesting that each page of this book introduces some sort of a mystery, which will be explained later. The i-th page contains...原创 2019-03-23 19:52:49 · 384 阅读 · 0 评论 -
CF 1140B 思维
B. Good String You have a string s of length n consisting of only characters > and <. You may do some operations with this string, for each operation you have to choose some character that still...原创 2019-03-23 20:09:36 · 461 阅读 · 0 评论 -
CF 1140C 贪心
C. Playlist You have a playlist consisting of n songs. The i-th song is characterized by two numbers ti and bi — its length and beauty respectively. The pleasure of listening to set of songs is equal ...原创 2019-03-23 20:12:35 · 756 阅读 · 2 评论 -
CF 1140D 区间DP
D. Minimum Triangulation You are given a regular polygon with n vertices labeled from 1 to n in counter-clockwise order. The triangulation of a given polygon is a set of triangles such that each verte...原创 2019-03-23 20:29:15 · 461 阅读 · 0 评论 -
CF 1144A 思维
A. Diverse Strings A string is called diverse if it contains consecutive (adjacent) letters of the Latin alphabet and each letter occurs exactly once. For example, the following strings are diverse: “...原创 2019-04-01 17:55:20 · 218 阅读 · 0 评论 -
CF 1144B 贪心
B. Parity Alternated Deletions Polycarp has an array a consisting of n integers. He wants to play a game with this array. The game consists of several moves. On the first move he chooses any element a...原创 2019-04-01 17:56:56 · 217 阅读 · 0 评论 -
CF 1144C 模拟
C. Two Shuffled Sequences Two integer sequences existed initially — one of them was strictly increasing, and the other one — strictly decreasing. Strictly increasing sequence is a sequence of integers...原创 2019-04-01 17:59:00 · 209 阅读 · 0 评论 -
CF 1141B dp
Each day in Berland consists of n hours. Polycarp likes time management. That’s why he has a fixed schedule for each day — it is a sequence a1,a2,…,an (each ai is either 0 or 1), where ai=0 if Polycar...原创 2019-03-21 00:02:40 · 206 阅读 · 0 评论