結果

問題 No.667 Mice's Luck(ネズミ達の運)
コンテスト
ユーザー dnish
提出日時 2018-03-23 22:27:53
言語 C++14
(gcc 15.2.0 + boost 1.89.0)
コンパイル:
g++-15 -O2 -lm -std=c++14 -Wuninitialized -DONLINE_JUDGE -o a.out _filename_
実行:
./a.out
結果
AC  
実行時間 29 ms / 2,000 ms
コード長 777 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 435 ms
コンパイル使用メモリ 100,816 KB
実行使用メモリ 7,844 KB
最終ジャッジ日時 2026-03-11 01:53:39
合計ジャッジ時間 1,837 ms
ジャッジサーバーID
(参考情報)
judge2_0 / judge3_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 10
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <deque>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <utility>
#include <vector>
#define p(s) cout<<(s)<<endl
#define REP(i,n,N) for(int i=n;i<N;i++)
#define RREP(i,n,N) for(int i=N-1;i>=n;i--)
#define CK(n,a,b) ((a)<=(n)&&(n)<(b))
#define F first
#define S second
typedef long long ll;
using namespace std;
const ll mod = 1e9+7;

string s;
int main(){
    cin>>s;
    double maru=0;
    double batu=0;
    REP(i,0,s.size()){
        if(s[i]=='o') maru++;
        else batu++;
    }
    REP(i,0,s.size()){
        printf("%.7lf\n", 100*maru/(maru+batu));
        if(s[i]=='o') maru--;
        else batu--;
    }
    return 0;
}
0