自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

天翼之城的博客

菜鸟的记录

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

原创 Codeforces Contest 1080 problem C Masha and two friends —— 黑白格染色

题目链接:http://codeforces.com/contest/1080/problem/C题意:给你一个n*m的矩形,(1,1)是白格,白格旁边是黑格,黑格旁边是白格,如此循环,然后给你两个矩形,第一个矩形把这个初始的矩形的那一块染成白色,之后的矩形把它染成黑色,白色被黑色重叠了就变成黑色了。问你最后有多少块白格,多少块黑格。题解:我们可以发现,只有在长和宽都是奇数的时候黑格白格的...

2019-01-31 16:07:53 239

原创 Codeforces Contest 1080 problem D Olya and magical square ——思维

Recently, Olya received a magical square with the size of 2n×2n.It seems to her sister that one square is boring. Therefore, she asked Olya to perform exactly k splitting operations.A Splitting oper...

2019-01-31 16:01:38 222

原创 Codeforces Contest 1061 problem D TV Shows——有约束的情况找区间长度最小(按开头排序的情况)

There are n TV shows you want to watch. Suppose the whole time is split into equal parts called “minutes”. The i-th of the shows is going from li-th to ri-th minute, both ends inclusive.You need a TV...

2019-01-30 21:25:05 215

原创 Codeforces Contest 1061 problem C . Multiplicity——DP

You are given an integer array a1,a2,…,an.The array b is called to be a subsequence of a if it is possible to remove some elements from a to get b.Array b1,b2,…,bk is called to be good if it is not ...

2019-01-30 20:57:44 244

原创 Codeforces Contest 1081 problem E Missing Numbers——枚举

Chouti is working on a strange math problem.There was a sequence of n positive integers x1,x2,…,xn, where n is even. The sequence was very special, namely for every integer t from 1 to n, x1+x2+…+xt ...

2019-01-29 21:50:58 331

原创 Codeforces Contest 1081 problem D Maximum Distance —— 并查集

Chouti was tired of the tedious homework, so he opened up an old programming problem he created years ago.You are given a connected undirected graph with n vertices and m weighted edges. There are k ...

2019-01-29 20:41:38 401

原创 Codeforces Contest 1081 problem B Farewell Party —— 找相同数

Chouti and his classmates are going to the university soon. To say goodbye to each other, the class has planned a big farewell party in which classmates, teachers and parents sang and danced.Chouti r...

2019-01-28 10:37:05 197

原创 Codeforces Contest 1079 problem E The Unbearable Lightness of Weights —— DP

You have a set of n weights. You know that their masses are a1, a2, …, an grams, but you don’t know which of them has which mass. You can’t distinguish the weights.However, your friend does know the ...

2019-01-27 20:32:56 190

原创 Codeforces Contest 1079 problem D Barcelonian Distance —— 枚举

In this problem we consider a very simplified model of Barcelona city.Barcelona can be represented as a plane with streets of kind x=c and y=c for every integer c (that is, the rectangular grid). How...

2019-01-27 13:57:55 221

原创 Codeforces Contest 1079 problem C Playing Piano——枚举

Little Paul wants to learn how to play piano. He already has a melody he wants to start with. For simplicity he represented this melody as a sequence a1,a2,…,an of key numbers: the more a number is, t...

2019-01-27 11:58:27 354

原创 Codeforces contest 1056 problem E Check Transcription —— 字符串hash

One of Arkady’s friends works at a huge radio telescope. A few decades ago the telescope has sent a signal s towards a faraway galaxy. Recently they’ve received a response t which they believe to be a...

2019-01-26 19:19:06 383 1

原创 Codeforces Contest 1056 problem B Divide Candies —— 取模的一个性质

Arkady and his friends love playing checkers on an n×n field. The rows and the columns of the field are enumerated from 1 to n.The friends have recently won a championship, so Arkady wants to please ...

2019-01-26 11:12:51 289

原创 Codeforces Contest 1030 problem E Vasya and Good Sequences——DP

Vasya has a sequence a consisting of n integers a1,a2,…,an. Vasya may pefrom the following operation: choose some number from the sequence and swap any pair of bits in its binary representation. For e...

2019-01-25 21:51:49 243

原创 Codeforces Contest 1030 problem D Vasya and Triangle——画三角形

Vasya has got three integers n, m and k. He’d like to find three integer points (x1,y1), (x2,y2), (x3,y3), such that 0≤x1,x2,x3≤n, 0≤y1,y2,y3≤m and the area of the triangle formed by these points is e...

2019-01-25 12:52:13 141

原创 Codeforces Contest 1082 problem E Increasing Frequency —— DP

You are given array a of length n. You can choose one segment [l,r] (1≤l≤r≤n) and integer value k (positive, negative or even zero) and change al,al+1,…,ar by k each (i.e. ai:=ai+k for each l≤i≤r).Wh...

2019-01-24 18:21:34 138

原创 Codeforces Contest 1082 problem D Maximum Diameter Graph —— 图的最短路最长

Graph constructive problems are back! This time the graph you are asked to build should match the following properties.The graph is connected if and only if there exists a path between every pair of ...

2019-01-23 21:07:30 278

原创 Codeforces Contest 1082 C Multi-Subject Competition——枚举

A multi-subject competition is coming! The competition has m different subjects participants can choose from. That’s why Alex (the coach) should form a competition delegation among his students.He ha...

2019-01-23 14:02:06 224

原创 Codeforces Contest 1088 problem E Ehab and a component choosing problem —— dfs找权值和最大的联通块

You’re given a tree consisting of n nodes. Every node u has a weight au. You want to choose an integer k (1≤k≤n) and then choose k connected components of nodes that don’t overlap (i.e every node is i...

2019-01-22 22:41:06 140

原创 Codeforces Contest 1093 problem G Multidimensional Queries —— 枚举+线段树

You are given an array a of n points in k-dimensional space. Let the distance between two points ax and ay be ∑i=1k|ax,i−ay,i| (it is also known as Manhattan distance).You have to process q queries o...

2019-01-22 14:54:22 151

原创 Codeforces Contest 1093 problem E Intersection of Permutations——CDQ分治

You are given two permutations a and b, both consisting of n elements. Permutation of n elements is such a integer sequence that each value from 1 to n appears exactly once in it.You are asked to per...

2019-01-21 23:25:48 288

原创 156 - ZOJ Monthly, January 2019 - A Little Sub and Pascal's Triangle找规律

Little Sub is about to take a math exam at school. As he is very confident, he believes there is no need for a review.Little Sub’s father, Mr.Potato, is nervous about Little Sub’s attitude, so he giv...

2019-01-20 12:45:14 208

空空如也

空空如也

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

TA关注的人

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