QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#751341#9565. Birthday Giftucup-team2454#Compile Error//C++20837b2024-11-15 18:13:092024-11-15 18:13:10

详细

answer.code:2:8: error: ‘N’ was not declared in this scope
    2 | char s[N];
      |        ^
answer.code:3:7: error: ‘N’ was not declared in this scope
    3 | int f[N][2];
      |       ^
answer.code: In function ‘int main()’:
answer.code:6:5: error: ‘cin’ was not declared in this scope
    6 |     cin>>T;
      |     ^~~
answer.code:8:21: error: ‘s’ was not declared in this scope
    8 |         scanf("%s",(s+1));
      |                     ^
answer.code:8:9: error: ‘scanf’ was not declared in this scope
    8 |         scanf("%s",(s+1));
      |         ^~~~~
answer.code:9:15: error: ‘strlen’ was not declared in this scope
    9 |         int n=strlen(s+1);
      |               ^~~~~~
answer.code:1:1: note: ‘strlen’ is defined in header ‘<cstring>’; did you forget to ‘#include <cstring>’?
  +++ |+#include <cstring>
    1 | 
answer.code:10:9: error: ‘f’ was not declared in this scope
   10 |         f[0][0]=f[0][1]=0;
      |         ^
answer.code:14:25: error: ‘min’ was not declared in this scope; did you mean ‘main’?
   14 |                 f[i][1]=min(f[i][1],f[i-1][0]+1);
      |                         ^~~
      |                         main
answer.code:21:25: error: ‘min’ was not declared in this scope; did you mean ‘main’?
   21 |                 f[i][0]=min(f[i][0],f[i-1][1]+1);
      |                         ^~~
      |                         main
answer.code:28:9: error: ‘cout’ was not declared in this scope
   28 |         cout<<min(f[n][0],f[n][1])<<"\n";
      |         ^~~~
answer.code:28:15: error: ‘min’ was not declared in this scope; did you mean ‘main’?
   28 |         cout<<min(f[n][0],f[n][1])<<"\n";
      |               ^~~
      |               main