自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 HDU6599多校第二场 I Love Palindrome String 回文树+HASH

I Love Palindrome StringTime Limit: 4000/2000 MS (Java/Others)Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 1454Accepted Submission(s): 545Problem DescriptionYou are...

2019-08-31 09:49:14 294

原创 [计蒜之道2019 复赛 A]外教 Michale 变身大熊猫 (线段树求LIS+思维)

外教变身萌翻小学员,VIPKID “AR 变脸” 打造趣味互动课堂,这是在线少儿英语品牌 VIPKID 全新推出的辅助教学功能——AR 变脸,外教在上课过程中可以随意选取合适的表情贴纸。人脸识别和表情识别等技术的应用帮助“AR 变脸”这一教辅功能更好地服务外教,更好地激励学生积极地参与课堂内容,提升在线课堂的趣味性。现在,外教 Michale 就变身了一只萌萌的大熊猫,给你出来了一道关于数列的...

2019-08-30 17:28:00 256

原创 ACM-ICPC 2018 徐州赛区网络预赛 J. Maze Designer 最大生成树+LCA

After the long vacation, the maze designer master has to do his job. A tour company gives him a map which is a rectangle. The map consists ofN \times MN×Mlittle squares. That is to say, the height o...

2019-08-30 15:30:42 211 1

原创 ACM-ICPC 2018 徐州赛区网络预赛 A. Hard to prepare

After Incident, a feast is usually held in Hakurei Shrine. This time Reimu asked Kokoro to deliver a Nogaku show during the feast. To enjoy the show, every audience has to wear a Nogaku mask, an...

2019-08-29 21:59:50 761

原创 2017 ACM-ICPC 亚洲区(南宁赛区)网络赛 J. Minimum Distance in a Star Graph 贪心/bfs

题目连接:https://nanti.jisuanke.com/t/A1286In this problem, we will define a graph called star graph, and the question is to find the minimum distance between two given nodes in the star graph.Given a...

2019-08-29 10:44:36 223

原创 2017 ACM-ICPC 亚洲区(西安赛区)网络赛 I. Barty's Computer(哈希)

Barty have a computer, it can do these two things. Add a new string to its memory, the length of this string is even. For given44stringsa,b,c,da,b,c,d, find out how many strings that can be...

2019-08-28 18:26:30 214

原创 2017 ACM西安网络赛 G题 Xor 树链剖分+分块

There is a tree withnnnodes. For each node, there is an integer valuea_iai​, (1 \le a_i \le 1,000,000,0001≤ai​≤1,000,000,000for1 \le i \le n1≤i≤n). There isqqqueries which are described as foll...

2019-08-28 14:24:10 240

原创 BZOJ4381: [POI2015]Odwiedziny 分块+树链剖分

题目描述给定一棵n个点的树,树上每条边的长度都为1,第i个点的权值为a[i]。Byteasar想要走遍这整棵树,他会按照某个1到n的全排列b走n-1次,第i次他会从b[i]点走到b[i+1]点,并且这一次的步伐大小为c[i]。对于一次行走,假设起点为x,终点为y,步伐为k,那么Byteasar会从x开始,每步往前走k步,如果最后不足k步就能到达y,那么他会一步走到y。请帮助Byteasa...

2019-08-28 13:48:43 267

原创 HDU-6194 string string string 后缀数组

string string stringTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 3500Accepted Submission(s): 1181Problem DescriptionUncle Mao is...

2019-08-27 18:27:57 205

原创 SPOJ DQUERY 区间不同数的个数(在线主席树+离线树状数组)

题目链接:SPOJ - DQUERY:https://www.spoj.com/problems/DQUERY/en/题目:Given a sequence of n numbers a1, a2, ..., anand a number of d-queries. A d-query is a pair (i, j) (1 ≤ i ≤ j ≤ n). For each d-query (...

2019-08-27 15:12:55 234

原创 2017 ACM-ICPC 亚洲区(乌鲁木齐赛区)网络赛-G: Query on a string (KMP+树状数组)

