#include #include #include #include using namespace std;using boost::asio::ip::tcp;const char* serviceList = "\n\t Services\n" "\t*******************....
分类:
其他好文 时间:
2015-04-12 22:29:02
阅读次数:
183
namespace 函数冒泡排序{ class Program { static void Main(string[] args) { int[] b = new int[5] { 1,5,3,4,2}; new Program().Array(b); //数组b调用已经写好的Array函数用来排....
分类:
编程语言 时间:
2015-04-12 22:26:02
阅读次数:
158
在C++中,经常会看到别人有int ans=12 using namespace std;3 int main()4 {5 int a = 1 << 4;6 cout << a << endl;7 return 0;8 }
分类:
编程语言 时间:
2015-04-12 22:25:23
阅读次数:
187
假设数字1~i-1已经全部归位,则第i到第n个数为无序区间。如果i在无序区间的前半段,那么直接将i换到第i个位置上。否则先将i换到无序区间的前半段,再将i归位。这样每个数最多操作两次即可归位。 1 #include 2 using namespace std; 3 4 const int max.....
分类:
编程语言 时间:
2015-04-12 21:02:46
阅读次数:
248
结构体练习--自做对战练习using System;using System.Collections;using System.Collections.Generic;using System.Text;namespace 对战练习{ class Program { str...
分类:
其他好文 时间:
2015-04-12 20:59:59
阅读次数:
190
1 #include 2 using namespace std; 3 4 int main() 5 { 6 int *p,val=24; 7 p=&val; 8 cout<<*p<<endl; 9 *p=42;10 cout<<val<<endl;11...
分类:
其他好文 时间:
2015-04-12 20:50:22
阅读次数:
110
【题目链接】click here~~
【题目大意】求多个圆与线段相交的部分占整个线段的百分比。
【解题思路】
求出符合要求的交线段,排序一遍圆心。最后求并。
代码:
#include
#define max(a,b) ((a)>(b)?(a):(b))
using namespace std;
struct node
{
double x,y,l,r;
} Map[10...
分类:
其他好文 时间:
2015-04-12 19:26:15
阅读次数:
142
将其java代码转化为Cpp 代码。#include #include using namespace std;void func1(){ cout > numberA; cout > operate; cout > numberB; switch (operate) { case'+': cou....
分类:
其他好文 时间:
2015-04-12 19:05:37
阅读次数:
123
#include
using namespace std;
void find(int A[],int length)
{
int times=0;
int i=0;
int temp;
for(;i
{
if(times==0)
{
temp=A[i];
times=1;
}
else
{
if(A[i]==temp)
times++;
else
times...
分类:
编程语言 时间:
2015-04-12 17:48:53
阅读次数:
125
感觉这题挺水的,dfs 6000ms过
#include
#include
#define maxn 1000+5
using namespace std;
int n,m;
int mapp[maxn][maxn];
int visit[maxn][maxn];
int dir[4][2]={{0,1},{1,0},{0,-1},{-1,0}};
int sx,sy,ex,ey;
int fl...
分类:
其他好文 时间:
2015-04-12 16:18:20
阅读次数:
136