QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#335539#2921. Land EqualityZhangYiDeCompile Error//C++201.2kb2024-02-23 15:52:222024-02-23 15:52:23

Details

answer.code: In function ‘int main()’:
answer.code:23:13: error: ‘ones’ was not declared in this scope
   23 |             ones++;
      |             ^~~~
answer.code:30:12: error: expected ‘(’ before ‘freeones’
   30 |         if freeones>0{
      |            ^~~~~~~~
      |            (
answer.code:33:10: error: expected ‘}’ before ‘else’
   33 |         }else{
      |          ^~~~
answer.code:29:41: note: to match this ‘{’
   29 |     if((columns==1||rows==1)&&zeroes==1){
      |                                         ^
answer.code:38:6: error: ‘else’ without a previous ‘if’
   38 |     }else if(zeroes==0){
      |      ^~~~
answer.code:49:12: error: ‘ones’ was not declared in this scope
   49 |         if(ones>0){
      |            ^~~~
answer.code:7:10: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    7 |     scanf("%d",&rows);
      |     ~~~~~^~~~~~~~~~~~
answer.code:8:10: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    8 |     scanf("%d",&columns);
      |     ~~~~~^~~~~~~~~~~~~~~
answer.code:15:18: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   15 |             scanf("%d",&curr_num);
      |             ~~~~~^~~~~~~~~~~~~~~~