这题输入 m 个字符串,判断哪些不是 AC,就输出那个数的序号,就是 i,中间用空格分开。
核心代码:
if(res!="AC"){
cout<<i<<' ';
}
AC CODE:
#include <bits/stdc++.h>
using namespace std;
typedef long long LL;
int main(){
int n;
cin>>n;
for(int i=1;i<=n;i++){
string res;
cin>>res;
if(res!="AC"){
cout<<i<<' ';
}
}
return 0;
}