結果
問題 |
No.2063 ±2^k operations (easy)
|
ユーザー |
|
提出日時 | 2022-09-02 22:29:24 |
言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 552 bytes |
コンパイル時間 | 5,401 ms |
コンパイル使用メモリ | 319,256 KB |
実行使用メモリ | 6,824 KB |
最終ジャッジ日時 | 2024-11-16 04:29:31 |
合計ジャッジ時間 | 4,584 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 18 WA * 3 |
ソースコード
#include <bits/extc++.h> #define rep(i, n) for (int i = 0; i < (n); ++i) using namespace std; using ll = long long; int main() { string s; cin >> s; int cnt = 0; for (char c : s) { if (c == '1') cnt++; } if (cnt == 2) { puts("Yes"); return 0; } int n = s.size(); vector<int> pos; rep(i, n) { if (s[i] == '0') { pos.push_back(i); } } vector<int> a{n-2, n-1}; if (pos == a) puts("Yes"); else puts("No"); return 0; }