結果
| 問題 | No.2063 ±2^k operations (easy) |
| コンテスト | |
| ユーザー |
mamenta
|
| 提出日時 | 2022-09-02 21:41:44 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 426 bytes |
| コンパイル時間 | 765 ms |
| コンパイル使用メモリ | 74,816 KB |
| 実行使用メモリ | 6,824 KB |
| 最終ジャッジ日時 | 2024-11-16 02:51:23 |
| 合計ジャッジ時間 | 1,595 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 20 WA * 1 |
ソースコード
#include<iostream>
#include<vector>
#include<map>
#include<algorithm>
#define ll long long
using 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){
cout<<"No"<<endl;
return 0;
}
ll i=0,cc=0;
while(i<len-1&&s[i]!='0'){
++cc;
++i;
}
if(cc==cnt){
cout<<"Yes"<<endl;
return 0;
}
cout<<"No"<<endl;
}
mamenta