QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#608634#411. Dangerous Skating3un_larryfuncCompile Error//C++172.2kb2024-10-04 00:13:352024-10-04 00:13:37

Details

answer.code:71:17: error: expected declaration before ‘}’ token
   71 |                 }
      |                 ^
answer.code:72:9: error: expected declaration before ‘}’ token
   72 |         }
      |         ^
answer.code:2:20: error: expected unqualified-id before ‘for’
    2 | #define rep(i,a,b) for(int i=(a);i<=(b);i++)
      |                    ^~~
answer.code:73:9: note: in expansion of macro ‘rep’
   73 |         rep(i,1,n) rep(j,1,m) if(id[i][j]) {
      |         ^~~
answer.code:73:13: error: ‘i’ does not name a type; did you mean ‘vi’?
   73 |         rep(i,1,n) rep(j,1,m) if(id[i][j]) {
      |             ^
answer.code:2:34: note: in definition of macro ‘rep’
    2 | #define rep(i,a,b) for(int i=(a);i<=(b);i++)
      |                                  ^
answer.code:73:13: error: ‘i’ does not name a type; did you mean ‘vi’?
   73 |         rep(i,1,n) rep(j,1,m) if(id[i][j]) {
      |             ^
answer.code:2:41: note: in definition of macro ‘rep’
    2 | #define rep(i,a,b) for(int i=(a);i<=(b);i++)
      |                                         ^
answer.code:73:24: error: ‘j’ does not name a type
   73 |         rep(i,1,n) rep(j,1,m) if(id[i][j]) {
      |                        ^
answer.code:2:34: note: in definition of macro ‘rep’
    2 | #define rep(i,a,b) for(int i=(a);i<=(b);i++)
      |                                  ^
answer.code:73:24: error: ‘j’ does not name a type
   73 |         rep(i,1,n) rep(j,1,m) if(id[i][j]) {
      |                        ^
answer.code:2:41: note: in definition of macro ‘rep’
    2 | #define rep(i,a,b) for(int i=(a);i<=(b);i++)
      |                                         ^
answer.code:80:9: error: expected unqualified-id before ‘if’
   80 |         if(!id[sx][sy]||!id[tx][ty]) return puts("-1"), 0;
      |         ^~
answer.code:82:9: error: expected unqualified-id before ‘if’
   82 |         if(res==inf) puts("-1"); else printf("%d\n",res);
      |         ^~
answer.code:82:34: error: expected unqualified-id before ‘else’
   82 |         if(res==inf) puts("-1"); else printf("%d\n",res);
      |                                  ^~~~
answer.code:83:9: error: expected unqualified-id before ‘return’
   83 |         return 0;
      |         ^~~~~~
answer.code:84:1: error: expected declaration before ‘}’ token
   84 | }*/
      | ^
answer.code:84:3: error: expected unqualified-id before ‘/’ token
   84 | }*/
      |   ^
answer.code: In function ‘int main()’:
answer.code:44:25: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   44 |         rep(i,1,n) scanf("%s",s[i]+1);
      |                    ~~~~~^~~~~~~~~~~~~