結果
| 問題 |
No.667 Mice's Luck(ネズミ達の運)
|
| コンテスト | |
| ユーザー |
tecchaxn
|
| 提出日時 | 2018-03-23 22:25:49 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 404 bytes |
| コンパイル時間 | 1,436 ms |
| コンパイル使用メモリ | 158,436 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-06-24 21:42:43 |
| 合計ジャッジ時間 | 2,606 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 2 WA * 8 |
ソースコード
#include<bits/stdc++.h>
#define REP(i,n) for(int i=0;i<(n);i++)
#define ALL(v) (v).begin(),(v).end()
#define int long long
using namespace std;
signed main()
{
string s; cin>>s;
int N=s.size();
int ok=count(ALL(s),'o');
int ng=count(ALL(s),'x');
REP(i,N){
double ans=(double)ok/(ok+ng);
printf("%.20lf\n",ans);
if(s[i]=='o') ok--;
else ng--;
}
}
tecchaxn