QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#500595#6728. To the ParkHuangHanShengCompile Error//C++111.1kb2024-08-01 15:54:482024-08-01 15:54:49

Details

answer.code: In function ‘void solve()’:
answer.code:11:17: error: ‘n’ was not declared in this scope; did you mean ‘yn’?
   11 |     scanf("%d",&n);
      |                 ^
      |                 yn
answer.code:27:14: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘std::vector<std::pair<int, int> >::size_type’ {aka ‘long unsigned int’} [-Wformat=]
   27 |     printf("%d",ans.size());
      |             ~^  ~~~~~~~~~~
      |              |          |
      |              int        std::vector<std::pair<int, int> >::size_type {aka long unsigned int}
      |             %ld
answer.code:28:9: error: ‘PII’ was not declared in this scope
   28 |     for(PII p : ans) printf(" %d %d",p.first,p.second);
      |         ^~~
answer.code:30:1: error: expected primary-expression before ‘}’ token
   30 | }
      | ^
answer.code:29:18: error: expected ‘)’ before ‘}’ token
   29 |     printf("\n");
      |                  ^
      |                  )
   30 | }
      | ~                 
answer.code:28:8: note: to match this ‘(’
   28 |     for(PII p : ans) printf(" %d %d",p.first,p.second);
      |        ^
answer.code:30:1: error: expected primary-expression before ‘}’ token
   30 | }
      | ^
answer.code: In function ‘int main()’:
answer.code:35:5: error: ‘m’ was not declared in this scope; did you mean ‘tm’?
   35 |     m=sqrt(maxn);
      |     ^
      |     tm