数论
文章平均质量分 76
WudHHH
这个作者很懒,什么都没留下…
展开
-
LightOJ 1282
You are given two integers: n and k, your task is to find the most significant three digits, and least significant three digits ofnk.InputInput starts with an integer T (≤ 1000), denoting the nu原创 2017-01-19 23:06:02 · 484 阅读 · 0 评论 -
*gcd(a,b)==a^b
Given an integer N, and how many pairs (A;B) are there such that: gcd(A;B) = A xor B where 1这道题套路太深,用了一个我从来没见过的结论。这个结论是这样的:要使得gcd(a,b)== a^b,则gcd(a,b)==a - b==a^b;(假设a>b)证明这个结论:(看其他dalao的证明的)原创 2017-01-20 02:17:31 · 2691 阅读 · 0 评论 -
*任意n的一道式子
Given a prime number C(1≤C≤2×105)C(1≤C≤2×105), and three integers k1, b1, k2 (1≤k1,k2,b1≤109) (1≤k1,k2,b1≤109). Please find all pairs (a, b) which satisfied the equation ak1⋅n+b1 ak1⋅n+b1+bk2原创 2017-01-20 16:48:32 · 320 阅读 · 0 评论 -
任意进制转换
Write a program to convert numbers in one base to numbers in a second base. There are 62 different digits:{ 0-9,A-Z,a-z } HINT: If you make a sequence of base conversions using the output of one原创 2017-01-24 23:26:55 · 426 阅读 · 0 评论 -
Emoogle Grid (方案数,逆元求解,对数求解)
You have to color an M × N (1 ≤ M,N ≤ 108) two dimensional grid. You will be provided K (2 ≤ K ≤ 108) different colors to do so. You will also be provided a list of B (0 ≤ B ≤ 500) list of blocked cell原创 2017-07-22 01:53:51 · 867 阅读 · 0 评论 -
UVA-7040(容斥+快速幂)
Recently, Mr. Big recieved n owers from his fans. He wants to recolor those owers with m colors. The owers are put in a line. It is not allowed to color any adjacent owers with the same color. Flowers原创 2017-10-17 21:22:03 · 375 阅读 · 0 评论