結果
| 問題 | No.667 Mice's Luck(ネズミ達の運) |
| コンテスト | |
| ユーザー |
mukadenodaiou
|
| 提出日時 | 2018-03-23 22:30:28 |
| 言語 | C++17(gcc12) (gcc 12.4.0 + boost 1.89.0) |
| 結果 |
AC
|
| 実行時間 | 172 ms / 2,000 ms |
| コード長 | 1,122 bytes |
| 記録 | |
| コンパイル時間 | 873 ms |
| コンパイル使用メモリ | 127,320 KB |
| 実行使用メモリ | 7,844 KB |
| 最終ジャッジ日時 | 2026-03-08 19:04:55 |
| 合計ジャッジ時間 | 2,371 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 10 |
ソースコード
# include <iostream>
# include <algorithm>
# include <vector>
# include <string>
# include <set>
# include <map>
# include <cmath>
# include <iomanip>
# include <functional>
# include <utility>
# include <stack>
# include <queue>
# include <list>
# include <bitset>
# include <complex>
#include<limits.h>
#include<unordered_map>
#include<unordered_set>
#include<deque>
#include<cstdio>
using namespace std;
typedef long long int ll;
const int N = 1000000;
const ll mod = 1000000007;
const ll INF = std::numeric_limits<long long>::max();
#define rep(i,n) for(ll i=(ll)0;i<(ll)n;++i)
#define srep(i,s) rep(i,(ll)s.size())
#define vin(n,v) rep(i,n)cin>>v[i]
#define ALL(x) x.begin(),x.end()
#define pp pair<ll,ll>
#define fi first
#define se second
#define sz size
void YN(bool b) { cout << (b ? "YES" : "NO") << endl; }
void yn(bool b) { cout << (b ? "Yes" : "No") << endl; }
int main(){
string s;
cin >> s;
ll ct = 0, ct2 = 0;
srep(i, s) {
if (s[i] == 'o')++ct;
else ++ct2;
}
srep(i, s) {
cout<<fixed<<setprecision(13)<< (double)ct / (ct + ct2)*100 << endl;
if (s[i] == 'o')--ct;
else --ct2;
}
return 0;
}
mukadenodaiou