数论
lizhaowei213
活着就为改变世界!
展开
-
POJ 3090 Visible Lattice Points
A - Visible Lattice Points Time Limit:1000MS Memory Limit:65536KB 64bit IO Format:%I64d & %I64u SubmitStatus Description A lattice point (x, y) in the first quadrant (x and y ar原创 2015-08-22 10:28:26 · 435 阅读 · 0 评论 -
POJ 2478 Farey Sequence
B - Farey Sequence Time Limit:1000MS Memory Limit:65536KB 64bit IO Format:%I64d & %I64u SubmitStatus Description The Farey Sequence Fn for any integer n with n >= 2 is the set of i原创 2015-08-22 11:13:56 · 281 阅读 · 0 评论 -
UVA 10673 Play with Floor and Ceil
扩展欧几里德算法。模板题。 根据题目的意思。 ax+by=c,已知a、b、c,求解使该等式成立的一组x,y。 a,b的最大公约数为gcd(a,b)。如果c不是gcd(a,b)的倍数,则该等式无解,因为等式左边除以gcd(a,b)是整数,而等式右边除以gcd(a,b)后为小数。 因此,只有当c是gcd(a,b)的倍数的时候,该等式有解。这样,可以通过计算使ax1+by1=gcd(a,b)原创 2015-08-22 13:09:43 · 366 阅读 · 0 评论 -
POJ 1061 青蛙的约会
F - 青蛙的约会 Time Limit:1000MS Memory Limit:10000KB 64bit IO Format:%I64d & %I64u SubmitStatus Description 两只青蛙在网上相识了,它们聊得很开心,于是觉得很有必要见一面。它们很高兴地发现它们住在同一条纬度线上,于是它们约定各自朝西跳,直到碰面为止。可是它们出发之前原创 2015-08-22 20:33:56 · 387 阅读 · 0 评论 -
POJ 1006 Biorhythms
Biorhythms Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 122720 Accepted: 38720 Description Some people believe that there are three cycles in a person's l原创 2015-10-08 22:24:34 · 247 阅读 · 0 评论 -
CodeForces 584D Dima and Lisa
D. Dima and Lisa time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Dima loves representing an odd number as th原创 2016-01-17 15:05:09 · 503 阅读 · 0 评论 -
CodeForces 27E Number With The Given Amount Of Divisors
E. Number With The Given Amount Of Divisors time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Given the number n, find原创 2016-01-19 17:51:12 · 453 阅读 · 0 评论 -
UVA 11388 GCD LCM
#include long long G,L; int main() { int t; scanf("%d",&t); while(t--) { scanf("%lld%lld",&G,&L); if(L%G!=0) pr原创 2016-01-28 16:10:06 · 337 阅读 · 0 评论