自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

柳予欣的三味书屋~

bu ling bu ling

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

原创 有什么想要联系我的(问题也好,交流也好),欢迎来call我QQ675502062

111

2019-04-21 11:15:21 314

原创 LYX的代码能力恢复计划

一年没写代码的LYX已经是个废人了。 现在开始每周打lc恢复恢复实力。。 5695. N 次操作后的最大分数和 给你nums,它是一个大小为2 * n的正整数数组。你必须对这个数组执行n次操作。 在第i次操作时(操作编号从1开始),你需要: 选择两个元素x和y。 获得分数i * gcd(x, y)。 将x和y从nums中删除。 请你返回n次操作后你能获得的分数和最大为多少。 函数gcd(x, y)是x和y的最大公约数。 这是一个简...

2021-03-21 00:49:20 371

原创 简单译文 - NeurIPS-2020-training-generative-adversarial-networks-with-limited-data-Paper

2021-01-05 19:40:59 678 1

原创 KickStart Round H

A #include <iostream> #include <algorithm> #include <cstring> #include <vector> #define LL long long #define lson l,m,rt<<1 #define rson m+1,r,rt<<1|1 using namespace std; int main() { ios::sync_with_stdio(0);

2020-11-15 15:23:58 376 9

原创 Educational Codeforces Round 94 [Rated for Div. 2]

B. RPG Protagonist time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output You are playing one RPG from the 2010s. You are planning to raise your smithing skill, so you need as many resources a

2020-08-26 00:43:45 442

原创 2020牛客暑期多校训练营(第五场)B Graph

根据题目描述我们可以知道,无论添加的时间顺序,添加a-b的边的大小一定是固定的,即a-b上的路径上的所有长度的异或,所以题目就可以简化成寻找完全图的最小生成树。 设dis[n]为0-n点的链路上所有边长的的异或,则在之前所说的完全图中,a-b的边长就是dis[a] ^ dis[b],即为a-b上的路径上的所有长度的异或(假设最小公共祖先为c,dis[a]^dis[b]中有两段多余的0-c的异或会被相互中和掉)。则相当于每个点有一个值dis[n],而两点之间边长即为dia[a]^dis[b]...

2020-07-25 17:41:25 1818 7

原创 洛谷多校 - Earthquake(线段树)

线段树维护,三个lazy数组表示这个区间分别有个从右到左,全部,从左到右的数据覆盖。 #include<bits/stdc++.h> using namespace std; #define lson l,m,rt<<1 #define rson m+1,r,rt<<1|1 const int N = 5e5 + 10; i...

2020-03-31 14:11:05 332

原创 Codeforces Round #624 (Div. 3) F Moving Points(离散化+树状数组)

F. Moving Points time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output There arennpoints on a coordinate axisOXOX. Theii-th point i...

2020-02-24 23:51:10 604

原创 Codeforces Round #618 (Div. 2)全解

