上一页 1 2 3 4 5 6 7 8 9 ··· 31 下一页
摘要: 101两点距离时间限制:3000 ms | 内存限制:65535 KB 难度:1描述 输入两点坐标(X1,Y1),(X2,Y2)(0#include main(){ int N ; float a,b,c,d; double s; scanf("%d\n",&N);... 阅读全文
posted @ 2014-08-13 21:17 2014acm 阅读(173) 评论(0) 推荐(0) 编辑
摘要: 题目242题目信息运行结果本题排行讨论区计算球体积时间限制:3000 ms | 内存限制:65535 KB 难度:1描述 根据输入的半径值,计算球的体积。输入输入数据有多组,每组占一行,每行包括一个实数,表示球的半径。(0#include using namespace std;#define ... 阅读全文
posted @ 2014-08-13 21:15 2014acm 阅读(174) 评论(0) 推荐(0) 编辑
摘要: 在C/C++语言里,&代表取地址或者“位与”运算1、取变量的地址:&变量名,这将获得该变量的地址,例:int a = 1, &p = a。2、进行位与运算,格式是:变量1&变量2,进行计算时,将会把类型提升为int。“位与”运算是“位运算”的一种,运算法则是在二进制数下,相同位的两个数字都为1,则为... 阅读全文
posted @ 2014-08-13 20:02 2014acm 阅读(194) 评论(0) 推荐(0) 编辑
摘要: # include int a[25][1010], vis[25][1010] ;int n, m, INF = 0x0f0f0f0f ;int max(int a, int b){return a>b?a:b;}int dfs(int x, int y){ int i, rtn = -IN... 阅读全文
posted @ 2014-08-13 16:26 2014acm 阅读(126) 评论(0) 推荐(0) 编辑
摘要: #include #include #define N 10005using namespace std;int a[N],b[N],n,maxlen=1;int f( int x){int i,m,t;if ( b[x]>0 ) return b[x];m=1;for (i=0;ia[i]) m=... 阅读全文
posted @ 2014-08-13 15:39 2014acm 阅读(118) 评论(0) 推荐(0) 编辑
摘要: #include #define N 10005using namespace std;int a[N],n,maxlen=1;int f( int x){int i,t,m;if (xa[i]) { m=max(m,t+1); if (m>maxlen) maxlen=m; } } return... 阅读全文
posted @ 2014-08-13 15:38 2014acm 阅读(125) 评论(0) 推荐(0) 编辑
摘要: #include #define N 10005using namespace std;int a[N],n;int f( int x){ int i,t; if (x==0) return 1; //第一个元素 下标为0 for (t=0,i=0;i=a[i]) t... 阅读全文
posted @ 2014-08-13 15:36 2014acm 阅读(336) 评论(0) 推荐(0) 编辑
摘要: #include #define N 15using namespace std;int a[N]={1};void yanghui(int n){int i,j;for(i=0;i=1;j--) a[j]+=a[j-1]; }} int main() { int i,j,n; cin>>n; ya... 阅读全文
posted @ 2014-08-13 11:44 2014acm 阅读(146) 评论(0) 推荐(0) 编辑
摘要: 探索1#include #define N 15using namespace std;int a[N]={1};void yanghui(int n){int i,j;for(i=0;i>n; yanghui(n); return 0;}#include #define N 15using nam... 阅读全文
posted @ 2014-08-13 11:26 2014acm 阅读(208) 评论(0) 推荐(0) 编辑
摘要: #include #define N 15using namespace std;int a[N][N];void yanghui(int n){ int i,j; for(i=0;i>n; yanghui(n); for(i=0;i#define N 15using names... 阅读全文
posted @ 2014-08-13 11:07 2014acm 阅读(191) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 9 ··· 31 下一页