#includeusing namespace std;int main(){int
n,m,i,j,k,o,u,p,a[100][100],x[100][100],max[100][100][20],b[100][100];cout>n>>m;cout>a[i][j];}}for(k=1;k=ma...
分类:
其他好文 时间:
2014-05-23 02:51:18
阅读次数:
227
#includeusing namespace std;int main(){int
n,m,i,j,x[100],a[100],p;cout>n>>m;for(i=1;in){j=(x[i-1]+1)%n;}else{j=x[i-1]+1;}p=1;do{if(a[j]!=0){j++;if(j>...
分类:
其他好文 时间:
2014-05-23 02:47:17
阅读次数:
211
std::string转NSString
std::string _string("hello");NSString *str= [NSString stringWithCString:_string.c_str() encoding:[NSString defaultCStringEncoding]];
NSString转std::string
NSString * ...
分类:
其他好文 时间:
2014-05-23 02:24:50
阅读次数:
201
题目链接:hdu 4826 Labyrinth
题目大意:中文题。
解题思路:不难想的递推,dp[i][j][0]从上面过来的情况,dp[i][j][1]从下面过来的情况,然后这两种情况都可以从前一列走过来。
#include
#include
#include
using namespace std;
const int N = 105;
const int INF = 0...
分类:
其他好文 时间:
2014-05-22 22:42:28
阅读次数:
350
#include
using namespace std;
class Salary//工资类
{
public:
void set_salarys( );//设置工资
void add_salarys(int x);//增加工资
void sort_salarys();//根据工资由大到小排序
void show_salarys( );//显示工人...
分类:
其他好文 时间:
2014-05-22 17:33:38
阅读次数:
312
#include
#include
#include
#include
#include
using namespace std;
//void welcome();//欢迎界面
void display(int);//输出信息
int size=0;
class Product
{
public:
void addProduct();
void queryById();...
分类:
其他好文 时间:
2014-05-22 17:00:21
阅读次数:
250
方法1:使用带参数构造函数,即Triangle(double x, double y, double z),三边长在调用时由实参直接给出#include
#include
using namespace std;
class Triangle
{
public:
//带参构造函数
Triangle(double x, double y, double z);
double peri...
分类:
其他好文 时间:
2014-05-22 16:59:45
阅读次数:
169
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#include
#include
using namespace std;
int main()
{
...
分类:
其他好文 时间:
2014-05-22 16:57:45
阅读次数:
202
1 #include 2 3 4 using namespace std; 5 6 #define
MAX 255 7 8 typedef unsigned char BYTE; 9 10 typedef BYTE String[MAX+1]; 11 12
bo...
分类:
其他好文 时间:
2014-05-22 15:10:06
阅读次数:
278
1 #include 2 3 4 using namespace std; 5 6 void
Repeat(int* a,int Left,int Right); 7 int QuickSort(int* a,int Left,int Right); 8
9 10 void main()1...
分类:
其他好文 时间:
2014-05-22 14:53:10
阅读次数:
224