Page 1 of 1

11149 - Power of Matrix

Posted: Sat Dec 30, 2006 7:45 pm
by avm
PE issue.
Problem statement said:
Print a blank line after each case.
But there isn't blank line after last case in judge output.

Posted: Sat Dec 30, 2006 7:52 pm
by contest_clarificator
Oh. Is it really so? The judge output file that I sent to UVa has a blank line after the last case. (I still have the file in hand.) Admins please have a look. Thanks.


And I don't mind if the problem description is changed to fit the current judge output, if you think this is more fair.

-- Mak Yan Kei (I set this task)

Posted: Sat Dec 30, 2006 8:03 pm
by little joey
Are you sure?
I print a blank line after every matrix, and get accepted w/o PE.:

Code: Select all

...
typedef struct{
   int _[64][64];
   }t_matrix;
   
int dim;

void print_matrix(t_matrix *m){
   int i,j;
   
   for(i=0;i<dim;i++){
      printf("%d",m->_[i][0]);
      for(j=1;j<dim;j++) printf(" %d",m->_[i][j]);
      printf("\n");
      }
   printf("\n");
   }
 ...

Wrong report

Posted: Sat Dec 30, 2006 11:44 pm
by avm
Sorry, I assume that input ends by two zeroes. But it doesn't.
I post message, because my AC code looks like:

Code: Select all

int main()
{
int t=0;
while(2==scanf("%d%d",&N,&k))
  {
  if (!N && !k) break;
  if(t++) puts("");
  Test();
  }
return 0;
}

Posted: Sun Dec 31, 2006 1:18 pm
by Carlos
The problem description says:
Input is terminated by a case where n = 0. This case need NOT be processed.
Your input checks for both n and k to be 0, so it's not completely right. Both input and output look ok.