#includeusing namespace std;#define Nu 5int main(){ int a[Nu]={1,-2,5,-3,6}; cout<<"随机产生数组为:"; for(int i=0;i<Nu;i++) cout<<a[i]<<" ";...
分类:
编程语言 时间:
2015-04-15 21:24:05
阅读次数:
141
在每个位置讨论一下最大值最小值的取值范围就行 1 #include 2 #include 3 #define maxn 200003 4 using namespace std; 5 typedef long long LL; 6 LL a[maxn],b[maxn]; 7 8 int main(....
分类:
其他好文 时间:
2015-04-15 21:22:22
阅读次数:
129
namespace ConsoleApplication1{ class Program { static void Main(string[] args) { int a = 1; int coun...
分类:
其他好文 时间:
2015-04-15 21:08:54
阅读次数:
83
链接:http://www.spoj.com/problems/LCS/题意两串LCS确实没什么好说的,第一次编嘛。把网上的教程斗翻出来看一遍就好了。另发现,百度内部用户交流使用的图片在百度快照中看得到。#include#include#include#includeusing namespace ...
分类:
其他好文 时间:
2015-04-15 21:06:36
阅读次数:
211
二分Time,S->炮[i]:Time*b[i]炮[i]->机器人[i]:INF机器人[i]->T:a[i]。判断是否满流。#include#include#include#includeusing namespace std;#define N 51#define EPS 0.000001#def...
分类:
其他好文 时间:
2015-04-15 21:05:18
阅读次数:
129
新项目组用到Async & Await, 关于Await会不会新开不开线程,遇到什么情况会新开线程的问题网上查了很多资料都没看到直观的解释。现简单总结一下。直接上代码:namespace ConsoleApplication2{ class Program { static...
分类:
其他好文 时间:
2015-04-15 21:04:43
阅读次数:
115
阅读程序:
#include
using namespace std;
class Time
{
public:
Time(int h,int m,int s):hour(h),minute(m),sec(s) {}
void display1(); //display1是成员函数
friend void display2(Time &); //d...
分类:
其他好文 时间:
2015-04-15 19:45:45
阅读次数:
164
运行代码:
/*
*Copyright (c)2014,烟台大学计算机与控制工程学院
*All rights reserved.
*dood luck
*文件名称:d.cpp
*作 者:张旺华
*完成日期:2015年4月15日
*版 本 号:v1.0
*
*/
//项目6-复数模板类】
//该例实现了一个复数类,但是美中不足的是,复数类的实部和虚部都固定只能是doub...
分类:
其他好文 时间:
2015-04-15 19:43:55
阅读次数:
122
思路很好像,卡了我很久的就是当最大房间一样的时候判断输出哪个的条件, = = 简直无情
/*
ID: 18906421
LANG: C++
PROG: castle
*/
#include
#include
#include
using namespace std;
const int maxn = 55;
int mat[maxn][maxn][2] = {0}; // 0 1 下 右
i...
分类:
其他好文 时间:
2015-04-15 19:40:26
阅读次数:
150
#include
#include
#include
#include
#include
using namespace std;
#define maxn 10000
#define eps 1e-8
struct
{
int w, v;
}a[maxn];
double b[maxn];
int n, k;
bool cmp(double a, double b)
...
分类:
其他好文 时间:
2015-04-15 19:39:16
阅读次数:
122