QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#150023#5600. Restaurant OpeningZhangYiDeCompile Error//C++11465b2023-08-25 14:55:142023-08-25 14:55:15

Details

answer.code: In function ‘int main()’:
answer.code:10:16: error: missing template arguments before ‘a’
   10 |         vector a(n,vector<int> (m));
      |                ^
answer.code:14:37: error: ‘a’ was not declared in this scope
   14 |                         scanf("%d",&a[i][j]);
      |                                     ^
answer.code:25:66: error: ‘a’ was not declared in this scope
   25 |                                         ans+=(abs(x-i)+abs(y-j))*a[x][y];
      |                                                                  ^
answer.code:8:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    8 |         scanf("%d%d",&n,&m);
      |         ~~~~~^~~~~~~~~~~~~~