Dancepted

Dancing Acceped!

2018年11月5日

POJ3090 Visible Lattice Points (数论:欧拉函数模板)

摘要: 题目链接:传送门 思路: 所有gcd(x, y) = 1的数对都满足题意,然后还有(1, 0) 和 (0, 1)。 #include <iostream> #include <cstring> using namespace std; const int MAX_N = 1e3 + 5; int p 阅读全文

posted @ 2018-11-05 21:21 Danceped 阅读(160) 评论(0) 推荐(0) 编辑

2016 ACM-ICPC EC-Final

摘要: 题目链接:Uva传送门 CFGym传送门 UVALive7897 Number Theory Problem (找规律签到) 思路: 8的幂次都是可以的,因为an-1一定能分解成a-1乘上一个多项式。 看不出来也没关系,打表就发现每三个数有一个7的倍数。 代码: #include <cstdio> 阅读全文

posted @ 2018-11-05 21:15 Danceped 阅读(383) 评论(0) 推荐(0) 编辑

导航