Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
我 n*n*n OLE,想到一个 n*n*2 做法就AC了In Reply To:why OLE? for the tailing new line??? Posted by:qiqilrq at 2008-04-04 11:31:13 > > char unb[50][50][50]; > int n; > > char get_ch(int x) > { > if(x<26) return x+'a'; > x-=26; return x+'A'; > } > > int main(){ > scanf("%d",&n); > > int i,j,k; > for(i=0;i<n;i++) > memset(unb[i], get_ch(i), sizeof(unb[0])); > for(i=0;i<n;i++){ > char ch=get_ch(i); > for(k=0;k<n;k++) > unb[k][i][i]=ch; > } > printf("%d 50 50\n",n); > for(i=0;i<n;i++){ > for(j=0;j<50;j++, puts("")){ > for(k=0;k<50;k++) > putchar(unb[i][j][k]); > } > puts(""); > } > } Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator