Live2d Test Env

04 2018 档案

摘要:On September 22, 2004, Oceanic Flight 815 crashed on a mysterious island somewhere in the pacific. There actually were survivors in the crash , N surv 阅读全文
posted @ 2018-04-30 16:31 nimphy 阅读(256) 评论(0) 推荐(0) 编辑
摘要:Rastas's has been given a number n. Being weak at mathematics, she has to consider all the numbers from 1 to 2n - 1 so as to become perfect in calcula 阅读全文
posted @ 2018-04-30 15:57 nimphy 阅读(294) 评论(0) 推荐(0) 编辑
摘要:Shadowman loves to collect box but his roommates woogieman and itman don't like box and so shadowman wants to hide boxes as many as possible. A box ca 阅读全文
posted @ 2018-04-29 19:50 nimphy 阅读(203) 评论(0) 推荐(0) 编辑
摘要:Problem statement: A string is said to be “PATHETIC” if all the characters in it are repeated the same number of times. You are given a string of leng 阅读全文
posted @ 2018-04-29 14:30 nimphy 阅读(261) 评论(0) 推荐(0) 编辑
摘要:You are given N(1<=N<=100000) integers. Each integer is square free(meaning it has no divisor which is a square number except 1) and all the prime fac 阅读全文
posted @ 2018-04-28 11:13 nimphy 阅读(356) 评论(0) 推荐(0) 编辑
摘要:Given an array of N integers A1, A2, A3…AN. If you randomly choose two indexes i ,j such that 1 ≤ i < j ≤ N, what is the expected value of Ai | Aj? In 阅读全文
posted @ 2018-04-25 23:28 nimphy 阅读(306) 评论(0) 推荐(0) 编辑
摘要:。。。 阅读全文
posted @ 2018-04-25 18:25 nimphy 阅读(130) 评论(0) 推荐(0) 编辑
摘要:ultmaster 男神和小迷妹们玩起了捉迷藏的游戏。 小迷妹们都希望自己被 ultmaster 男神发现,因此她们都把自己位置告诉了 ultmaster 男神,因此 ultmaster 男神知道了自己去找每个小迷妹所要花的时间。 已知发现第 i 小迷妹得到的分数为 ai⋅tr(tr 为游戏剩余时间 阅读全文
posted @ 2018-04-24 21:15 nimphy 阅读(630) 评论(0) 推荐(0) 编辑
摘要:Waca loves maths,.. a lot. He always think that 1 is an unique number. After playing in hours, Waca suddenly realize that every integer can be represe 阅读全文
posted @ 2018-04-24 20:35 nimphy 阅读(367) 评论(0) 推荐(0) 编辑
摘要:As you might already know, Ada the Ladybug is a farmer. She grows a big fruit tree (with root in 0). There is a fruit on every node of the tree. Ada i 阅读全文
posted @ 2018-04-24 12:20 nimphy 阅读(183) 评论(0) 推荐(0) 编辑
摘要:Ada the Ladybug lives near an orange tree. Instead of reading books, she investigates the oranges. The oranges on orange tree can be in up to 5*50 Sha 阅读全文
posted @ 2018-04-23 18:33 nimphy 阅读(424) 评论(0) 推荐(0) 编辑
摘要:Rainbow 6 is a very popular game in colleges. There are 2 teams, each having some members and the 2 teams play some matches against each other. The te 阅读全文
posted @ 2018-04-23 09:35 nimphy 阅读(177) 评论(0) 推荐(0) 编辑
摘要:ps:感觉比昨天晚上的华师题目质量高一点,至少emmm,题面没有那么多bug。 下面忽略了水题,只给出我觉得有价值的几个题目的题解和代码: 【C:神山神石】: 题意: 每一天,Wells可以喂神山一个神石,使得神山的高度变为原高度乘上神石的能力值,或者使得所有的神石能力值+1。第 0 天时,所有神石 阅读全文
posted @ 2018-04-22 18:31 nimphy 阅读(381) 评论(0) 推荐(0) 编辑
摘要:Problem description. The Fibonacci numbers defined as f(n) = f(n-1) + f(n-2) where f0 = 0 and f1 = 1. We define a function as follows D(n,x) = x + x^2 阅读全文
posted @ 2018-04-20 22:19 nimphy 阅读(435) 评论(0) 推荐(0) 编辑
摘要:You are given an array of size N. How many distinct arrays can you generate by swapping two numbers for exactly once? The two selected numbers can be 阅读全文
posted @ 2018-04-20 20:27 nimphy 阅读(340) 评论(0) 推荐(0) 编辑
摘要:Katniss Everdeen after participating in Hunger Games now wants to participate in NT Games (Number Theory Games). As she begins President Snow provides 阅读全文
posted @ 2018-04-20 16:38 nimphy 阅读(319) 评论(0) 推荐(0) 编辑
摘要:Dima adds letters s1, …, sn one by one to the end of a word. After each letter, he asks Misha to tell him how many new palindrome substrings appeared 阅读全文
posted @ 2018-04-19 22:17 nimphy 阅读(223) 评论(0) 推荐(0) 编辑
摘要:The northern part of the Pyramid contains a very large and complicated labyrinth. The labyrinth is divided into square blocks, each of them either fil 阅读全文
posted @ 2018-04-19 20:01 nimphy 阅读(171) 评论(0) 推荐(0) 编辑
摘要:A positive integer is called a palindrome if its representation in the decimal system is the same when read from left to right and from right to left. 阅读全文
posted @ 2018-04-19 18:57 nimphy 阅读(212) 评论(0) 推荐(0) 编辑
摘要:Misha and Dima are promising young scientists. They make incredible discoveries every day together with their colleagues in the Spilkovo innovative ce 阅读全文
posted @ 2018-04-17 20:19 nimphy 阅读(522) 评论(0) 推荐(0) 编辑
摘要:Do you think that magic is simple? That some hand-waving and muttering incomprehensible blubber is enough to conjure wonderful gardens or a fireball t 阅读全文
posted @ 2018-04-17 16:29 nimphy 阅读(273) 评论(0) 推荐(0) 编辑
摘要:Misha trains several ACM teams at the university. He is an experienced coach, and he does not underestimate the meaning of friendly and collaborative 阅读全文
posted @ 2018-04-17 10:51 nimphy 阅读(342) 评论(0) 推荐(0) 编辑
摘要:The hacker Michael develops breakthrough password manager, which is called KEK (Keeper of Encrypted Keys). A distinctive feature of KEK is excellent s 阅读全文
posted @ 2018-04-16 22:28 nimphy 阅读(297) 评论(0) 推荐(0) 编辑
摘要:There is a strip 1 × n with two sides. Each square of the strip (their total amount is 2n, n squares on each side) is painted in one of two colors (le 阅读全文
posted @ 2018-04-16 18:24 nimphy 阅读(405) 评论(0) 推荐(0) 编辑
摘要:FJ is about to take his N (1 ≤ N ≤ 2,000) cows to the annual"Farmer of the Year" competition. In this contest every farmer arranges his cows in a line 阅读全文
posted @ 2018-04-12 19:54 nimphy 阅读(326) 评论(0) 推荐(0) 编辑
摘要:占位 阅读全文
posted @ 2018-04-06 10:45 nimphy 阅读(164) 评论(0) 推荐(0) 编辑
摘要:很久很久以前,在你刚刚学习字符串匹配的时候,有两个仅包含小写字母的字符串A和B,其中A串长度为m,B串长度为n。可当你现在再次碰到这两个串时,这两个串已经老化了,每个串都有不同程度的残缺。 你想对这两个串重新进行匹配,其中A为模板串,那么现在问题来了,请回答,对于B的每一个位置i,从这个位置开始连续 阅读全文
posted @ 2018-04-05 22:59 nimphy 阅读(993) 评论(0) 推荐(0) 编辑
摘要:把每一位看成ai*10^i,然后就是两个多项式相乘。利用FFT,把复杂度降到O(nlogn)。 阅读全文
posted @ 2018-04-05 17:23 nimphy 阅读(206) 评论(0) 推荐(0) 编辑
摘要:FFT在用于解决多项式乘法A*B(A和B为多项式,形如a0+a1*x^1+a2*x^2....)的时候,通俗地解释就是: 原理:先根据各自的系数各自转化为对应的向量(O(nlogn)),然后向量相乘(O(n)),最后再还原得到相乘后的系数(O(nlogn))。 手段:利用了虚数,使得可以分治来快速求 阅读全文
posted @ 2018-04-05 11:52 nimphy 阅读(177) 评论(0) 推荐(0) 编辑
摘要:You're given a sequence s of N distinct integers.Consider all the possible sums of three integers from the sequence at three different indicies.For ea 阅读全文
posted @ 2018-04-04 21:06 nimphy 阅读(491) 评论(0) 推荐(0) 编辑
摘要:思路:树状结构,改变权值其实是删一条边和加一条边,所以转化为LCT题。 优化:开始建树(原树,一共N条边,根为N+1)的时候,由于原树的虚拟的,我们不一定要把N条边都Link,而是可以直接记录fa即可。 当然还可以用分块做。但是没有LCT直观。 阅读全文
posted @ 2018-04-03 23:09 nimphy 阅读(410) 评论(0) 推荐(0) 编辑
摘要:题意:给定N点M边的无向图,每边有权值,Q次询问,每次询问给出u、v,回答u到v的所有路径中最大边的最小值。 思路:常识可知,需要最小生成树,然后就是最小生成树两点间的最大值。 可以用树剖+线段树解决 。或者动态树LCT姿势搞定。 (写LCT写惯了就不想写树剖了有没有 阅读全文
posted @ 2018-04-03 16:11 nimphy 阅读(197) 评论(0) 推荐(0) 编辑
摘要:题意:给定一个无向图,每条边有两个权值ai和bi,从1走到N,设路径上a权的最大值为A,b权的最大值为B,求A+B的最小值。n<=5*1e4. m<=5*1e4。 思路:要生成最小生成树(至少满足1和N连通),我们选择的边如果按A递增,那么易得B递减。现在按a从小到大排序,得到对于每个a,找到对应的 阅读全文
posted @ 2018-04-03 10:52 nimphy 阅读(418) 评论(0) 推荐(0) 编辑
摘要:题意:给定N个节点的初始值,现在有M个操作,每次输入opt、x、y,opt情况如下。 0:输出x到y的路径异或和保证x到y是联通的。 1:连接x和y,已经连通则忽略。 2:删除边x和y,如果不连通则忽略。(题目的连通应该还保证了是直接相邻,不然需要记录直接相邻的关系)。 3:把节点x的值改为y。 思 阅读全文
posted @ 2018-04-02 19:08 nimphy 阅读(269) 评论(0) 推荐(0) 编辑
摘要:题意:给定N个岛屿,每个岛屿有初始数量的企鹅。现在有如下三种操作: 1. "bridge A B"—— 在A与B之间建立一座大桥(A与B是不同的岛屿)。如果A、B连通,输出"yes",且建造这座大桥。否则,输出"no"。 2. "penguins A X"——岛屿A此时的帝企鹅数量变为X。 3. " 阅读全文
posted @ 2018-04-02 18:34 nimphy 阅读(218) 评论(0) 推荐(0) 编辑
摘要:题意:一个森林,有三种操作。 L,u,v: 在u和v之间加一条边。 C,u,v:删去u和v之间的边。 Q,u,v:查询u和v是否在同一棵树里。 思路:简单的LCT。 具体的: 关于查找两个节点X、Y是否在同一棵树上:因为splay的根节点是不固定的,也没有代表性,所以需要找“原树”的根节点。 具体的 阅读全文
posted @ 2018-04-02 10:30 nimphy 阅读(308) 评论(0) 推荐(0) 编辑
摘要:【参考】:我觉得写得最清楚的一个:https://oi.men.ci/link-cut-tree-notes/ https://www.cnblogs.com/flashhu/p/8324551.html 论文什么的太专业了我一半没耐心去看:https://wenku.baidu.com/view/ 阅读全文
posted @ 2018-04-01 21:14 nimphy 阅读(211) 评论(0) 推荐(0) 编辑

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