結果
| 問題 |
No.2343 (l+r)/2
|
| コンテスト | |
| ユーザー |
yosupot
|
| 提出日時 | 2023-07-01 02:34:02 |
| 言語 | D (dmd 2.109.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 383 bytes |
| コンパイル時間 | 8,896 ms |
| コンパイル使用メモリ | 301,852 KB |
| 実行使用メモリ | 6,948 KB |
| 最終ジャッジ日時 | 2024-07-07 13:48:22 |
| 合計ジャッジ時間 | 10,323 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 7 WA * 7 |
ソースコード
import std.stdio, std.string, std.regex, std.conv;
void solve() {
int n = to!int(readln.strip);
string s = readln.strip.split.join;
auto r = regex(r"^(0+1+|1+0+)*$");
if (s.matchFirst(r)) {
writeln("Yes");
} else {
writeln("No");
}
}
void main() {
int t = to!int(readln.strip);
foreach (i; 0..t) {
solve();
}
}
yosupot