Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

我的RE啊,请大牛指点~~~

Posted by hdoi at 2010-03-13 16:49:44
#include <iostream>
using namespace std;
#define N 10
#define M 100
int main(){
int numseq[M][M];
int test[N+1];
int t=0;
while(cin>>test[t++]&&t<=test[0]);
for(int i=0;i<M;i++){
for(int j=0;j<=i;j++)
numseq[i][j]=j+1;
}
int row=0,col=0;
int k=1;
int l=1;
while(l<=test[0]){
while(k<test[l]){
if(col<row) col++;
else{row++;col=0;}
k++;
}
cout<<numseq[row][col]<<endl;
l++;
}
return 0;
}

Followed by:

Post your reply here:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator