結果
問題 | No.2063 ±2^k operations (easy) |
ユーザー |
![]() |
提出日時 | 2022-09-02 22:21:53 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 4 ms / 2,000 ms |
コード長 | 456 bytes |
コンパイル時間 | 746 ms |
コンパイル使用メモリ | 75,104 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-11-16 04:13:19 |
合計ジャッジ時間 | 1,524 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 21 |
ソースコード
#include<iostream>#include<vector>#include<map>#include<algorithm>#define ll long longusing namespace std;int main(){string s;cin>>s;ll len=s.size();ll cnt=count(s.begin(),s.end(),'1');if(cnt==2){cout<<"Yes"<<endl;return 0;}if(cnt==1||cnt==0){cout<<"No"<<endl;return 0;}ll i=0;while(i<len&&s[i]=='1'){++i;}//cout<<cc<<" "<<i<<" "<<s[0]<<endl;if(i==cnt){cout<<"Yes"<<endl;return 0;}cout<<"No"<<endl;}