You have two stringsSSandTTin all capitals.Now an efficient program is required to maintain a operation and support a query.The operationC~i~chCichwith given integeriiand capital letter...

2019-08-27 09:41:45 247

原创 HDU 6703 array 2019CCPC网络选拔赛 1002 (线段树/权值线段树/主席树+set)

arrayTime Limit: 4000/2000 MS (Java/Others)Memory Limit: 262144/262144 K (Java/Others)Total Submission(s): 1356Accepted Submission(s): 522Problem DescriptionYou are given an arraya1,...

2019-08-26 17:48:22 295

原创 HDU 6704 K-th occurrence(后缀数组+st+主席树) 2019中国大学生程序设计竞赛(CCPC) - 网络选拔赛

K-th occurrenceTime Limit: 3000/3000 MS (Java/Others)Memory Limit: 524288/524288 K (Java/Others)Total Submission(s): 849Accepted Submission(s): 268Problem DescriptionYou are given a s...

2019-08-26 13:10:39 260

原创 HDU 6677 度度熊与组题 2019百度之星初赛第二场

度度熊与组题Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 190Accepted Submission(s): 67Problem Description沃老师在出比赛的题目时遇到麻烦啦!遇到的麻烦如下:现在...

2019-08-25 20:55:22 377

原创 HDU 6705 path 2019ccpc网络赛

pathTime Limit: 2000/1500 MS (Java/Others)Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 921Accepted Submission(s): 192Problem DescriptionYou have a directed weighted g...

2019-08-24 12:01:30 222

原创 2019ccpc网络赛总结

今天第一场网络赛打得很差劲,我们队伍在c题错误题意死磕不动,然后在问了客服才知道(讨论区得看),但即使知道题意最后也没做出来,今天还有两道后缀树组+树套树的题,但完全不知道怎么做。哎,自己还是太菜了,这种题如果不出,网络赛是打不出名额的,得好好训练,争取一天一套题,不求多,遇到的题会做。还的看看以前做的题,这个需要再休闲时间了。不负!...

2019-08-23 21:29:48 249

原创 HDU - 6504 - Problem E. Split The Tree dfs序+树状数组+思维(统计区间数不同的个数)(2018 东北地区大学生程序设计竞赛)

Problem H. Store The MatrixTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 262144/262144 K (Java/Others)Total Submission(s): 234Accepted Submission(s): 105Problem DescriptionGi...

2019-08-23 09:42:12 282

原创 H - Problem H. Store The Matrix HDU - 6507 矩阵的秩

Problem H. Store The MatrixTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 262144/262144 K (Java/Others)Total Submission(s): 232Accepted Submission(s): 103Problem DescriptionGiven...

2019-08-22 19:29:20 430 1

原创 牛客练习赛37C 筱玛的迷阵探险 折半搜索+trie

时间限制:C/C++ 2秒,其他语言4秒空间限制:C/C++ 524288K,其他语言1048576K64bit IO Format: %lld题目描述筱玛是个快乐的男孩子。寒假终于到了,筱玛决定请他的朋友们一起来玩迷阵探险。迷阵可以看做一个n\times nn×n的矩阵A,每个格子上有一个有一个数Ai,j。入口在左上角的(1,1)处,出口在右下角的(n,n)处。每一步都只能向...

2019-08-22 09:27:40 193

原创 2019牛客暑期多校训练营(第九场)D.Knapsack Cryptosystem

链接:https://ac.nowcoder.com/acm/contest/889/D来源:牛客网题目描述Amy asks Mr. Bproblem D. Please help Mr. B to solve the following problem.Amy wants to crack Merkle–Hellman knapsack cryptosystem. Pl...

2019-08-20 22:16:41 207

原创 暴力求规律+高斯消元找系数+小数转分数+逆元 解决规律题

例题:2018icpc南京现场赛-G Pyramid题目链接:http://codeforces.com/gym/101981/attachments或者:https://nanti.jisuanke.com/t/A2144暴力找规律#include<algorithm>#include<cstdio>#include<cstring>#...

