//BindingFlags.NonPublic | BindingFlags.Instance标志枚举,用于访问私有成员namespace 通过反射访问私有成员{ class Program { static void Main(string[] args) ...
分类:
其他好文 时间:
2015-08-13 17:37:58
阅读次数:
83
确定比赛名次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
#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
#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
#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
链接:点击打开链接
题意:问区间[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
#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
二维线段树,写起来比较繁琐,难度并不大
#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,没有查空满,用于算法考试
#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
代码:
#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