QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#794300#5418. Color the Treeucup-team1135#Compile Error//C++201.4kb2024-11-30 13:29:242024-11-30 13:29:26

Details

answer.code: In function ‘int main()’:
answer.code:41:17: error: ‘t’ was not declared in this scope
   41 |     scanf("%d",&t);
      |                 ^
answer.code:55:9: error: ‘ll’ was not declared in this scope; did you mean ‘l’?
   55 |         ll ans=0;
      |         ^~
      |         l
answer.code:57:16: error: incompatible types in assignment of ‘int’ to ‘int [1000010]’
   57 |             ans+=dp[i];
      |             ~~~^~~~~~~
answer.code:59:20: warning: format ‘%lld’ expects argument of type ‘long long int’, but argument 2 has type ‘int*’ [-Wformat=]
   59 |         printf("%lld\n",ans);
      |                 ~~~^    ~~~
      |                    |    |
      |                    |    int*
      |                    long long int
      |                 %n
answer.code:43:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   43 |         scanf("%d",&n);
      |         ~~~~~^~~~~~~~~
answer.code:45:18: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   45 |             scanf("%d",&a[i]);
      |             ~~~~~^~~~~~~~~~~~
answer.code:50:18: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   50 |             scanf("%d%d",&u,&v);
      |             ~~~~~^~~~~~~~~~~~~~