結果
| 問題 |
No.2063 ±2^k operations (easy)
|
| コンテスト | |
| ユーザー |
mamenta
|
| 提出日時 | 2022-09-02 21:43:42 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 434 bytes |
| コンパイル時間 | 645 ms |
| コンパイル使用メモリ | 74,952 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2024-11-16 02:55:02 |
| 合計ジャッジ時間 | 1,204 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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||cnt==0){
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