2019-08-20 21:57:04 243

原创 Gym - 102267F F - Arena Olympics 判断点是否在视野+拓扑排序

Kassandra is participating in the Arena Olympics of Sparta. In order to win the arena fight, she has to knockout all the otherNNfighters.Being a computer scientist, she wanted to do it while prese...

2019-08-20 21:49:49 328

原创 (Gym - 102267)The 2019 University of Jordan Collegiate Programming Contest 比赛题解

A Picky Eater standard input/output 1 s, 256 MB x271 B Primes standard input/output 1 s, 256 MB x215 C Matryoshka Dolls standard input/ou...

2019-08-20 19:38:32 1928

原创 2018 ACM-ICPC 南京站 M.Mediocre String Problem 回文树+二分hash/拓展kmp

Given two stringsssandtt, count the number of tuples(i, j, k)(i,j,k)such that1 \le i \le j \le |s|1≤i≤j≤∣s∣ 1 \le k \le |t|1≤k≤∣t∣. j - i + 1 > kj−i+1>k. Theii-th character ofssto t...

2019-08-19 22:01:30 223

原创 2018 ACM-ICPC 南京站 E Eva and Euro coins (思维)

Eva is fond of collecting coins. Whenever she visits a different country, she always picks up as many local coins as she can. As you know, Eva also likes to go trips to Europe; thus she has collected ...

2019-08-19 19:40:16 565

原创 洛谷 P3812 线性基

展开题目背景这是一道模板题。题目描述给定n个整数(数字可能重复),求在这些数中选取任意个,使得他们的异或和最大。输入格式第一行一个数n,表示元素个数接下来一行n个数输出格式仅一行,表示答案。输入输出样例输入 #1复制21 1输出 #1复制1说明/提示1 \leq n \leq 50, 0 \leq S_i \leq 2 ^ {...

2019-08-19 10:49:10 137

原创 ACM-ICPC 2018 南京赛区网络预赛 I. Skr (回文自动机+Hash优化)

A number is skr, if and only if it's unchanged after being reversed. For example, "12321", "11" and "1" are skr numbers, but "123", "221" are not. FYW has a string of numbers, each substring can prese...

2019-08-18 22:38:57 186

原创 BZOJ 3676: [Apio2014]回文串 回文自动机模板

3676: [Apio2014]回文串Time Limit:20 SecMemory Limit:128 MBSubmit:4762Solved:2279[Submit][Status][Discuss]Description考虑一个只包含小写拉丁字母的字符串s。我们定义s的一个子串t的“出现值”为t在s中的出现次数乘以t的长度。请你求出s的所有回文子串中的最...

2019-08-18 17:03:05 153

原创 2019 年百度之星·程序设计大赛 - 初赛一 1003 Mindis

MindisTime Limit: 4000/2000 MS (Java/Others)Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 259Accepted Submission(s): 57Problem Description平面上有n个矩形,矩形的边平行于坐标轴,现在度度熊...

2019-08-18 13:13:01 332

原创 P3369 【模板】普通平衡树 FHQtreap

题目描述您需要写一种数据结构(可参考题目标题),来维护一些数,其中需要提供以下操作:插入xx数 删除xx数(若有多个相同的数,因只删除一个) 查询xx数的排名(排名定义为比当前数小的数的个数+1+1。若有多个相同的数,因输出最小的排名) 查询排名为xx的数 求xx的前驱(前驱定义为小于xx,且最大的数) 求xx的后继(后继定义为大于xx,且最小的数)输入格式第一行为nn,表...

2019-08-17 16:45:06 137

原创 HDU 5877 Weak Pair 【dfs】【树状数组】【离散化】

Weak PairTime Limit: 4000/2000 MS (Java/Others)Memory Limit: 262144/262144 K (Java/Others)Total Submission(s): 5985Accepted Submission(s): 1683Problem DescriptionYou are given aroote...

2019-08-17 11:18:51 131

