結果

問題 No.3644 Division by Shitoshitoto Sequence
コンテスト
ユーザー Jupiter17
提出日時 2026-08-25 17:02:45
言語 C++23(gcc16)
(gcc 16.1.0 + boost 1.90.0)
コンパイル:
g++-16 -O2 -lm -std=c++23 -Wuninitialized -DONLINE_JUDGE -o a.out _filename_
実行:
./a.out
結果
AC  
実行時間 163 ms / 2,000 ms
+ 130µs
コード長 447 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 5,169 ms
コンパイル使用メモリ 350,312 KB
実行使用メモリ 6,272 KB
最終ジャッジ日時 2026-08-25 17:02:59
合計ジャッジ時間 9,084 ms
ジャッジサーバーID
(参考情報)
judge3_0 / judge1_0
このコードへのチャレンジ
(要ログイン)
サブタスク 配点 結果
サンプル 0 % AC * 1
小課題1 10 % AC * 3
小課題2 20 % AC * 2
小課題3 70 % AC * 21
合計 100 点
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#include <bits/stdc++.h>
using namespace std;
using ll = long long;
bool solve() {
	int a;
	cin >> a;
	bool cat = true;
	for (int i = 0; i < a; i++) {
	  string x1, x2, x3, x4, x5;
	  cin >>x1>>x2>>x3>>x4>>x5;
	  if (x1==x3 && x2==x4 && x4==x5 && x1!=x2) {
	    continue;
	  }
	  else {
	    cat = false;
	  }
	}
	return cat;
}
int main() {
	int t;
	cin >> t;
	while (t--) {
		if (solve()) cout << "Yes" << endl;
		else cout << "No" << endl;
	}
}
0