洛谷 P3496 [POI2010]GIL-Guilds】的更多相关文章

P3496 [POI2010]GIL-Guilds 题目描述 King Byteasar faces a serious matter. Two competing trade organisations, The Tailors Guild and The Sewers Guild asked, at the same time, for permissions to open their offices in each town of the kingdom. There are  town…
洛谷P3502 [POI2010]CHO-Hamsters感想及题解(图论+字符串+矩阵加速\(dp\&Floyd\)) 标签:题解 阅读体验:https://zybuluo.com/Junlier/note/1310683 扯闲谈 觉得这是道比较好的引导模型转换的题,就决定写一篇题解 即使我就是看的ZSY的,并且几乎写的一模一样(还是稍有不同的) 安利一发租酥雨的题解 原题地址:洛谷P3502 [POI2010]CHO-Hamsters 先理解题意 给出\(n\)个字符串,让你用这\(n\)个…
洛谷题目链接:[POI2010]ANT-Antisymmetry 题目描述 Byteasar studies certain strings of zeroes and ones. Let be such a string. By we will denote the reversed (i.e., "read backwards") string , and by we will denote the string obtained from by changing all the…
题目描述 King Byteasar faces a serious matter. Two competing trade organisations, The Tailors Guild and The Sewers Guild asked, at the same time, for permissions to open their offices in each town of the kingdom. There are  towns in Byteotia. Some of the…
P3507 [POI2010]GRA-The Minima Game 题目描述 Alice and Bob learned the minima game, which they like very much, recently. The rules of the game are as follows. A certain number of cards lies on a table, each inscribed with a positive integer. The players m…
P3505 [POI2010]TEL-Teleportation 题目描述 King Byteasar is the ruler of the whole solar system that contains  planets. This number is so large that people have abandoned the silly custom of naming the planets and use numbers instead. The planets are thus…
    这是一道字符串建模+图论的问题. 题目描述 Byteasar breeds hamsters. Each hamster has a unique name, consisting of lower case letters of the English alphabet. The hamsters have a vast and comfortable cage. Byteasar intends to place a display under the cage to visuali…
题目描述 Alice and Bob learned the minima game, which they like very much, recently. The rules of the game are as follows. A certain number of cards lies on a table, each inscribed with a positive integer. The players make alternate moves, Alice making t…
题目大意:有$n$个点,每个点有一个距离(从小到大给出),从第$i$个点跳一次,会跳到距离第$i$个点第$k$远的点上(若有两个点都是第$k$远,就跳到编号小的上).问对于从每个点开始跳,跳$m$次,最后会到哪个点 题解:难点主要在处理第$k$远上(跳只需要一个类似快速幂的东西就好了,也就是倍增). 可以维护两个指针,一个是$l$,一个是$r(r=l+k)$,且到$i$这个点时$l\leqslant i\leqslant r$.刚开始时$l=1,r=k+1$,若$p_{r+1}-p_i<p_i-…
割点 首先 tarjan 求割点, 对于不是割点的点, 答案是 2 * (n-1) 有序,所以要乘 2 对于是割点的点, 答案是删去该点后所有连通块的个数加上 n-1 在乘 2 #include <iostream> #include <cstdio> #include <cmath> #include <cstring> #include <algorithm> #define ll long long using namespace std;…