跳到正文

题解

[题解] P9686 Judg.

cirrationaler约 1 分钟
原文
文章信息与版本

文章信息

发布
2023年10月2日
收录
2025年12月12日
更新
2026年11月13日
篇幅
约 1 分钟
获赞
2
题目
P9686

版本

  1. v1当前

一道简单模拟。

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

C++
#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;
}
原文