結果
問題 | No.2063 ±2^k operations (easy) |
ユーザー |
![]() |
提出日時 | 2022-09-06 01:30:24 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 4 ms / 2,000 ms |
コード長 | 317 bytes |
コンパイル時間 | 1,545 ms |
コンパイル使用メモリ | 166,400 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-21 02:25:40 |
合計ジャッジ時間 | 2,203 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 21 |
ソースコード
#include<bits/stdc++.h>using namespace std;#define rep(i,n)for(int i=0;i<(int)(n);i++)using ll=long long;int main(){string s;cin>>s;s+="0";int c=0;int ans=0;rep(i,s.size()){if(s[i]=='1')c++;if(s[i]=='0')ans+=(c>2?2:c),c=0;}if(ans==2)cout<<"Yes"<<endl;else cout<<"No"<<endl;}