1 #include 2 using namespace std; 3 int main() 4 { 5 int a[10],min,i,xb; 6 cout>a[i]; 9 min=a[0];10 xb=0;11 for(i=0;i<10;i++)12 {13 if(a[i]<m...
分类:
编程语言 时间:
2015-05-12 13:09:52
阅读次数:
108
1 /* 第一个C语言程序2 打印 Hello, world */3 #include //包含头文件stdio.h4 int main(){ // 主函数5 printf("Hello, word\n"); // 打印字符串6 return 0; // 返回0,表示程序正确...
分类:
编程语言 时间:
2015-05-12 13:07:44
阅读次数:
140
思路:若能给对方留下m+1,就可以胜。否则败。 1 #include 2 using namespace std; 3 int main() 4 { 5 int t,n,m;cin>>t; 6 while(t--) 7 { 8 cin>>n>>m; 9 ...
分类:
其他好文 时间:
2015-05-12 13:05:44
阅读次数:
90
思路:简单Nim博弈,只需要将所给的数字全部进行异或,结果为0,则先手必败。否则必胜。知道方法的人1分钟写完代码,不知道的人研究几小时都难写。 1 #include 2 using namespace std; 3 int main() 4 { 5 //freopen("input.txt...
分类:
其他好文 时间:
2015-05-12 13:01:04
阅读次数:
101
#include #include #include #include "destory_free_while.h"using namespace std;Worker::Worker() { shutdown = false; num_thread = 10;}void Worker:...
分类:
编程语言 时间:
2015-05-12 12:57:06
阅读次数:
153
#include
using namespace std;
#define INF 0x7ffffff
#define maxn 100000
struct Edge
{
int from, to, cap, flow;
Edge(int u, int v, int c, int f):from(u), to(v), cap(c), flow(f){}
};
int n, ...
分类:
其他好文 时间:
2015-05-12 11:32:19
阅读次数:
89
这道题 也就是大数除或者求模小数,不过听说java处理大数很方便,可是java学的一塌糊涂。。有心人用java做吧
奉上c语言代码:
#include
#include
int main()
{
char a[1000],c[1000],ch;
int b,i,j,r;
while(scanf("%s %c %d",a,&ch,&b)!=EOF)//a是存贮大数,c...
分类:
其他好文 时间:
2015-05-12 11:28:18
阅读次数:
173
题目:
将数组中偶数从大到小排序,奇数从小到大排序,奇数和偶数交叉着放且输出数组第一位放奇数 若奇数和偶数不等长,则把剩下的直接放到数组中。
#include
#include
#define len 11
using namespace std;
int cmp(const void *p,const void *q)
{
return *(int *)p-*(int *)q;...
分类:
编程语言 时间:
2015-05-12 11:26:49
阅读次数:
125
#include using namespace std;#define N 100int g_array[N]; //存放输入的数字static int count; //存放元素的个数// 初始化函数void Initial(){ cout > count; cout > g_array[i];...
分类:
编程语言 时间:
2015-05-12 11:16:57
阅读次数:
133
给定一张带权有向图,要求从顶点0出发,经过每个结点恰好一次后再返回0,求边权和的最小值。2#include#includeusing namespace std;#define N 16#define INF 214748364#define M 250int n,m;int v[M>v[i]&1)...
分类:
其他好文 时间:
2015-05-12 11:15:04
阅读次数:
159