摘要:
题目传送门 GCD SUM 题目描述 for i=1 to n for j=1 to n sum+=gcd(i,j) 给出n求sum. gcd(x,y)表示x,y的最大公约数. 输入输出格式 输入格式: n 输出格式: sum 输入输出样例 输入样例#1: 2 输出样例#1: 5 输入样例#1: 2 阅读全文
摘要:
题目传送门 晕牛Dizzy Cows 题目背景 Hzwer 神犇最近又征服了一个国家,然后接下来却也遇见了一个难题。 题目描述 The cows have taken to racing each other around the farm but they get very dizzy when 阅读全文
摘要:
Matrix 题目描述 小 z 的女朋友送给小 z 一个 n × n 的矩阵。但是矩阵实在太大了,小 z 的女朋友拿不动,只能带给他两个长度为 n 的整数序列 l, t ,分别作为矩阵 F 的第一行和第一列(保证 l1 = t1 ),并且告诉小 z 矩阵可以通过如下方式得到:Fi,j = a · F 阅读全文
摘要:
题目传送门 BICIKLI 题意翻译 给定一个有向图,n个点,m条边。请问,1号点到2号点有多少条路径?如果有无限多条,输出inf,如果有限,输出答案模10^9的余数。 两点之间可能有重边,需要看成是不同的路径。 题目描述 A bicycle race is being organized in a 阅读全文
摘要:
题目传送门 Tree Time Limit: 1000MS Memory Limit: 30000K Total Submissions: 30475 Accepted: 10232 Description Give a tree with n vertices,each edge has a le 阅读全文
摘要:
题目传送门 Promotion Counting 题目描述 The cows have once again tried to form a startup company, failing to remember from past experience that cows make terrib 阅读全文
摘要:
题目传送门 Tree Rotation 题目描述 Byteasar the gardener is growing a rare tree called Rotatus Informatikus. It has some interesting features: The tree consists 阅读全文