1001. A+B Format (20)Calculate a + b and output the sum in standard format -- that is, the digits must be separated into groups of three by commas (un...
分类:
其他好文 时间:
2015-01-22 19:44:39
阅读次数:
101
/**POJ 1258 Agri-Net*求最小生成树权值和*/#include #include #define INF 1000000#define MAXN 101int mark, n;int map[MAXN][MAXN];int lowcost[MAXN];int prime(){ in...
分类:
Web程序 时间:
2015-01-22 17:18:21
阅读次数:
235
Sum of Consecutive Prime NumbersTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 19895Accepted: 10906DescriptionSome positive integers can be ...
分类:
其他好文 时间:
2015-01-22 17:16:21
阅读次数:
177
题意:
给定n,求1至n中有多少个数能仅表示成两个(4*x+1,x>=1)的数之积。
分析:
打表,一开始的list[i*j]代表i*j的组成方式数,不需要用乘法,加法就好。
代码:
//poj 3292
//sep9
#include
using namespace std;
int list[1200000];
int main()
{
memset(list,0,sizeof...
分类:
其他好文 时间:
2015-01-22 15:37:29
阅读次数:
160
下面是我编写内核模块 对应的一个makefile文件——————————————————————————————————————————————————————1ifneq ($(KERNELRELEASE),)2obj-m := hello.o calculate.o3else45 KDIR :=...
分类:
其他好文 时间:
2015-01-22 15:23:24
阅读次数:
154
DATA:str1TYPEcLENGTH12VALUE'zxcv',str2TYPEcLENGTH32,str3TYPEcLENGTH32.CALLFUNCTION'MD5_CALCULATE_HASH_FOR_CHAR'EXPORTINGdata=str1length=0*VERSION=1IMP...
分类:
其他好文 时间:
2015-01-22 14:48:31
阅读次数:
253
If it is a small program, you can use this way:
C:\Rebecca\script\perl>perl -d calculate.pl
Loading DB routines from perl5db.pl version 1.39_10
Editor support available.
Enter h or 'h h' ...
分类:
其他好文 时间:
2015-01-22 13:23:58
阅读次数:
170
Prime Path
Time Limit: 1000MS
Memory Limit: 65536K
Total Submissions: 12060
Accepted: 6843
Description
The ministers of the cabinet were quite upset by the message ...
分类:
其他好文 时间:
2015-01-21 22:33:32
阅读次数:
176
import mathdef prime(n): t=int(math.sqrt(n)+1) if i==2: return 1 for i in range(2,t+1): if n%i==0: return 0 return 1result=0for i in range(2,2000000):...
分类:
编程语言 时间:
2015-01-21 21:48:43
阅读次数:
293
题意:如果K个相邻素数p1,p2,p3.....pk满足pk-p1=s,称这些素数组成一个距离为s的素数K元组,输入a,b,k,s,输出区间[a,b]内距离为s的素数k元组的个数。思路:先打到50000素数表,然后暴力求出a,b区间的素数,然后判断。 1 #include 2 #include .....
分类:
其他好文 时间:
2015-01-21 16:29:15
阅读次数:
105