Live2d Test Env

05 2018 档案

摘要:For the given sequence with n different elements find the number of increasing subsequences with k + 1 elements. It is guaranteed that the answer is n 阅读全文
posted @ 2018-05-31 20:15 nimphy 阅读(286) 评论(0) 推荐(0) 编辑
摘要:You are given a directed graph with n nodes and m edges, with all edges having a certain weight. There might be multiple edges and self loops, and the 阅读全文
posted @ 2018-05-31 18:32 nimphy 阅读(419) 评论(0) 推荐(0) 编辑
摘要:In the lattice points of the coordinate line there are n radio stations, the i-th of which is described by three integers: xi — the coordinate of the  阅读全文
posted @ 2018-05-31 16:54 nimphy 阅读(291) 评论(0) 推荐(0) 编辑
摘要:https://www.cnblogs.com/OYzx/p/5506468.html BZOJ2863:(允许离线) 题目大意:给定一个n*n的矩形,以及若干个操作,操作有如下两种: 1.给矩形的(x,y)加上一个v; 2.询问某个子矩阵的权值和。 数据范围:n<=5*10^5,操作数<=2*10 阅读全文
posted @ 2018-05-31 11:45 nimphy 阅读(163) 评论(0) 推荐(0) 编辑
摘要:Red John has committed another murder. But this time, he doesn't leave a red smiley behind. What he leaves behind is a puzzle for Patrick Jane to solv 阅读全文
posted @ 2018-05-30 14:21 nimphy 阅读(199) 评论(0) 推荐(0) 编辑
摘要:(和南京那题很像,比赛的时候就两个队A了。我们队找到了思路,但是花了1个多小时没有写出来,emmmm,我的锅,当时线段树写丑了。 题意:给定数组,Q次询问,假设把第i个大小hi改为b,求最长上升子序列LIS,(Q次询问是独立的)。 思路:对于原来的数组,假设ans=LIS。那么改一个数字,ans1或 阅读全文
posted @ 2018-05-29 20:52 nimphy 阅读(223) 评论(0) 推荐(0) 编辑
摘要:题意:给定一个带权树,Q次询问,每次回答某简单路径上的权值中位数。 思路:记录根到节点的主席树,主席树可以找到路径的第K大权值。(记住,这里是可以不用二分的,不要想多了。) 奇数条边直接找中位数,偶数条边找两次取均值。 (晚上还有CF,所以懒得敲代码了! 阅读全文
posted @ 2018-05-29 18:07 nimphy 阅读(168) 评论(1) 推荐(1) 编辑
摘要:Once, Leha found in the left pocket an array consisting of n integers, and in the right pocket q queries of the form l r k. If there are queries, then 阅读全文
posted @ 2018-05-29 17:12 nimphy 阅读(1373) 评论(2) 推荐(0) 编辑
摘要:找不到原题,所以直接搁着里了。 https://www.cnblogs.com/ZegWe/p/5968744.html 阅读全文
posted @ 2018-05-29 16:53 nimphy 阅读(520) 评论(0) 推荐(0) 编辑
摘要:As you might remember from our previous rounds, Vova really likes computer games. Now he is playing a strategy game known as Rage of Empires. In the g 阅读全文
posted @ 2018-05-29 15:48 nimphy 阅读(304) 评论(0) 推荐(0) 编辑
摘要:Given a sequence of n numbers a1, a2, ..., an and a number of d-queries. A d-query is a pair (i, j) (1 ≤ i ≤ j ≤ n). For each d-query (i, j), you have 阅读全文
posted @ 2018-05-29 15:19 nimphy 阅读(341) 评论(0) 推荐(0) 编辑
摘要:Jon fought bravely to rescue the wildlings who were attacked by the white-walkers at Hardhome. On his arrival, Sam tells him that he wants to go to Ol 阅读全文
posted @ 2018-05-29 12:44 nimphy 阅读(272) 评论(0) 推荐(0) 编辑
摘要:Given a sequence of N pairs of integers, find the length of the longest increasing subsequence of it. An increasing sequence A1..An is a sequence such 阅读全文
posted @ 2018-05-28 22:16 nimphy 阅读(269) 评论(0) 推荐(0) 编辑
摘要:Little Artem has invented a time machine! He could go anywhere in time, but all his thoughts of course are with computer science. He wants to apply th 阅读全文
posted @ 2018-05-28 18:34 nimphy 阅读(360) 评论(0) 推荐(0) 编辑
摘要:几何题,希望有时间回来解决掉。 阅读全文
posted @ 2018-05-28 14:57 nimphy 阅读(99) 评论(0) 推荐(0) 编辑
摘要:In this problem you will meet the simplified model of game Pudding Monsters. An important process in developing any game is creating levels. A game fi 阅读全文
posted @ 2018-05-28 14:52 nimphy 阅读(471) 评论(0) 推荐(0) 编辑
摘要:(第三次与中奖擦肩而过? 【A A game】 题意:双人博弈:有N堆,每堆数量石子为M。给定K,每次可以把某一堆均分为石子数不小于K的几堆,(如果大于K,下次还可以用来分)。不可分的人输。 思路:不会。 【B:Jump】 题意:有N个人,每个人有两个数字xi和yi,选择其中一个可以使用,现在从1开 阅读全文
posted @ 2018-05-27 18:46 nimphy 阅读(453) 评论(0) 推荐(0) 编辑
摘要:"Holiday is coming, holiday is coming, hurray hurray!" shouts Joke in the last day of his college. On this holiday, Joke plans to go to his grandmothe 阅读全文
posted @ 2018-05-25 23:01 nimphy 阅读(210) 评论(0) 推荐(0) 编辑
摘要:Taplu and Abhishar loved playing scrabble. One day they thought of inventing a new game using alphabet tiles. Abhishar wrote a string using tiles and 阅读全文
posted @ 2018-05-25 17:08 nimphy 阅读(439) 评论(0) 推荐(0) 编辑
摘要:After the success of 2nd anniversary (take a look at problem FTOUR for more details), this 3rd year, Travel Agent SPOJ goes on with another discount t 阅读全文
posted @ 2018-05-25 16:29 nimphy 阅读(362) 评论(2) 推荐(0) 编辑
摘要:Jonathan Irvin Gunawan is a very handsome living person. You have to admit it to live in this world. To become more handsome, Jonathan the Handsome ha 阅读全文
posted @ 2018-05-24 16:03 nimphy 阅读(344) 评论(0) 推荐(0) 编辑
摘要:A tree is a connected graph that doesn't contain any cycles. The distance between two vertices of a tree is the length (in edges) of the shortest path 阅读全文
posted @ 2018-05-24 15:21 nimphy 阅读(289) 评论(0) 推荐(0) 编辑
摘要:Stack is a basic data structure. Where 3 operation can be done- Push: You can push object to the stack Pop: You can pop the object to the stack Top: Y 阅读全文
posted @ 2018-05-23 16:13 nimphy 阅读(283) 评论(0) 推荐(0) 编辑
摘要:Factorial numbers are getting big very soon, you'll have to compute the number of divisors of such highly composite numbers. Input The first line cont 阅读全文
posted @ 2018-05-23 12:21 nimphy 阅读(267) 评论(0) 推荐(0) 编辑
摘要:cathetus(直角边); hypotenuse(斜边) spoj:Structures 给定三角形的直角边,问可以有多少种三角形。 T<=10 , N<=1e15 ,times<=1s. spoj:Shared cathetus (easy) 给定三角形的直角边,问可以有多少种三角形。T<=1e 阅读全文
posted @ 2018-05-22 23:06 nimphy 阅读(378) 评论(0) 推荐(0) 编辑
摘要:题意:取出字符串Str里的两个串S,T,问对应位置的的字符在否有一一映射关系。 hash:对于每个字符s=‘a’-‘z’,我们任意找一个i,满足Si==s,(代码里用lower_bound在区间找到最小的位置i)其对应的字符为Ti==t。然后我们判断这段区间里s的hash值是否等于t的hash值。不 阅读全文
posted @ 2018-05-22 20:50 nimphy 阅读(527) 评论(3) 推荐(0) 编辑
摘要:都是取的模板,这几天做的素数题挺多的,所以整理了放在这里,感觉有一天回用到的! SPOJ:Nth Prime: 求第N个素数,N<1e9。 #include<bits/stdc++.h> using namespace std; typedef long long ll; const int N=2 阅读全文
posted @ 2018-05-21 14:02 nimphy 阅读(311) 评论(0) 推荐(0) 编辑
摘要:It is Dandiya Night! A certain way how dandiya is played is described: There are N pairs of people playing at a time. Both the person in a pair are pl 阅读全文
posted @ 2018-05-20 21:11 nimphy 阅读(242) 评论(0) 推荐(0) 编辑
摘要:String Play Milo has a string S of length L. Tutu picks a random prefix and Mota picks a random suffix ofS. Now, Chotku is given a task of concatenati 阅读全文
posted @ 2018-05-20 19:50 nimphy 阅读(264) 评论(0) 推荐(0) 编辑
摘要:DCE Coders admins are way much geekier than they actually seem! Kartik has been following that tradition lately. How? Well, he took the inversion coun 阅读全文
posted @ 2018-05-19 09:30 nimphy 阅读(674) 评论(4) 推荐(0) 编辑
摘要:One of DB and TN common interests is traveling. One day, they went to Grand Line and found One Piece ! The One Piece treasure has n gold coins (n is e 阅读全文
posted @ 2018-05-18 20:59 nimphy 阅读(313) 评论(0) 推荐(0) 编辑
摘要:Given a sequence of n numbers a1, a2, ..., an and a number of k-queries. A k-query is a triple (i, j, k) (1 ≤ i ≤ j ≤ n). For each k-query (i, j, k), 阅读全文
posted @ 2018-05-17 22:55 nimphy 阅读(381) 评论(2) 推荐(0) 编辑
摘要:Finding factorials are easy but they become large quickly that is why Lucky hate factorials. Today he have another task related to factorials. For a g 阅读全文
posted @ 2018-05-17 10:04 nimphy 阅读(123) 评论(0) 推荐(0) 编辑
摘要:There is a robot on the 2D plane. Robot initially standing on the position (0, 0). Robot can make a 4 different moves: After moving N times Robot gets 阅读全文
posted @ 2018-05-16 16:05 nimphy 阅读(313) 评论(0) 推荐(0) 编辑
摘要:The weather is fine today and hence it's high time to climb the nearby pine and enjoy the landscape. The pine's trunk includes several branches, locat 阅读全文
posted @ 2018-05-15 18:44 nimphy 阅读(294) 评论(0) 推荐(0) 编辑
摘要:Kuro is currently playing an educational game about numbers. The game focuses on the greatest common divisor (GCD), the XOR value, and the sum of two 阅读全文
posted @ 2018-05-15 15:24 nimphy 阅读(522) 评论(0) 推荐(0) 编辑
摘要:Bert is a programmer with a real fear of floating point arithmetic. Bert has quite successfully used rational numbers to write his programs but he doe 阅读全文
posted @ 2018-05-14 19:23 nimphy 阅读(349) 评论(0) 推荐(0) 编辑
摘要:The greatest common divisor GCD(a,b) of two positive integers a and b,sometimes written (a,b),is the largest divisor common to a and b,For example,(1, 阅读全文
posted @ 2018-05-09 15:48 nimphy 阅读(248) 评论(0) 推荐(0) 编辑
摘要:Eagle (AKA Mohamed Ahmed) lives in a city consists of n intersections connected by n-1 roads, in a way that can go from any intersection to any other 阅读全文
posted @ 2018-05-08 21:34 nimphy 阅读(811) 评论(0) 推荐(0) 编辑
摘要:(一下只供自己复习用,目的是对比这几个题,所以写得不详细。需要细节的可以参考其他博主) 【BZOJ3172:单词】 题目: 某人读论文,一篇论文是由许多(N)单词组成。但他发现一个单词会在论文中出现很多次,现在想知道每个单词分别在论文中出现多少次。N<=200,总单词长度不超过10^6。 思路: 简 阅读全文
posted @ 2018-05-07 20:06 nimphy 阅读(552) 评论(0) 推荐(0) 编辑
摘要:【A:最大的K-偏差排列】: 第一次在hiho卡一题,所以暴力了搜索了一下,70分,后面回来打表找规律,规律是有和K有关的周期。 当K<=N/2时,成周期交叉变化,最后尾部部分单独考虑。 当K>N/2时,有三个序列,分别是[K+1...N] [K...N-K+1 ] [1..N-K] 自己的代码: 阅读全文
posted @ 2018-05-06 15:30 nimphy 阅读(289) 评论(0) 推荐(0) 编辑
摘要:题意:给定字符串S,多次修改区间值,多次询问区间有多少匹配串T,可以失配3次。 超时思路:用bitset的思路去做的,每次记录T的相应位置[0,L-1]的集合,一位一位的移、求并,对于出现的失配位置,我们最多可以更新3次。假设数据小一点,没准可以过。 主要还是修改操作那里太暴力的,单点操作的题是遇到 阅读全文
posted @ 2018-05-02 21:53 nimphy 阅读(547) 评论(0) 推荐(0) 编辑
摘要:Special Thanks: Jane Alam Jan*At moment in University of Texas at San Antonio - USA You will be given n integers A1A2A3...An. Find a permutation of th 阅读全文
posted @ 2018-05-02 19:51 nimphy 阅读(319) 评论(0) 推荐(0) 编辑
摘要:BTW wants to buy a gift for her BF and plans to buy an integer array. Generally Integer arrays are costly and hence bought the cheapest one from the m 阅读全文
posted @ 2018-05-01 21:14 nimphy 阅读(201) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示