結果
| 問題 | No.3823 Make 1 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2026-11-19 22:15:17 |
| 言語 | C++23(gcc16) (gcc 16.2.0 + boost 1.92.0 + ACL) |
| 結果 |
WA
不安定
|
| 実行時間 | - |
| コード長 | 876 bytes |
| 記録 | |
| コンパイル時間 | 2,624 ms |
| コンパイル使用メモリ | 359,600 KB |
| 実行使用メモリ | 9,904 KB |
| 最終ジャッジ日時 | 2026-11-22 12:44:08 |
| 合計ジャッジ時間 | 4,348 ms |
|
ジャッジサーバーID (参考情報) |
judge5_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 8 WA * 5 |
ソースコード
// zeta_WA00.cpp
#include <bits/stdc++.h>
#pragma GCC target("avx2")
#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")
using namespace std;
using ll = long long;
const ll mod = 998244353;
#define fi first
#define se second
#define rep(i,n) for(ll i=0;i<n;i++)
#define all(x) x.begin(),x.end()
#define faster ios::sync_with_stdio(false);cin.tie(nullptr)
int main() {
ll T;
cin >> T;
while(T--){
ll N;
cin >> N;
string s;
cin >> s;
ll cnt=0;
bool flag=false;
rep(i,N){
if(s[i]=='0') cnt+=2;
if(s[i]=='1') cnt+=1;
if(i!=N-1){
if(s[i]==s[i+1]) flag=true;
}
}
if(N==1) flag=true;
if(cnt%3==1){
cout << "Yes" << endl;
}else{
cout << "No" << endl;
}
}
return 0;
}