自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

新月

红色春天的开始

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

原创 《Same Representation,Different Attentions:Shareable Sentence Representation》阅读笔记

之后会不定期分享论文笔记。摘要不同的任务句子表示不同,而且句子表示受限于不多的训练数据。论文提出一个橘子表示的模型可以用于多种任务。所有任务分享相同的句子表示,每个任务可以从共享的句子表示中利用attention机制抽取任务特定的信息。每个任务注意力机制的问题向量可以是静态的参数也可以是动态的。论文在16个不同的文本分类任务中做实验,并取得了很好的效果。背景词向量在多个任务中已经有...

2018-12-26 14:36:37 526

原创 退役了

快半年没写博客了,省赛打完退役了。回顾这两年多的ACM,感觉收获挺多,比刚入大学的我强了不少,但是还是很菜。现在想来还是怀念坐在机房听着缘之空插曲敲着代码的日子,早早地来到机房补bc或者cf的题,学习各种算法,感觉自己学会了各种忍术(笑)。做题目的日子很纯粹,没有烦心事,红色的ACCEPTED带来的感动至今难忘,那种感觉真的挺好。和很多大神组过队,打省赛感觉自己更多的是在一旁翻译题目,插不上手(摊...

2018-12-11 12:33:52 349

原创 hdu4126Genghis Khan the Conqueror (最小生成树+树形dp)

Time Limit: 10000/5000 MS (Java/Others)    Memory Limit: 327680/327680 K (Java/Others)Total Submission(s): 2524    Accepted Submission(s): 760Problem DescriptionGenghis Khan(成吉思汗)(1162-1

2016-09-22 17:17:50 731

原创 hdu5886Tower Defence(树形dp)

Time Limit: 3000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 242    Accepted Submission(s): 80Problem DescriptionThere was a civil war between

2016-09-20 15:10:20 605

原创 hdu5893 List wants to travel(树链剖分+线段树)

Time Limit: 6000/3000 MS (Java/Others)    Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 270    Accepted Submission(s): 47Problem DescriptionA boy named List who is perf

2016-09-19 14:40:32 823

原创 hdu5884 Sort(二分)

Time Limit: 3000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 547    Accepted Submission(s): 101Problem DescriptionRecently, Bob has just learnt

2016-09-17 20:38:07 680

原创 hdu3559 Frost Chain (概率dp+记忆化搜索)

Problem DescriptionIn the unimaginable popular DotA game, the hero Lich has a wonderful skill: Frost Chain, release a jumping breath of frost that jumps N times against enemy units.Today

2016-08-21 16:56:45 665

原创 hdu5790 Prefix(Trie树+主席树)

Problem DescriptionAlice gets N strings. Now she has Q questions to ask you. For each question, she wanna know how many different prefix strings between Lth and Rth strings. It's so easy right? So

2016-08-03 19:18:18 818

原创 hdu5726 GCD(gcd +二分+rmq)

Problem DescriptionGive you a sequence of N(N≤100,000) integers : a1,...,an(0ai≤1000,000,000). There are Q(Q≤100,000) queries. For each query l,r you have to calculate gcd(al,,al+1,...,ar)

2016-07-19 20:40:59 1066 2

原创 UVA 10480 Sabotage (最大流最小割)

题目链接:点击打开链接题意:把一个图分成两部分,要把点1和点2分开。隔断每条边都有一个花费,求最小花费的情况下,应该切断那些边。这题很明显是最小割,也就是最大流。把1当成源点,2当成汇点。问题是要求最小割应该隔断那条边。思路:求最小割就是求最大流,求完后,剩余网络中,能由起点到达的是和起点一个集合的,其他的都是和终点一个集合的。#include#include#includ

2016-07-19 11:54:06 1132

原创 bzoj2002 [Hnoi2010]Bounce 弹飞绵羊 (分块)

Time Limit: 10 Sec  Memory Limit: 259 MBSubmit: 7896  Solved: 4124[Submit][Status][Discuss]Description某天,Lostmonkey发明了一种超级弹力装置,为了在他的绵羊朋友面前显摆,他邀请小绵羊一起玩个游戏。游戏一开始,Lostmonkey在地上沿着一条直线摆上n个装置,每个装置

2016-07-18 21:05:38 562

原创 poj3580 SuperMemo (Splay+区间内向一个方向移动)

Time Limit: 5000MS Memory Limit: 65536KTotal Submissions: 13550 Accepted: 4248Case Time Limit: 2000MSDescriptionYour friend, Jackson is invited to a TV show called Su

2016-05-19 22:02:15 517

原创 bzoj1500: [NOI2005]维修数列 (Splay+变态题)

Time Limit: 10 Sec  Memory Limit: 64 MBSubmit: 11353  Solved: 3553[Submit][Status][Discuss]DescriptionInput输入的第1 行包含两个数N 和M(M ≤20 000),N 表示初始时数列中数的个数,M表示要进行的操作数目。第2行包含N个数字,描述初始时的数列

2016-05-18 16:29:01 787

原创 hdu3436 Queue-jumpers(Splay)

Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 3411    Accepted Submission(s): 923Problem DescriptionPonyo and Garfield are waiti

2016-05-17 14:35:10 485

原创 hdu4710 Balls Rearrangement(数学公式+取模)

Balls RearrangementTime Limit: 6000/3000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 945    Accepted Submission(s): 380Problem DescriptionBob has

2016-05-15 19:24:30 949

原创 hdu1890 Robotic Sort (splay+区间翻转单点更新)

Problem DescriptionSomewhere deep in the Czech Technical University buildings, there are laboratories for examining mechanical and electrical properties of various materials. In one of yesterday’s

2016-05-13 11:39:28 455

原创 zoj2112 Dynamic Rankings (主席树 || 树套树)

The Company Dynamic Rankings has developed a new kind of computer that is no longer satisfied with the query like to simply find the k-th smallest number of the given N numbers. They have developed

2016-05-05 20:52:36 484

原创 poj3581 Sequence (后缀数组)

Time Limit: 5000MS Memory Limit: 65536KTotal Submissions: 6305 Accepted: 1364Case Time Limit: 2000MSDescriptionGiven a sequence, {A1, A2, ..., An} which is guaranteed

2016-05-02 20:46:07 492

原创 UVA 11475 Extend to Palindrome (kmp || manacher || 后缀数组)

题目链接:点击打开链接题意:给你一个串,让你在串后面添加尽可能少的字符使得这个串变成回文串。思路:这题可以kmp,manacher,后缀数组三种方法都可以做,kmp和manacher效率较高,时间复杂度是O(n),后缀数组时间复杂度是O(nlogn).思路是求出元串的后缀和反串的前缀匹配的最大长度。用后缀数组的时候求出l=lcp(i,len+1),判断l+i是不是等于len,如果等于那么就

2016-05-01 15:53:06 538

原创 poj3415 Common Substrings (后缀数组+单调队列)

Time Limit: 5000MS Memory Limit: 65536KTotal Submissions: 9414 Accepted: 3123DescriptionA substring of a string T is defined as:T(i, k)=TiTi+1...Ti+k-1, 1≤i≤i+k-1≤|T|.

2016-04-30 17:02:37 577

原创 poj3693 Maximum repetition substring (后缀数组+rmq)

DescriptionThe repetition number of a string is defined as the maximum number R such that the string can be partitioned into R same consecutive substrings. For example, the repetition number of "a

2016-04-29 22:59:31 420

原创 spoj687 REPEATS - Repeats (后缀数组+rmq)

A string s is called an (k,l)-repeat if s is obtained by concatenating k>=1 times some seed string t with length l>=1. For example, the strings = abaabaabaabais a (4,3)-repeat with t = aba as

2016-04-29 18:15:00 499

原创 bzoj3626: [LNOI2014]LCA (树链剖分+离线线段树)

Description给出一个n个节点的有根树(编号为0到n-1,根节点为0)。一个点的深度定义为这个节点到根的距离+1。设dep[i]表示点i的深度,LCA(i,j)表示i与j的最近公共祖先。有q次询问,每次询问给出l r z,求sigma_{l(即,求在[l,r]区间内的每个节点i与z的最近公共祖先的深度之和)Input第一行2个整数n q。接下来n

2016-04-25 15:33:44 591

原创 bzoj2243 [SDOI2011]染色 (树链剖分+线段树)

Description给定一棵有n个节点的无根树和m个操作,操作有2类:1、将节点a到节点b路径上所有点都染成颜色c;2、询问节点a到节点b路径上的颜色段数量(连续相同颜色被认为是同一段),如“112221”由3段组成:“11”、“222”和“1”。请你写一个程序依次完成这m个操作。Input第一行包含2个整数n和m,分别表示节点

2016-04-20 16:41:14 1449

原创 SPOJ QTREE- Query on a tree (树链剖分)

You are given a tree (an acyclic undirected connected graph) with N nodes, and edges numbered 1, 2, 3...N-1.We will ask you to perfrom some instructions of the following form:CHANGE i ti : cha

2016-04-20 11:03:30 383

原创 hdu5662 YJQQQAQ and the function (单调栈)

Problem DescriptionYJQQQAQ has an array A of length n. He defines a function fl,r,k where l,r,k are positive integers that satisfies l≤r and r×k≤n, and the value of the function equals to 

2016-04-13 11:20:50 788

原创 hdu4348 To the moon (主席树 || 离线线段树)

Problem DescriptionBackgroundTo The Moon is a independent game released in November 2011, it is a role-playing adventure game powered by RPG Maker.The premise of To The Moon is based around a

2016-04-11 20:14:42 943

原创 hdu3565 Bi-peak Number (有上界和下界的数位dp)

Problem DescriptionA peak number is defined as continuous digits {D0, D1 … Dn-1} (D0 > 0 and n >= 3), which exist Dm (0 Di+1 (m A number is called bi-peak if it is a concatenation of two peak n

2016-04-06 21:56:47 887

原创 codeforces628D. Magic Numbers (数位dp)

Consider the decimal presentation of an integer. Let's call a number d-magic if digit d appears in decimal presentation of the number on even positions and nowhere else.For example, the numbers 

2016-04-06 10:37:37 824

原创 hdu5432Rikka with Array (数位dp+十进制转化为二进制)

Problem DescriptionAs we know, Rikka is poor at math. Yuta is worrying about this situation, so he gives Rikka some math tasks to practice. There is one of them:Yuta has an array A of length

2016-04-01 16:15:25 595

原创 LA3902 Network (树上dfs)

题目链接:点击打开链接题意:n台机器连成一个树状网络,其中叶节点是客户端,其他节点是服务器,目前有一台服务器s正在提供服务。让你在其他服务器上也安排同样的服务,使得每台客户端到最近服务器的距离不超过k,而且要使服务器尽量少,问最少要设置多少台服务器。思路:我们先把s看做根节点,做一遍dfs,把离s距离小于等于k的叶子节点标为访问过,表示这个叶子节点已经得到服务了,然后再把没有访问过的叶子节

2016-03-30 12:42:55 677

原创 zoj3494 BCD Code(AC自动机+数位dp)

Binary-coded decimal (BCD) is an encoding for decimal numbers in which each digit is represented by its own binary sequence. To encode a decimal number using the common BCD encoding, each decimal di

2016-03-29 21:57:23 497

原创 codeforces #345 (Div. 1) D. Zip-line (线段树+最长上升子序列)

Vasya has decided to build a zip-line on trees of a nearby forest. He wants the line to be as long as possible but he doesn't remember exactly the heights of all trees in the forest. He is sure that h

2016-03-29 14:05:25 926

原创 zjnu1786 PROSJEK(二分)

DescriptionSample Input4 11 2 3 4Sample Output4.000000题意:给你n个数,让你找到长度大于等于k的连续串的最大平均值。思路:我们可以二分答案,然后先把每一个数减去二分的平均值,记录前缀和sum[i],用从k开始循环,每次往后找一个数,都减去0~i-k中的最小前缀和,看最大算出来的值是不是大于等于0,如果大于等于0就满

2016-03-27 21:45:09 503

原创 九度1497:面积最大的全1子矩阵 (单调队列,单调栈)

题目描述:在一个M * N的矩阵中,所有的元素只有0和1,从这个矩阵中找出一个面积最大的全1子矩阵,所谓最大是指元素1的个数最多。输入:输入可能包含多个测试样例。对于每个测试案例,输入的第一行是两个整数m、n(1矩阵共有m行,每行有n个整数,分别是0或1,相邻两数之间严格用一个空格隔开。输出:对应每个测试案例,输出矩阵中面积最

2016-03-26 18:42:51 770

原创 zjnu1726 STOGOVI (lca)

DescriptionMirko is playing with stacks. In the beginning of the game, he has an empty stack denoted with number 0. In theith step of the game he will choose an existing stack denoted with v, co

2016-03-25 20:06:38 479

原创 zjnu1735BOB (单调队列,单调栈)

DescriptionLittle Bob is a famous builder. He bought land and wants to build a house. Unfortunately, the problem is theland’s terrain, it has a variable elevation.The land is shaped like a rec

2016-03-24 13:38:01 606

原创 uva10859 Placing Lampposts (树形dp+求两者最小值方法)

题目链接:点击打开链接题意:给你一个n个点m条边的无向无环图,在尽量少的节点上放灯,使得所有边都被照亮,每盏灯将照亮以它为一个端点的所有边。在灯的总数最小的前提下,被两盏灯同时照亮的边数应尽量大。思路:无向无环图的另一个说法是“森林”,即由多棵树组成,我们可以先算一棵树上的答案,然后累加起来就行了。本题的优化目标有两个:放置的灯数应尽量少,被两盏灯照亮的边数b应尽量大。为了统一起见,我们把

2016-03-23 19:22:31 447

原创 zjnu1757Excellent (数学公式)

DescriptionLet us begin with a positive integer N and find the smallest positive integer which doesn't divide N. If we repeat the procedure with the resulting number, then again with the new res

2016-03-23 13:30:27 509

原创 zjnu1749 PAROVI (数位dp)

DescriptionThe distance between two integers is defined as the sum of the absolute result of subtracting their digits. For example, the distance between the numbers 4561 and 3278 is |4 – 3| + |5 -

2016-03-22 20:54:13 636

空空如也

空空如也

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

TA关注的人

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