public static class IntHelper { /// /// 转换为2进制字符串 /// /// /// public static string To2Base(this int num) { return Convert.... ...
Problem Description RSA is one of the most powerful methods to encrypt data. The RSA algorithm is described as follow:> choose two large prime integer ...
分类:
其他好文 时间:
2017-04-02 09:50:00
阅读次数:
247
1.计算(a/b)%c,其中b能整除a 设a=b*r=(bc)*s+b*t 则(b*t)为a除以bc的余数 r=c*s+t 而 (a/b)%c=r%c=t (a%bc)/b=(b*t)/b=t 所以对于b与c互素和不互素都有(a/b)%c=(a%bc)/b成立。 当bc不大时,先取模bc,再除b 如 ...
分类:
其他好文 时间:
2017-04-01 23:45:48
阅读次数:
420
不得不说这是神题。 %%% http://blog.csdn.net/samjia2000/article/details/51762811 ...
分类:
Web程序 时间:
2017-04-01 23:02:51
阅读次数:
424
邻接矩阵的实现int prime(int cost[][MAXV],int n){ bool vis[MAXV]; int dis[MAXV]; memset(vis,false,sizeof(vis)); fill(dis,dis+MAXV,INF); int ans=0; dis[0]=0; f... ...
分类:
编程语言 时间:
2017-04-01 20:27:24
阅读次数:
154
Write a program to find the n-th ugly number. Ugly numbers are positive numbers whose prime factors only include 2, 3, 5. For example, 1, 2, 3, 4, 5, ...
分类:
其他好文 时间:
2017-04-01 14:54:08
阅读次数:
125
67.声明(extern)与定义 68.命名规范(_a1) 69.作用域 70.域操作符(::),全局作用域(没有名字) 71.一条声明语句由一个基本数据类型(basic type)和紧随其后的一个(declarator)列表组成。每个声明符命名了一个变量并指定该变量为与基本数据结构类型有关的某种类 ...
分类:
编程语言 时间:
2017-04-01 01:00:23
阅读次数:
162
//////2010 #include #include #include using namespace std; mapm; bool Prime[10007]; int P[10005],n; const int maxn=10000; int main() { n=0; memset(Pri... ...
分类:
其他好文 时间:
2017-03-30 16:06:38
阅读次数:
282
《C++ Primer》中指出,const对象仅在文件内有效(2.4章 page54)。 WHAT? const对象 :分两步 - 1,找到对象 2,加const (注意陷阱) 文件内 :指的是在一个项目中,相互独立的文件。即没有#include! HOW? 通过对全局变量加上const限定符,限制 ...
分类:
其他好文 时间:
2017-03-27 13:26:37
阅读次数:
643