結果
| 問題 | No.509 塗りつぶしツール |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2026-10-23 15:27:17 |
| 言語 | C++23(gcc16) (gcc 16.2.0 + boost 1.92.0 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 1 ms / 2,000 ms |
| + 897µs | |
| コード長 | 285 bytes |
| 記録 | |
| コンパイル時間 | 1,855 ms |
| コンパイル使用メモリ | 155,472 KB |
| 実行使用メモリ | 9,904 KB |
| 最終ジャッジ日時 | 2026-10-23 15:27:23 |
| 合計ジャッジ時間 | 3,991 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge4_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 27 |
ソースコード
#include<iostream>
using namespace std;
int main(void){
int hole[10]={1, 0, 0, 0, 1, 0, 1, 0, 2, 1};
int ans1=1, ans2=2;
string s; cin >> s;
for(auto p:s){
int now=p-'0';
ans1+=2+hole[now];
ans2+=2*hole[now]+1;
}
cout << min(ans1, ans2) << endl;
return 0;
}