为了能到远方,脚下的每一步都不能少.|
2024-05-17 22:44阅读: 8评论: 0推荐: 0

[题解] P9686 Judg.

一道简单模拟。

这道题最简单的方法就是直接在 for 循环中判断题目给出状态是否为 AC,如果不是则输出当前 i 的值,否则就不输出。

#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1e5 + 10;
int n;
string a[MAXN];
int main()
{
scanf("%d", &n);
for (int i = 1; i <= n; i++)
{
cin >> a[i];
}
for (int i = 1; i <= n; i++)
{
if (a[i] != "AC")
{
printf("%d ", i);
}
}
return 0;
}

本文作者:cq_irritater

本文链接:https://www.cnblogs.com/cq-irritater/p/18198837/solution-luogu-p9686

版权声明:本作品采用知识共享署名-非商业性使用-禁止演绎 2.5 中国大陆许可协议进行许可。

posted @   cq_irritater  阅读(8)  评论(0编辑  收藏  举报
点击右上角即可分享
微信分享提示
评论
收藏
关注
推荐
深色
回顶
收起