結果
| 問題 | No.667 Mice's Luck(ネズミ達の運) |
| コンテスト | |
| ユーザー |
aaa
|
| 提出日時 | 2018-10-09 13:01:16 |
| 言語 | C++14 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
AC
|
| 実行時間 | 201 ms / 2,000 ms |
| コード長 | 720 bytes |
| 記録 | |
| コンパイル時間 | 821 ms |
| コンパイル使用メモリ | 108,144 KB |
| 実行使用メモリ | 6,400 KB |
| 最終ジャッジ日時 | 2026-04-29 18:47:32 |
| 合計ジャッジ時間 | 5,066 ms |
|
ジャッジサーバーID (参考情報) |
judge2_1 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 10 |
ソースコード
#include <stdio.h>
#include <algorithm>
#include <iostream>
#include <string>
#include <vector>
#include <functional>
#include <map>
#include <iomanip>
#include <math.h>
#include <stack>
#include <queue>
#include <bitset>
#include <cstdlib>
#include <tuple>
#include <cctype>
#include <ctype.h>
#include <set>
#include <sstream>
using namespace std;
int main() {
int i, j, k;
string s;
cin >> s;
double go = 0, ba = 0;
for (i = 0; i < s.length(); i++) {
s[i] == 'o' ? go++ : ba++;
}
double sum = go + ba;
for (i = 0; i < s.length(); i++) {
cout << fixed << setprecision(10) << (go / sum) * 100 << endl;
s[i] == 'o' ? go-- : ba--;
sum = (go + ba);
}
getchar();
getchar();
return 0;
}
aaa