結果
問題 | No.2535 多重同値 |
ユーザー |
![]() |
提出日時 | 2023-11-24 11:47:29 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 147 ms / 2,000 ms |
コード長 | 537 bytes |
コンパイル時間 | 2,097 ms |
コンパイル使用メモリ | 195,800 KB |
最終ジャッジ日時 | 2025-02-17 23:35:54 |
ジャッジサーバーID (参考情報) |
judge5 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 20 |
ソースコード
#include <bits/stdc++.h>using namespace std;void fast_io() {ios::sync_with_stdio(false);std::cin.tie(nullptr);}int main() {fast_io();int n;cin >> n;vector<bool> p(n);for (int i = 0; i < n; i++) {string s;cin >> s;p[i] = (s == "Yes");}vector<bool> cum(n);cum[0] = p[0];for (int i = 1; i < n; i++) {cum[i] = (cum[i - 1] == p[i]);}for (int i = 0; i < n; i++) {cout << (cum[i] ? "Yes" : "No") << endl;}return 0;}