A. Non-zero time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Guy-Manuel and Thomas have an arrayaaofnnintegers [a1,a2,…,ana1,a2...

2020-02-10 01:33:35 679

原创 CodeForces Good Bye 2019 A-E

A. Card Game time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Two players decided to play one interesting card game. There is a de...

2019-12-30 01:39:38 829 3

原创 Educational Codeforces Round 79 (Rated for Div. 2) A-D

#include<bits/stdc++.h> using namespace std; const int inf = 0x3f3f3f3f; int main(){ ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); int te; cin >> te; while (te--) { int sum...

2019-12-28 13:49:47 414

原创 codeforces-1278D Segment Tree(乱搞)

Segment Tree time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output As the name of the task implies, you are asked to do some work with...

2019-12-24 00:02:35 503

原创 CodeForces - 1264B (分类讨论即可)

Examples input 2 2 2 1 output YES 0 1 0 1 2 3 2 input 1 2 3 4 output NO input 2 2 2 3 output NO #include <bits/stdc++.h> #define ll long long using namespace std; int ...

2019-12-06 14:38:57 260

原创 POJ - 3764 The xor-longest Path (字典树入门)

In an edge-weighted tree, the xor-length of a pathpis defined as the xor sum of the weights of edges onp: ⊕ is the xor operator. We say a path the xor-longest path if it has the largest xor-...

2019-10-10 00:46:44 278

原创 POJ - 1816 Wild Words (模糊状态下字典树匹配)

A word is a string of lowercases. A word pattern is a string of lowercases, '?'s and '*'s. In a pattern, a '?' matches any single lowercase, and a '*' matches none or more lowercases. There are many w...

2019-10-06 20:39:27 331

原创 Longest Increasing Subsequence (dp+LIS)

链接:https://ac.nowcoder.com/acm/contest/1110/E 来源:牛客网 时间限制:C/C++ 3秒,其他语言6秒 空间限制:C/C++ 32768K,其他语言65536K Special Judge, 64bit IO Format: %lld 题目描述 Bobo learned how to compute Longest Increasing Sub...

2019-10-05 19:23:29 298

原创 Dynamic Graph (dp,bitset)

链接:https://ac.nowcoder.com/acm/contest/1110/D 来源:牛客网 时间限制:C/C++ 1秒,其他语言2秒 空间限制:C/C++ 32768K,其他语言65536K Special Judge, 64bit IO Format: %lld 题目描述 Bobo has a directed acyclic graph (DAG) with n nod...

2019-10-05 19:15:46 387

原创 POJ - 2828 Buy Tickets (Splay模拟)

Buy Tickets Time Limit:4000MS Memory Limit:65536K Total Submissions:27051 Accepted:12920 Description Railway tickets were difficult to buy around the Lunar New Year in China,...

2019-10-05 01:00:30 526

原创 牛客上偷到的全局最小割板子

namespace global_mincut{ #define INT_MAX 0x3f3f3f3f int mp[502][502]; int N; bool combine[502]; int minC=INT_MAX; void init(int n){ memset(mp, 0, sizeof(mp)); N = ...

2019-10-04 19:01:52 290

原创 Highway (树的直径 + dfs)

链接:https://ac.nowcoder.com/acm/contest/1109/H 来源:牛客网 时间限制:C/C++ 3秒,其他语言6秒 空间限制:C/C++ 32768K,其他语言65536K Special Judge, 64bit IO Format: %lld 题目描述 In ICPCCamp there were n towns conveniently number...

2019-10-04 16:10:17 412

原创 Intersection (线性基)(板子补充)

链接:https://ac.nowcoder.com/acm/contest/1109/C 来源:牛客网 时间限制:C/C++ 1秒,其他语言2秒 空间限制:C/C++ 32768K,其他语言65536K Special Judge, 64bit IO Format: %lld 题目描述 Bobo has two sets of integers A={a1,a2,…,an}A = \{...

2019-10-04 16:01:36 334

原创 POJ - 3481 Double Queue(Splay板子题)

The new founded Balkan Investment Group Bank (BIG-Bank) opened a new office in Bucharest, equipped with a modern computing environment provided by IBM Romania, and using modern information technologie...

2019-10-03 19:12:40 231

原创 CSU - 2170 千万别用树套树(线段树)

链接:https://ac.nowcoder.com/acm/contest/1108/H 来源:牛客网 时间限制:C/C++ 1秒,其他语言2秒 空间限制:C/C++ 32768K,其他语言65536K Special Judge, 64bit IO Format: %lld 题目描述 Bobo 精通数据结构!他想维护一个线段的集合 S。初始时,S 为空。他会依次进行 q 次操作,操作...

2019-10-03 14:46:41 264

原创 某巨文艺平衡树(Splay模板)

洛谷 P3391 /*Splay只记模板是很困难的,而且真正运用时易生疏出错,所以必须理解,在看代码前先弄懂 Splay的原理,这篇代码是带注释的Splay模板,题目来自洛谷P3391 ———————————by 520*/ #include<bits/stdc++.h> #define il inline using namespace std; const int N = 10...

2019-10-02 20:56:33 255

原创 Vertex Cover 湘潭CCPC邀请赛 (递推)

链接:https://ac.nowcoder.com/acm/contest/1107/J 来源:牛客网 时间限制:C/C++ 1秒,其他语言2秒 空间限制:C/C++ 32768K,其他语言65536K Special Judge, 64bit IO Format: %lld 题目描述 Alice and Bobo are playing a game on a graph with ...

2019-10-02 20:21:56 311

原创 C Just h-index

链接:https://ac.nowcoder.com/acm/contest/1107/C 来源:牛客网 时间限制:C/C++ 1秒,其他语言2秒 空间限制:C/C++ 131072K,其他语言262144K Special Judge, 64bit IO Format: %lld 题目描述 The h-index of an author is the largest h where ...

2019-10-02 17:37:55 13915

原创 HDU - 5919 (主席树)

Sequence II Time Limit: 9000/4500 MS (Java/Others)Memory Limit: 131072/131072 K (Java/Others) Total Submission(s): 4734Accepted Submission(s): 1329 Problem Description Mr. Frog has an int...

2019-09-26 15:20:41 343

原创 沈阳网络赛 D Fish eating fruit(点分治)

State Z is a underwater kingdom of the Atlantic Ocean. This country is amazing. There arenncities in the country andn-1n−1undirected underwater roads which connect all cities. In order to save en...

2019-09-15 23:48:21 312

原创 上海网络赛 J Stone game (dp)

CSL loves stone games. He hasnnstones; each has a weighta_iai​. CSL wants to get some stones. The rule is that the pile he gets should have a higher or equal total weight than the rest; however if ...

2019-09-15 23:45:01 356

原创 上海网络赛 F Rhyme scheme(预处理+dfs)

A rhyme scheme is the pattern of rhymes at the end of each line of a poem or song. It is usually referred to by using letters to indicate which lines rhyme; lines designated with the same letter all r...

2019-09-15 23:30:49 510

原创 反手套一波回文树模板加例题就很舒服

往上偷的板子,用起来蛮不错嘿嘿嘿。 #include<bits/stdc++.h> using namespace std; const int MAXN = 300005; const int N = 26; const int MOD = 1e9 + 7; struct Palindromic_Tree { int next[MAXN][N];//next指针,next指针和...

2019-09-09 20:44:37 266

原创 HDU - 5009 Paint Pearls(dp+思维优化)

Lee has a string of n pearls. In the beginning, all the pearls have no color. He plans to color the pearls to make it more fascinating. He drew his ideal pattern of the string on a paper and asks for ...

2019-09-02 19:11:15 290

原创 The beautiful values of the palace 南京网络赛A(主席树)

Here is a square matrix ofn * nn∗n, each lattice has its value (nnmust be odd), and the center value isn * nn∗n. Its spiral decline along the center of the square matrix (the way of spiral decline ...

2019-09-01 23:01:51 356

原创 HDU - 6714 || 2019 百度之星初赛三 最短路 2(思维+spfa)

最短路 2 Time Limit: 6000/4000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 417Accepted Submission(s): 108 Problem Description 小 A 是社团里的工具人,有一天他的朋友给了他一个n个...

2019-08-25 16:49:05 389

原创 HDU - 6705 path (K短路+剪枝)

进入报名链接)~ path Time Limit: 2000/2000 MS (Java/Others)Memory Limit: 65536/65536 K (Java/Others) Total Submission(s): 1404Accepted Submission(s): 298 Problem Descripti...

2019-08-24 19:58:38 427

原创 2019 CCPC - 网络选拔赛 B array(线段树)

array Time Limit: 2000/1500 MS (Java/Others)Memory Limit: 262144/262144 K (Java/Others) Total Submission(s): 97Accepted Submission(s): 22 Problem Description You are given an arraya1,a2,...

2019-08-23 18:37:33 464

原创 HDU - 1542 (扫描线)

Atlantis Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 23409Accepted Submission(s): 9267 Problem Description There are several ancie...

2019-08-16 17:15:10 213

原创 2019牛客暑期多校训练营(第九场) F Birthday Reminders(dp)

链接:https://ac.nowcoder.com/acm/contest/889/F 来源:牛客网 题目描述 Today is Tomori's birthday! Usually, people get many birthday wishes on social media, but Tomori has decided to hide her birthday on social...

2019-08-16 11:13:45 343

原创 2019牛客暑期多校训练营(第九场)H Cutting Bamboos(主席树+二分)

链接:https://ac.nowcoder.com/acm/contest/889/H 来源:牛客网 题目描述 There are n bamboos arranged in a line. The i-th bamboo from the left has height hih_{i}hi​. You are given q queries of the type (l, r, x, ...

2019-08-15 23:58:50 471

原创 2019牛客暑期多校训练营(第九场)E All men are brothers(线段树做法)

链接:https://ac.nowcoder.com/acm/contest/889/E 来源:牛客网 时间限制:C/C++ 1秒,其他语言2秒 空间限制:C/C++ 32768K,其他语言65536K 64bit IO Format: %lld 题目描述 Amy asks Mr. B problem E. Please help Mr. B to solve the followin...

2019-08-15 18:42:57 251

空空如也

空空如也

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

TA关注的人

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