結果
問題 | No.667 Mice's Luck(ネズミ達の運) |
ユーザー | aaaaaaiu |
提出日時 | 2019-07-31 22:52:07 |
言語 | C++17 (gcc 12.3.0 + boost 1.83.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 384 bytes |
コンパイル時間 | 2,880 ms |
コンパイル使用メモリ | 198,816 KB |
実行使用メモリ | 4,380 KB |
最終ジャッジ日時 | 2023-09-18 17:08:31 |
合計ジャッジ時間 | 3,689 ms |
ジャッジサーバーID (参考情報) |
judge14 / judge13 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | WA | - |
testcase_01 | AC | 1 ms
4,376 KB |
testcase_02 | WA | - |
testcase_03 | WA | - |
testcase_04 | WA | - |
testcase_05 | WA | - |
testcase_06 | WA | - |
testcase_07 | WA | - |
testcase_08 | WA | - |
testcase_09 | AC | 172 ms
4,376 KB |
ソースコード
#include <bits/stdc++.h> using namespace std; typedef long long ll; int main() { string s; cin >> s; int n = s.size(); int o, x; o = x = 0; for (char c : s) { if (c == 'o') o++; else x++; } cout << fixed; for (char c : s) { cout << o / double(o+x) << endl; if (c == 'o') o--; else x--; } return 0; }