自定义博客皮肤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 239

原创 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 240

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

2021-01-05 19:40:59 499 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|1using namespace std;int main() { ios::sync_with_stdio(0);

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

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

B. RPG Protagonisttime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou 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 293

原创 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 1675 7

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

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

2020-03-31 14:11:05 233

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

F. Moving Pointstime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputThere arennpoints on a coordinate axisOXOX. Theii-th point i...

2020-02-24 23:51:10 481

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

A. Non-zerotime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputGuy-Manuel and Thomas have an arrayaaofnnintegers [a1,a2,…,ana1,a2...

2020-02-10 01:33:35 543

原创 CodeForces Good Bye 2019 A-E

A. Card Gametime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputTwo players decided to play one interesting card game.There is a de...

2019-12-30 01:39:38 645 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 293

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

Segment Treetime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputAs the name of the task implies, you are asked to do some work with...

2019-12-24 00:02:35 328

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

Examplesinput2 2 2 1outputYES0 1 0 1 2 3 2input1 2 3 4outputNOinput2 2 2 3outputNO#include <bits/stdc++.h>#define ll long longusing namespace std;int ...

2019-12-06 14:38:57 131

原创 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 173

原创 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 206

原创 Longest Increasing Subsequence (dp+LIS)

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

2019-10-05 19:23:29 191

原创 Dynamic Graph (dp,bitset)

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

2019-10-05 19:15:46 253

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

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

2019-10-05 01:00:30 222

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

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 188

原创 Highway (树的直径 + dfs)

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

2019-10-04 16:10:17 280

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

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

2019-10-04 16:01:36 235

原创 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 161

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

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

2019-10-03 14:46:41 184

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

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

2019-10-02 20:56:33 168

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

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

2019-10-02 20:21:56 219

原创 C Just h-index

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

2019-10-02 17:37:55 8280

原创 HDU - 5919 (主席树)

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

2019-09-26 15:20:41 227

原创 沈阳网络赛 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 199

原创 上海网络赛 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 229

原创 上海网络赛 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 405

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

往上偷的板子,用起来蛮不错嘿嘿嘿。#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 179

原创 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 184

原创 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 242

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

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

2019-08-25 16:49:05 289

原创 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 318

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

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

2019-08-23 18:37:33 365

原创 HDU - 1542 (扫描线)

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

2019-08-16 17:15:10 129

原创 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 228

原创 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 353

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

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

2019-08-15 18:42:57 169

空空如也

空空如也

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

TA关注的人

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