- 博客(10)
- 收藏
- 关注
原创 Deciphering Password
DescriptionXiaoming has just come up with a new way for encryption, by calculating the key from a publicly viewable number in the following way: Let the public key N = A B, where 1 0, a 1, a 2,
2014-12-26 15:37:55 371
原创 找新朋友
Description新年快到了,“猪头帮协会”准备搞一个聚会,已经知道现有会员N人,把会员从1到N编号,其中会长的号码是N号,凡是和会长是老朋友的,那么该会员的号码肯定和N有大于1的公约数,否则都是新朋友,现在会长想知道究竟有几个新朋友?请你编程序帮会长计算出来。 Input第一行是测试数据的组数CN(Case number,1 O
2014-12-26 15:30:39 253
原创 Rightmost Digit
DescriptionGiven a positive integer N, you should output the most right digit of N^N. InputThe input contains several test cases. The first line of the input is a single integer
2014-12-26 15:28:06 213
原创 Largest prime factor
DescriptionEverybody knows any number can be combined by the prime number. Now, your task is telling me what position of the largest prime factor. The position of prime 2 is 1, prime 3 is 2, a
2014-12-26 15:25:30 278
原创 Longge's problem 隐含了错误 WA
DescriptionLongge is good at mathematics and he likes to think about hard mathematical problems which will be solved by some graceful algorithms. Now a problem comes: Given an integer N(1 "O
2014-12-26 15:21:08 270
原创 GCD and LCM 质因数分解与容斥原理
DescriptionGiven two positive integers G and L, could you tell me how many solutions of (x, y, z) there are, satisfying that gcd(x, y, z) = G and lcm(x, y, z) = L? Note, gcd(x, y, z) means the g
2014-12-26 15:14:34 273
原创 buaa 1120 有误,待查
#include#include#include#include#include#include#include#include#include#include#include#define REP(i,a,b) for (i=(a);i<=(b);i++)#define CLEAR(a) memset((a),0,sizeof((a)))using namespace
2014-12-22 15:22:34 223
原创 buaa 1099
为何这个oj上用scanf/printf就TLE,换成cin/cout立马AC?#include#include#include#include#include#include#include#include#include#include#include#define REP(i,a,b) for (i=(a);i<=(b);i++)#define CLEAR(a)
2014-12-22 14:25:02 170
原创 hdu5135 状态压缩DP
位运算左移的位数,位运算符的优先级,应该是老问题了#include#include#include#include#include#include#include#include#include#include#include#define REP(i,a,b) for (i=(a);i<=(b);i++)#define CLEAR(a) memset((a),0,si
2014-12-04 19:41:18 249
原创 hdu 5137 枚举+spfa
很自以为是的敲完代码,乱提交一通都不过。忽略了无向图这一点,预处理就错了另外,无解的情况应该如何表示?熟视无睹#include#include#include#include#include#include#include#include#include#include#include#define REP(i,a,b) for (i=(a);i<=(b);i++
2014-12-04 17:39:15 244
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人