Dream_Coder10's blog

By Dream_Coder10, history, 9 months ago, In English

(https://codeforces.com/contest/1360/submission/90406376)

In this submission "char a[60][60]" written before "int main()" and for two dimensional character array inpute taken in one dimensionally...

I wrote char a [60][60] inside "int main()" & took input in two dimensionally "cin>> a[i][j]" , I did not get any errors in my compiler(codeblocks) but Codeforces Showed me judgemental error..... But after submitting the above code,it has accepted!!!....

Can anyone explain me why this has happened?

 
 
 
 
  • Vote: I like it
  • +9
  • Vote: I do not like it

»
9 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Auto comment: topic has been updated by Dream_Coder10 (previous revision, new revision, compare).

»
9 months ago, # |
  Vote: I like it -9 Vote: I do not like it

The array must be a[n][n + 1]. One place required for the null terminator for C-type strings.

»
9 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Learn about C-style strings.

»
4 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Auto comment: topic has been updated by Dream_Coder10 (previous revision, new revision, compare).