QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#202984#7406. Longest Lyndon PrefixMaMengQiCompile Error//C++201.1kb2023-10-06 14:27:242023-10-06 14:27:25

Details

answer.code:19:9: error: ISO C++ forbids declaration of ‘init’ with no type [-fpermissive]
   19 |         init(){
      |         ^~~~
answer.code: In member function ‘int Has::init()’:
answer.code:23:9: warning: no return statement in function returning non-void [-Wreturn-type]
   23 |         }
      |         ^
answer.code: In function ‘void solve()’:
answer.code:40:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   40 |         scanf("%d",&n);
      |         ~~~~~^~~~~~~~~
answer.code:41:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   41 |         scanf("%s",s+1);
      |         ~~~~~^~~~~~~~~~
answer.code: In function ‘int main()’:
answer.code:64:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   64 |         scanf("%d",&T);
      |         ~~~~~^~~~~~~~~