QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#124357#5501. Ctrl+C Ctrl+Vftt2333Compile Error//C++23156b2023-07-14 17:10:032023-07-14 17:10:05

Judging History

你现在查看的是最新测评结果

  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2023-07-14 17:10:05]
  • 评测
  • [2023-07-14 17:10:03]
  • 提交

answer

#import<iostream>
using namespace std;string s;int t,a,i;main(){for(cin>>t;t--;cout<<a<<'\n',a=i=0)for(cin>>s;i<size(s);a+=s.substr(i++,4)=="ania"&&i+=3);}

詳細信息

answer.code:1:2: warning: #import is a deprecated GCC extension [-Wdeprecated]
    1 | #import<iostream>
      |  ^~~~~~
answer.code:2:40: warning: ISO C++ forbids declaration of ‘main’ with no type [-Wreturn-type]
    2 | using namespace std;string s;int t,a,i;main(){for(cin>>t;t--;cout<<a<<'\n',a=i=0)for(cin>>s;i<size(s);a+=s.substr(i++,4)=="ania"&&i+=3);}
      |                                        ^~~~
answer.code: In function ‘int main()’:
answer.code:2:129: error: lvalue required as left operand of assignment
    2 | using namespace std;string s;int t,a,i;main(){for(cin>>t;t--;cout<<a<<'\n',a=i=0)for(cin>>s;i<size(s);a+=s.substr(i++,4)=="ania"&&i+=3);}
      |                                                                                                          ~~~~~~~~~~~~~~~~~~~~~~~^~~