結果
問題 |
No.509 塗りつぶしツール
|
ユーザー |
![]() |
提出日時 | 2020-03-17 22:36:04 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 72 ms / 2,000 ms |
コード長 | 403 bytes |
コンパイル時間 | 2,094 ms |
コンパイル使用メモリ | 193,964 KB |
最終ジャッジ日時 | 2025-01-09 07:34:15 |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 27 |
ソースコード
#include<bits/stdc++.h> using lint=long long; int main(){ std::cin.tie(nullptr);std::ios_base::sync_with_stdio(false); std::cout.setf(std::ios_base::fixed);std::cout.precision(15); std::vector<lint>hole={1,0,0,0,1,0,1,0,2,1}; std::string s;std::cin>>s; lint a=1,b=0; for(char c:s){ lint x=c-'0'; a+=hole.at(x),b++; } std::cout<<a+b+std::min(a,b)<<'\n'; }