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

水过~~贴贴更健康……贱笑了^。^

Posted by wsj19911101 at 2010-11-25 01:10:18 on Problem 3173
#include<iostream>
using namespace std;
int main()
{
	int n,m;
    cin>>n>>m;
    int x=1;
    m--;
    while(x<=n)
    {
		m=(m+x-1)%9+1;
	    int a=m;
	    for(int i=x;i<n;i++){cout<<a<<' ';a=(a-1+i)%9+1;}
	    cout<<a<<endl;
	    int y=x*2;
	    if(x!=n)for(int j=1;j<=y;j++)cout<<" ";
	    x++;
    }
}

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