码迷,mamicode.com
首页 >  
搜索关键字:namespace    ( 41927个结果
poj_3187_Backward Digit Sums
http://poj.org/problem?id=3187 /*总结:头文件#include , next_permutation(num,num+n)生成数组num的全排列, */ #include #include using namespace std; int fun(int *num,int n) { int num1[10];//不能直接使用num操作,涉及内存管理,需要用替...
分类:其他好文   时间:2015-02-10 11:18:36    阅读次数:234
线段树_POJ-3468
题目链接:http://poj.org/problem?id=3468线段树裸题。。。。用了两种方法写:1.lazy,效率略低 1 #include 2 #include 3 #include 4 #include 5 using namespace std; 6 #define lowbit(a)...
分类:其他好文   时间:2015-02-10 10:27:30    阅读次数:170
YT14-HDU-求1/n的第m位数
Problem Description Now give you two integers n m, you just tell me the m-th number after radix point in 1/n,for example n=4,the first numble after point is 2,the second is 5,and all 0 followed Inpu...
分类:其他好文   时间:2015-02-10 00:43:33    阅读次数:174
C++程序设计实践指导1.13自然数集中找合数改写要求实现
改写要求1:用单链表实现改写要求2:析构函数中依次将链表结点删除#include #include using namespace std;struct LinkNode{ int data; LinkNode* next;};class NOPRIME{ frie...
分类:编程语言   时间:2015-02-10 00:26:38    阅读次数:305
bzoj 3223 文艺平衡树 Splay 打标志
是NOI2003Editor的一个子任务 1 #include 2 #include 3 #define maxn 100010 4 using namespace std; 5 6 struct Splay { 7 int pre[maxn], son[maxn][2]...
分类:其他好文   时间:2015-02-09 22:56:59    阅读次数:654
中山大学校队内部选拔赛试题3.1【Factorial Factors】--------2015年2月9日
一:题目大意当给定一个数时,先求出它的所有因子N1,N2······Nk,然后求出它的因子对应的因子的个数n1,n2·····nk,并求出最终结果S=n1^3+n2^3+n3^3+·····+nk^3.二:题目分析本题的数据范围是N#includeusing namespace std;int is...
分类:其他好文   时间:2015-02-09 22:54:04    阅读次数:135
探究加法操作的原子性
加法在多线程下是否可靠? 我们先看下面的实例: #include #include #include #include #include #include using namespace std; int g_count = 0; int main(int argc, const char *arg...
分类:其他好文   时间:2015-02-09 22:52:51    阅读次数:258
【1042】智商是硬伤
唉,还没坚持一下下怎么就能说自己不行我的改了一天都没改好,到了晚上都没耐心再改了。这么蒟蒻道题,我能做这么久真是能耐先上刘汝佳版标准代码 1 //hdoj1042.cpp 2 #include 3 #include 4 using namespace std; 5 const int...
分类:其他好文   时间:2015-02-09 22:49:51    阅读次数:201
代码练习
1.火柴棒等式 1 #include 2 #include 3 using namespace std; 4 5 const int match[10]={6,2,5,5,4,5,6,3,7,6}; 6 7 int n; 8 9 int merge(int x){10 int su...
分类:其他好文   时间:2015-02-09 21:41:01    阅读次数:237
字符串-03. 字符串的冒泡排序(20)
我们已经知道了将N个整数按从小到大排序的冒泡排序法。本题要求将此方法用于字符串序列,并对任意给定的K(#include #include #include #include using namespace::std; int main(){ char a[100][12]; int n,k;...
分类:编程语言   时间:2015-02-09 21:36:37    阅读次数:174
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!