数论
admin__
这个作者很懒,什么都没留下…
展开
-
Aladdin and the Flying Carpet
题目: It's said that Aladdin had to solve seven mysteries before getting the Magical Lamp which summons a powerful Genie. Here we are concerned about the first mystery. Aladdin was about to enter to a...原创 2018-09-02 21:35:35 · 235 阅读 · 0 评论 -
Line
题目: A line on the plane is described by an equation Ax + By + C = 0. You are to find any point on this line, whose coordinates are integer numbers from - 5·1018 to 5·1018 inclusive, or to find out t...原创 2018-09-02 21:50:41 · 170 阅读 · 0 评论 -
欧拉函数模板——快速求小于n且与n互质的数的个数
nlog(n)打表欧拉函数: void Euler() { phi[1] = 1; for(int i=2;i<N;i++) { if(!phi[i]) { for(int j=i;j<N;j=j+i) { if(!phi[j]) ...原创 2019-04-09 08:46:41 · 560 阅读 · 0 评论