摘要: 有这样一段两两求最大公约数的程序CoGcd, 给出m的值,进行t次询问,每次询问包含一对xi,yi。针对每次询问,输出整个程序执行过程当中,Gcd(xi, yi)被执行了多少次。 例如:$m = 20$, $Gcd(8,5)$会被执行4次,对应的x, y值是 (8,5) (5,8) (13,8) ( 阅读全文
posted @ 2019-10-04 22:49 jerome_wei 阅读(388) 评论(0) 推荐(0)
摘要: 挺好玩的一场比赛。 "链接" A 打表,打到$2e4$左右会发现有一个长度$104$的循环节。 c++ include using namespace std; int col[5010][5010]; int dx[4] = {1,0, 1,0},dy[4] = {0,1,0, 1}; long 阅读全文
posted @ 2019-10-04 22:47 jerome_wei 阅读(240) 评论(0) 推荐(0)