09 2018 档案
摘要:Recently, TeaTree acquire new knoledge gcd (Greatest Common Divisor), now she want to test you. As we know, TeaTree is a tree and her root is node 1,
阅读全文
摘要:描述 《Journey to the West》(also 《Monkey》) is one of the Four Great Classical Novels of Chinese literature. It was written by Wu Cheng'en during the Ming
阅读全文
摘要:推荐博客 : https://blog.csdn.net/zjznku/article/details/65937416 其实启发式合并核心思想就是将小的集合合并到大的集合上面 例题 : HDU 4358 求一颗树上以每个点为子树中权值出现 k 次的个数有多少个
阅读全文
摘要:Recently, TeaTree acquire new knoledge gcd (Greatest Common Divisor), now she want to test you. As we know, TeaTree is a tree and her root is node 1,
阅读全文
摘要:题目描述 一天,神犇和 LCR 在玩扑克牌。他们玩的是一种叫做“接竹竿”的游戏。 游戏规则是:一共有 nnn 张牌,每张牌上有一个花色 ccc 和一个点数 vvv,花色不超过 kkk 种。将这些牌依次放入一列牌的末端。若放入之前这列牌中已有与这张牌花色相同的牌,你可以选择将这张牌和任意一张花色相同的
阅读全文
摘要:题目描述 一共有 nnn个数,第 iii 个数 xix_ixi 可以取 [ai,bi][a_i , b_i][ai,bi] 中任意值。设 S=∑xi2S = \sum{{x_i}^2}S=∑xi2,求 SSS 种类数。 题目描述 一共有 nnn个数,第 iii 个数 x
阅读全文
摘要:B . A prince of the Science Continent was imprisoned in a castle because of his contempt for mathematics when he was young, and was entangled in some
阅读全文
摘要:long long 范围内的开根 浮点数的开根 java 大数套牛顿迭代
阅读全文
摘要:链接:https://www.nowcoder.com/acm/contest/186/C来源:牛客网 终于Alice走出了大魔王的陷阱,可是现在傻傻的她忘了带武器了,这可如何是好???这个时候,一个神秘老人走到她面前答应无偿给她武器,但老人有个条件,需要将所选武器分别放在天平的两端,若天平平衡则可
阅读全文
摘要:题目描述 NOIP 复赛之前,HSD 桑进行了一项研究,发现人某条染色体上的一段 DNA 序列中连续的 kkk 个碱基组成的碱基序列与做题的 AC 率有关!于是他想研究一下这种关系。现在给出一段 DNA 序列,请帮他求出这段 DNA 序列中所有连续 kkk 个碱基形成的碱基序列中,出现最多的一种的出
阅读全文
摘要:题目描述 给出一个长度为 nnn 的数列 a1,a2,a3,...,an{ a_1 , a_2 , a_3 , ... , a_n }a1,a2,a3,...,an,以及 mmm 组询问 (li,ri,ki)( l_i , r_i , k_i)(li,ri,ki
阅读全文
摘要:ll prime[100]; ll cnt; void getprime(){ cnt = 0; ll num = m; for(ll i = 2; i*i 1) prime[cnt++] = num; } void solve() { ll ans = 0; // cnt 下标从0开始 for(ll i = 1; i < (1<<cnt); i++...
阅读全文
摘要:E . You promised your girlfriend a rounded cake with at least SSS strawberries. But something goes wrong, you don't have the final cake but an infinit
阅读全文
摘要:当set存的是一个结构体时,若想用 find 函数,应在结构体内部写一个函数
阅读全文
摘要:A . 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 sh
阅读全文
摘要:B. Feeling hungry, a cute hamster decides to order some take-away food (like fried chicken for only 303030 Yuan). However, his owner CXY thinks that t
阅读全文