#include #includeusing namespace std;class Student//声明基类{public://公用部分 Student(int n, string nam)//基类构造函数 { num=n; name=nam; } void ...
分类:
其他好文 时间:
2014-07-10 11:23:39
阅读次数:
193
=====>友元运算符#include using namespace std;class Test{ public: Test(int a = 0) { Test::a = a; } friend Test ope...
分类:
编程语言 时间:
2014-07-10 10:31:50
阅读次数:
214
#include typedef int (__stdcall* FUN)(int);//定义函数指针,参数为Int,返回为int,调用约定__stdcallint __stdcall fun1(int x){ std::cout << x << std::endl; return x;...
分类:
其他好文 时间:
2014-07-10 00:45:12
阅读次数:
203
字典树。 1 #include 2 #include 3 #include 4 #include 5 #include 6 #include 7 using namespace std; 8 9 typedef struct Trie { 10 int in;...
分类:
其他好文 时间:
2014-07-10 00:25:58
阅读次数:
378
1 /* 2 ID: neverchanje 3 PROG: TOJ2195 4 LANG: C++11 5 */ 6 #include 7 #include 8 using namespace std; 9 10 char cmd;11 int n,val;12 int main(){13 //....
分类:
其他好文 时间:
2014-07-10 00:08:56
阅读次数:
196
约瑟夫环形问题有30人将其编号,从头开始1,2,3数数,每到3将其删除,一共删去15个数。输出被删去的15个数#includeusing namespace std;struct LinkList{ int val; LinkList* next; LinkList(int a):val(a)...
分类:
其他好文 时间:
2014-07-09 23:43:04
阅读次数:
246
http://acm.hdu.edu.cn/showproblem.php?pid=1596#include #include #include #include using namespace std;int n;int ss,ee;double map[1002][1002];void F(){...
分类:
其他好文 时间:
2014-07-09 23:41:53
阅读次数:
352
http://acm.hdu.edu.cn/showproblem.php?pid=1874SPFA#include #include #include #include #define N 1000001using namespace std;int n,m;int v[202],dis[202]...
分类:
其他好文 时间:
2014-07-08 00:16:33
阅读次数:
256
题目描述:给定n,a求最大的k,使n!可以被a^k整除但不能被a^(k+1)整除。输入:两个整数n(2 2 #include 3 #include 4 using namespace std; 5 int su[168] = {2,3,5,7,11,13,17,19,23,29,31,37,41,4...
分类:
其他好文 时间:
2014-07-07 23:44:47
阅读次数:
281
题目描述:设有N*N的方格图(N 2 #include 3 #include 4 using namespace std; 5 6 int a[11][11]; 7 int dp[11][11][11][11]; 8 const int INF = 999999999; 9 10 int oper....
分类:
其他好文 时间:
2014-07-07 22:57:53
阅读次数:
180