码迷,mamicode.com
首页 >  
搜索关键字:namespace    ( 41927个结果
反射——反射访问私有成员
//BindingFlags.NonPublic | BindingFlags.Instance标志枚举,用于访问私有成员namespace 通过反射访问私有成员{ class Program { static void Main(string[] args) ...
分类:其他好文   时间:2015-08-13 17:37:58    阅读次数:83
HDU 1285 确定比赛名次(toposort)
确定比赛名次Problem Description有N个比赛队(1 2 #include 3 #include 4 #include 5 #include 6 using namespace std; 7 8 int G[505][505]; 9 int indegree[505];10 int ....
分类:其他好文   时间:2015-08-13 17:26:03    阅读次数:131
剑指offer第40题 数组中只出现一次的数字
#includeusing namespace std;bool iswei1(int data,int wei){ int i=8*sizeof(int); data=data>>(i-wei); return(data&1);}void number1(int *list,in...
分类:编程语言   时间:2015-08-13 17:25:06    阅读次数:116
CCF 201403-1 相反数
#include"iostream"#include"set"using namespace std;set s;int main(){ int result=0,i,a; cin>>i; while(i--) { cin>>a; a=abs(a)...
分类:其他好文   时间:2015-08-13 17:24:20    阅读次数:143
剑指offer第41题 和为s的两个数
#includeusing namespace std;bool sumk(int*list,int length,int*num1,int*num2,int k){ int have=false; if(list==NULL||lengthk) j--; ...
分类:其他好文   时间:2015-08-13 17:24:13    阅读次数:106
hdu1316
链接:点击打开链接 题意:问区间[a,b]中有多少斐波那契数 代码:#include #include #include using namespace std; #define N 10000 #define M 300 char str[N][M]; int cmp(char *a,char *b){ int len1,len2; len1=strlen(a);...
分类:其他好文   时间:2015-08-13 15:58:42    阅读次数:103
简单的一个Queue
不考虑好多东西,算法考试中用得到的Queue #include using namespace std; const int MAX = 100; struct MyQueue {     int data[MAX];     int front;     int rear; }queue={{0},0,0}; int main() {     for(...
分类:其他好文   时间:2015-08-13 15:55:45    阅读次数:114
hdu 1823 Luck and Love
二维线段树,写起来比较繁琐,难度并不大 #include #include #define maxn 222 using namespace std; int h,hh; double a,b; struct stus { int l,r; double max; }; struct stu { int l,r; stus root[1111*4]; }; stu mapp[maxn*4...
分类:其他好文   时间:2015-08-13 15:54:34    阅读次数:104
简单的Stack
自己实现的简单的Stack,没有查空满,用于算法考试 #include using namespace std; const int MAX = 100; struct MyStack { int data[MAX]; int top; }stack={{0},0}; int main() { for(int i = 0;i<10;i++) { stack.data[s...
分类:其他好文   时间:2015-08-13 15:48:29    阅读次数:96
pat 1061. Dating
代码: #include #include #define Min(a,b) ((a)<(b)?(a):(b)) using namespace std; char Day[10][10]; char s[4][100]; int main() { strcpy(Day[1],"MON"); strcpy(Day[2],"TUE"); strcpy(Day[3],"W...
分类:其他好文   时间:2015-08-13 15:46:46    阅读次数:140
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!