QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#485076#7691. B Road BandZhaoZiLongCompile Error//C++201.1kb2024-07-20 11:28:162024-07-20 11:28:17

Details

answer.code: In function ‘void solve()’:
answer.code:7:19: error: expected primary-expression before ‘for’
    7 | #define up(i,a,b) for(int i=(a);i<=(b);++i)
      |                   ^~~
answer.code:25:5: note: in expansion of macro ‘up’
   25 |     up(i,1,m)
      |     ^~
answer.code:24:38: error: expected ‘:’ before ‘for’
   24 |     scanf("%d %d %d %d",&m,&n,&k,&s)?
      |                                      ^
      |                                      :
answer.code:7:19: error: expected primary-expression before ‘for’
    7 | #define up(i,a,b) for(int i=(a);i<=(b);++i)
      |                   ^~~
answer.code:25:5: note: in expansion of macro ‘up’
   25 |     up(i,1,m)
      |     ^~
answer.code:25:8: error: ‘i’ was not declared in this scope
   25 |     up(i,1,m)
      |        ^
answer.code:7:33: note: in definition of macro ‘up’
    7 | #define up(i,a,b) for(int i=(a);i<=(b);++i)
      |                                 ^
answer.code:28:10: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   28 |     scanf("%lf",&a[i]);
      |     ~~~~~^~~~~~~~~~~~~