自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(26)
  • 收藏
  • 关注

转载 D. Anton and Chess Codeforces Round #379 (Div. 2)

D. Anton and Chesstime limit per test4 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputAnton likes to play chess. Also, he likes t...

2018-08-10 00:34:00 130

转载 C. Anya and Smartphone (思维?乱搞)

C. Anya and Smartphonetime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputAnya has bought a new smartphone that us...

2018-08-10 00:29:00 156

转载 B. Mike and Feet Codeforces Round #305 (Div. 1) (并查集)

B. Mike and Feettime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputMike is the president of country What-The-Fath...

2018-08-10 00:25:00 129

转载 B. Han Solo and Lazer Gun 暴力 水

B. Han Solo and Lazer Guntime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputThere arenImperial stormtroopers on...

2018-08-10 00:21:00 112

转载 C. Number of Ways 思维

题目大意就是问能分出几个使三个区间的和相等的分发 1 #include <algorithm> 2 #include <stack> 3 #include <istream> 4 #include <stdio.h> 5 #include <map> 6 #include <mat...

2018-08-06 23:19:00 167

转载 C. Destroying Array 并查集/线段树 Intel Code Challenge Elimination Round (Div. 1 + Div. 2, combined)...

题目大意就是给一个初始数组,每次删除一个点,问你剩下的连续的那些点中,最大的和是多少 2种做法 第一种是离线并查集 (这里是不会用那个res[]数组,将子的权值挪给父亲那里. 第二种是线段树区间合并。(练手 ///线段树 1 #include <algorithm> 2 #include <st...

2018-08-05 23:11:00 92

转载 Educational Codeforces Round 38 (Rated for Div. 2) B. Run For Your Prize

B. Run For Your Prizetime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou and your friend are participating in ...

2018-08-05 23:00:00 65

转载 D. Vasiliy's Multiset 异或字典树

D. Vasiliy's Multisettime limit per test4 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputAuthor has gone out of the stories about...

2018-08-05 22:58:00 118

转载 C. Little Girl and Maximum Sum Codeforces Round #169 (Div. 2)

http://codeforces.com/contest/276/problem/C 原题连接解题说明:题目的意思是有若干对区间和的查询,问如何重组数组使查询结果的和最大。我的解法就是将对应的频率排序之后在求(求频率那里需要点思维嘻嘻直接贴代码了#include <algorithm>#include <stack>#...

2018-08-05 22:53:00 3093

转载 A - Sliding Window POJ - 2823

http://poj.org/problem?id=2823// 原题链接题目大意,就是输出每个相邻 (i,i+k+1)区间中的最大值/// 单调队列练习 1 #include <algorithm> 2 #include <stack> 3 #include <istream> 4 #inc...

2018-08-05 22:49:00 86

转载 Codeforces Round #162 (Div. 1) A. Escape from Stones

A. Escape from Stonestime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputSquirrel Liss lived in a forest peaceful...

2018-07-29 23:23:00 108

转载 Codeforces Round #202 (Div. 2) B. Color the Fence

B. Color the Fencetime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputIgor has fallen in love with Tanya. Now Igo...

2018-07-29 23:12:00 92

转载 Codeforces Beta Round #25 (Div. 2 Only) D. Roads not only in Berland

D. Roads not only in Berlandtime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputBerland Government decided to improve r...

2018-07-29 23:05:00 131

转载 D - Xenia and Bit Operations

D. Xenia and Bit Operationstime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputXenia the beginner programmer has a sequencea, consisting of2nn...

2018-07-29 00:00:00 179

转载 A. Sonya and Queries

题目大意,就是给你几种操作,添加, 删除,查询裸的字典树题目.. #include <algorithm> #include <stack> #include <istream> #include <stdio.h> #include <map> #include <math.h>...

2018-07-26 08:33:00 137

转载 Codeforces Beta Round #94 (Div. 1 Only)A. Statues

---恢复内容开始---A. Statuestime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputIn this task Anna and Maria play a ga...

2018-07-21 18:37:00 91

转载 dp1 最大子矩阵

///比赛想了好长时间的最大子矩阵...出来看看题解才懂,自己真蠢= = 1 #include <algorithm> 2 #include <stack> 3 #include <istream> 4 #include <stdio.h> 5 #include <map> 6 #i...

2018-06-10 23:05:00 67

转载 codeforce398div2C. Garland

' 1 对树后序遍历一遍,s【i】里存的是结点i上所有子树结点权值和(包括这个结点,但不包括那些已经切去的结点)从叶子往上遍历,当s【i】等于sum/3时,就在这个点切,当切去两个部分之后就不切了,最后看看剩下的部分等不等于sum/3就行了 上代码了 QAQ#include <algorithm>#include...

2018-05-30 15:13:00 114

转载 51 nod 01组成的倍数 1109

1,首先就是 (13%3=((1×10)%3+3)%3) 用同余定理,如果a%n=c,b%n=c,a<b,那么这个时候b就不用入队了,因为答案只看余数(这是第一种剪枝, 2,另外一个剪枝就是相同的余数不必继续入队列 ...

2018-04-11 19:52:00 67

转载 51nod 1272 最大距离贪心/单调栈

(1)题目大大意就是寻找一个(arr[i],arr[j]),(j>i&&arr[j]>arr[i])求(j-i)的最大值 (2)贪心思路,见代码1 (3)思路1维护一个单调递减的栈,如果发现此时的arr[i]小于此时栈顶元素,或者栈为空那么进,else(不二分最后一组数据会超时,)二分查...

2018-04-10 23:40:00 103

转载 51nod 1535深海探险 并查集/dfs

这题刚开始可能想的复杂了,(想用并查集判断是否有圆,之后Tarjan判断触手),看了大神的代码,orz,可能对图论的基本概念不是很了解,这个东西叫做环套树(N==M时成立)上代码了orz#include <algorithm>#include <stdio.h>#include <stack>#inc...

2018-04-09 19:32:00 69

转载 codeforce 1B

orz ,感觉一道很傻的模拟题,因为细节wa了好多回啊....感觉自己今天写的代码带毒... #include <stdio.h> #include <stack> #include <istream> #include <map> #include <math.h> ...

2018-04-03 22:47:00 119

转载 codeforce A. Accounting

A. Accountingtime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputA long time ago in some far country lived king C...

2018-03-18 11:47:00 58

转载 51 nod 1191 消灭兔子

切完之前那么最大奖励就来做的这个,思路是一样的= =,直接上代码了 #include <bits/stdc++.h>using namespace std;const int manx = 1e5+10;int hp[manx];struct fuck{ int val; int s...

2018-03-18 11:14:00 97

转载 51 nod 1163 最高奖励

orz网上大神并查集做法...之前确实想到类似的想法,不过复杂度有点高= =!,看了题解,给跪了!! (不过网上好多并查集的代码有点错误,题目中数据范围是1e9,可能大神们看错了,没处理下? 在我这里用min(总的活动数量,当前所需的时间)预处理了下。 不多说,上代码o...

2018-03-18 08:48:00 92

转载 51 nod

2.211,首先根据唯一分解定理,任意一个大于1的自然数N,都可以分解成有限个自然数的乘积2,根据1,我先手动筛选了一波,(首先,质数在这里是必须要加到ans里的,orz先上代码#include <algorithm>#include <stdio.h>#include <string.h>#include <math.h&...

2018-02-21 00:34:00 55

空空如也

空空如也

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

TA关注的人

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