There are two small spaceship, surrounded by two groups of enemy larger spaceships. The space is a two-dimensional plane, and one group of the enemy spaceships is positioned in such a way that they all have integer y" data-mce-tabindex="0">yy-coordinates, and their x" data-mce-tabindex=
一条东西走向的穆西河将巴邻旁市一分为二,分割成了区域 A" data-mce-tabindex="0">AA 和区域 B" data-mce-tabindex="0">BB。 每一块区域沿着河岸都建了恰好 1000000001" data-mce-tabindex="0">10000000011000000001 栋的建筑,每条岸边的建筑都从 0" data-mce-tabindex="0">00 编号到 1000000000" data-mce-tabindex="0">100000
time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Consider a billiard table of rectangular size n×m" data-mce-tabindex="0">n×mn×m with four pockets. Let's introduce a coordinate system with the origin at th
从前一个和谐的班级,所有人都是搞OI的。有 n" data-mce-tabindex="0">nn 个是男生,有 0" data-mce-tabindex="0">00 个是女生。男生编号分别为 1,…,n" data-mce-tabindex="0">1,…,n1,…,n。 现在老师想把他们分成若干个两人小组写动态仙人掌,一个人负责搬砖另一个人负责吐槽。每个人至多属于一个小组。 有若干个这样的条件:第 v" data-mce-tabindex="0">vv 个男生和第 
Description
“简单无向图”是指无重边、无自环的无向图(不一定连通)。
一个带标号的图的价值定义为每个点度数的k次方的和。
给定n和k,请计算所有n个点的带标号的简单无向图的价值之和。
因为答案很大,请对998244353取模输出。
Input
第一行包含两个正整数n,k(1<=n<=10^9,1<=k<=200000)。
Output
输出一行一个整数,即答案对998244353取模的结果。
Sample Input
6 5
Sample Output
67584000
HINT
Source
本OJ付费获取
\
题目描述 给出n个互不包含的字符串,要求你求出一个最短的字符串S,使得这n个字符串在S中总共至少出现m次,问S最短是多少 (, ), 总字符不超过 。 输入格式: 第一行两个整数n, m 接下来n行n个字符串 输出格式: 一行表示最短长度。 输入输出样例输入样例#1: 复制4 5
monika
tomek
szymon
bernard 输出样例#1: 复制23
这题好想,就是处理每一个字符串AC自动机结尾到另一个结尾的最短路矩阵
Problem Description Professor Zhang has an undirected graph G with n vertices and m edges. Each vertex is attached with a weight wi. Let Gi be the graph after deleting the i-th vertex from graph G. Professor Zhang wants to find the weight of&nbs
题目描述The Trains of Colour Parade begins tomorrow in Byteotia. Intense preparations are already in progress at the station's auxiliary tracks. There are nn parallel tracks at the station, numbered from 11 to nn . The train no. ii occupies the i^{th}ith 
题目描述Everyone knew it would only be a matter of time. So what? Faced for years on, a peril becomes the every-day reality. It loses its meaning... Today the letter of the Bitotian char Bittard to the Byteotian king Byteasar was released to the public. Bitotia requested annexation of the whole Byteotia
题目描述共有m部电影,编号为1~m,第i部电影的好看值为w[i]。在n天之中(从1~n编号)每天会放映一部电影,第i天放映的是第f[i]部。你可以选择l,r(1<=l<=r<=n),并观看第l,l+1,…,r天内所有的电影。如果同一部电影你观看多于一次,你会感到无聊,于是无法获得这部电影的好看值。所以你希望最大化观看且仅观看过一次的电影的好看值的总和。 输入输出格式输入格式: 第一行两个整数n,m(1<=m<=n<=1000000)。第二行包含n个整数f[1],f[2],…,fn。第三行包含m个整数w[1],w[2],…,wm。