- 博客(4)
- 收藏
- 关注
原创 poj 2891 Strange Way to Express Integers(中国剩余定理,exgcd)
Strange Way to Express IntegersElina is reading a book written by Rujia Liu, which introduces a strange way to express non-negative integers. The way is described as following:Choose k different pos...
2019-12-01 19:35:27 151
原创 青蛙的约会(poj 1061)exgcd基础题
青蛙的约会两只青蛙在网上相识了,它们聊得很开心,于是觉得很有必要见一面。它们很高兴地发现它们住在同一条纬度线上,于是它们约定各自朝西跳,直到碰面为止。可是它们出发之前忘记了一件很重要的事情,既没有问清楚对方的特征,也没有约定见面的具体位置。不过青蛙们都是很乐观的,它们觉得只要一直朝着某个方向跳下去,总能碰到对方的。但是除非这两只青蛙在同一时间跳到同一点上,不然是永远都不可能碰面的。为了帮助这两只...
2019-12-01 14:48:14 2031 1
原创 hdu 1695 gcd(莫比乌斯反演)
gcd (莫比乌斯反演)题目Given 5 integers: a, b, c, d, k, you’re to find x in a…b, y in c…d that GCD(x, y) = k. GCD(x, y) means the greatest common divisor of x and y. Since the number of choices may be very l...
2019-11-24 17:08:54 202
原创 spoj 7001 Visible Lattice Points (莫比乌斯反演)
Visible Lattice PointsConsider a NNN lattice. One corner is at (0,0,0) and the opposite one is at (N,N,N). How many lattice points are visible from corner at (0,0,0) ? A point X is visible from point...
2019-11-23 17:20:13 136
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人