結果
問題 | No.667 Mice's Luck(ネズミ達の運) |
ユーザー |
![]() |
提出日時 | 2018-03-23 22:50:35 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 242 ms / 2,000 ms |
コード長 | 399 bytes |
コンパイル時間 | 1,827 ms |
コンパイル使用メモリ | 166,924 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-06-24 22:21:39 |
合計ジャッジ時間 | 2,982 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 10 |
ソースコード
#include "bits/stdc++.h"#define in std::cin#define out std::cout#define rep(i,N) for(int i=0;i<N;++i)typedef long long int LL;std::string S;int safe, dang;int main(){in >> S;for (auto c : S) (c == 'o' ? safe : dang) += 1;out << std::fixed << std::setprecision(13);for (auto c : S){out << 100.*safe / (safe + dang) << std::endl;(c == 'o' ? safe : dang) -= 1;}return 0;}