摘要:
为什么有人永远渴望旅行,或许就因为,巧合和温暖会在下一秒蜂拥而至吧。 一直想去旅游的天天决定在即将到来的五一假期中安排一场环游世界的旅行。为此,他已经提前查阅了很多资料,并准备画一张旅游路线图。天天先将所有可能会去的 nn 个旅游城市依次编号标记为 1,2,⋯,n1,2,⋯,n。如果从城市 AA 到 阅读全文
摘要:
Cao Cao made up a big army and was going to invade the whole South China. Yu Zhou was worried about it. He thought the only way to beat Cao Cao is to 阅读全文
摘要:
There is a country with 𝑛n citizens. The 𝑖i-th of them initially has 𝑎𝑖ai money. The government strictly controls the wealth of its citizens. When 阅读全文
摘要:
#include #include #include #include #include #include using namespace std; typedef long long ll; const int maxn=100010; //字符串长度最大值 int nex[maxn],ex[maxn]; //ex数组即为extend数组 //预处理计算next数组 //void GE... 阅读全文
摘要:
Pavel is developing another game. To do that, he again needs functions available in a third-party library too famous to be called. There are mm functi 阅读全文
摘要:
You are given a tree that represents a hierarchy in a company, where the parent of node u is their direct manager. Each employee is assigned a project 阅读全文
摘要:
This problem is same as the previous one, but has larger constraints. It was a Sunday morning when the three friends Selena, Shiro and Katie decided t 阅读全文
摘要:
There are n lines l1,l2,…,ln on the 2D-plane. Staring at these lines, Calabash is wondering how many pairs of (i,j) that 1≤i<j≤n and li,lj share at le 阅读全文