結果

問題 No.2535 多重同値
ユーザー Today03
提出日時 2023-11-10 22:04:17
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 20 ms / 2,000 ms
コード長 328 bytes
コンパイル時間 2,023 ms
コンパイル使用メモリ 195,092 KB
最終ジャッジ日時 2025-02-17 20:48:49
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 20
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;

int main() {
	int N;
	cin >> N;
	vector<bool> P(N);
	for (int i = 0; i < N; i++) {
		string s;
		cin >> s;
		P[i] = s == "Yes";
	}
	bool now = true;
	for (int i = 0; i < N; i++) {
		if (now == P[i]) {
			cout << "Yes\n";
		} else {
			cout << "No\n";
		}
		now = now == P[i];
	}
}
0