ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1313. Some Words about Sport

WA on test #3 C Help me
Posted by Ahmet Terzi(Ottoman)Devlet-i Âli Osman 31 Aug 2012 19:45
what's wrong in my code?
Here is my code:
#include <stdio.h>

main()
{
      int x[100][100],a,i,j;
      scanf("%d",&a);
      for( i = 0 ; i < a ; i++ )
           for( j = 0 ; j < a ; j++ )
                scanf("%d",&x[i][j]);
      for( i = 0 ; i < a ; i++ )
           for( j = 0 ; j <= i ; j++ )
                printf("%d ",x[i-j][j]);
      for( i = a ; i < 2 * a - 1 ; i++ )
           for( j = a - 1 ; j >= i - 3 ; j-- )
                printf("%d ",x[j][i-j]);
      return 0;
}

Edited by author 31.08.2012 20:24