結果

問題 No.2063 ±2^k operations (easy)
ユーザー slowly_cplusplu
提出日時 2022-09-06 01:28:42
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 307 bytes
コンパイル時間 1,411 ms
コンパイル使用メモリ 167,556 KB
実行使用メモリ 6,820 KB
最終ジャッジ日時 2024-11-21 02:24:45
合計ジャッジ時間 2,366 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 14 WA * 7
権限があれば一括ダウンロードができます

ソースコード

diff #

#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;
  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;
}
0