原创 51nod 1732 51nod婚姻介绍所 后缀数组:最长公共前缀

1732 51nod婚姻介绍所1.0 秒 131,072.0 KB 40 分 4级题51nod除了在做OJ之外,还开展了很多副业。婚姻介绍所就是其中之一。对于一个客户,我们可以使用一个字符串来描述该客户的特质。假设现在我们有两个客户A和B。A的特质字符串为:abcdefgB的特质字符串为:abcxyz则A和B的匹配度f(A, B)为A和B的最长公共...

2019-08-16 22:04:16 143

原创 SPOJ 705 New DistinctSubstrings (后缀数组:不同串的个数)

SUBST1 - New Distinct Substrings#suffix-array-8Given a string, we need to find the total number of its distinct substrings.InputT- number of test cases. T<=20; Each test case consists of...

2019-08-16 21:30:02 120

原创 51nod 2657 二进制数字 斐波那契数列+矩阵快速幂

2657 二进制数字1.0 秒 131,072.0 KB 10 分 2级题有多少个长度为n的二进制串,即不存在3个连续的1,也不存在3个连续的0。例如n = 4,共有16个长度为4的01串,其中0000 0001 1000 1111 0111 1110,不符合要求,所以共有10个符合要求的串。收起输入输入共1个数n(1 <= n <= ...

2019-08-16 20:18:52 466

原创 ACM-ICPC 2017 Asia Qingdao J. Suffix (二分 HASH LCP或者暴力)aa

Consider n given non-empty strings denoted by s1 , s2 , · · · , sn . Now for each of them, you need to select a corresponding suffix, denoted by suf1, suf2, · · · , sufn. For each string si, the suffi...

2019-08-16 17:01:43 522 3

原创 CodeForces 253E Printer 二分+模拟

E. Printertime limit per test4 secondsmemory limit per test256 megabytesinputinput.txtoutputoutput.txtLet's consider a network printer that functions like that. It starts working at ...

2019-08-16 09:29:27 298

原创 51nod 1288 汽油补给 贪心+单调栈

1288 汽油补给1.0 秒 131,072.0 KB 80 分 5级题有(N+1)个城市,0是起点N是终点,开车从0 -> 1 - > 2...... -> N,车每走1个单位距离消耗1个单位的汽油,油箱的容量是T。给出每个城市到下一个城市的距离D,以及当地的油价P,求走完整个旅途最少的花费。如果无法从起点到达终点输出-1。例如D = {10,...

2019-08-15 18:57:02 303

原创 【2018焦作网络赛】Jiu Yuan Wants to Eat【树链剖分】

You ye Jiu yuan is the daughter of the Great GOD Emancipator. And when she becomes an adult, she will be queen of Tusikur, so she wanted to travel the world while she was still young. In a country, sh...

2019-08-15 10:21:07 325

原创 51nod 1795 奥林匹克年 思维题

1795 奥林匹克年1.0 秒 131,072.0 KB 40 分 4级题奥林匹克竞赛从1989年开始举行,每一个奥林匹克年都会有一个缩写IAO'y,y表示那一年的最后几位数字。 组织者会取一个之前未被用过的缩写来表示该年份,而且要尽可能的短。例如,前三个奥林匹克年是1989,1990和1991,他们对应的缩写是IAO'9,IAO'0和IAO'1,而2...

2019-08-14 15:59:41 230

原创 P3377 左偏树(可并堆)

展开题目描述如题,一开始有N个小根堆,每个堆包含且仅包含一个数。接下来需要支持两种操作:操作1: 1 x y 将第x个数和第y个数所在的小根堆合并(若第x或第y个数已经被删除或第x和第y个数在用一个堆内,则无视此操作)操作2: 2 x 输出第x个数所在的堆最小数,并将其删除(若第x个数已经被删除,则输出-1并无视删除操作)输入格式第一行包含两个正整数N、M,分别表示一开始...

2019-08-14 13:32:25 267

空空如也

空空如也

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

TA关注的人

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