結果

問題 No.667 Mice's Luck(ネズミ達の運)
ユーザー niinii
提出日時 2018-05-11 22:12:05
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 82 ms / 2,000 ms
コード長 986 bytes
コンパイル時間 606 ms
コンパイル使用メモリ 78,504 KB
実行使用メモリ 4,380 KB
最終ジャッジ日時 2023-09-10 12:44:30
合計ジャッジ時間 3,061 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,376 KB
testcase_01 AC 1 ms
4,380 KB
testcase_02 AC 2 ms
4,376 KB
testcase_03 AC 2 ms
4,376 KB
testcase_04 AC 3 ms
4,380 KB
testcase_05 AC 10 ms
4,380 KB
testcase_06 AC 41 ms
4,380 KB
testcase_07 AC 82 ms
4,380 KB
testcase_08 AC 43 ms
4,380 KB
testcase_09 AC 30 ms
4,380 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <algorithm>
#include <vector>
#include <queue>
#include <set>
#include <bitset>
#include <cmath>
#include <string>
#define FI first
#define SE second
#define PF push_front
#define PB push_back
#define PPF pop_front
#define PPB pop_back
#define MA make_pair
#define ll long long
#define PA pair<int,int>
#define VE vector<int>
#define VP vector<PA>
#define FOR(i,a,b) for(int i=a;i<b;i++)
#define ROF(i,a,b) for(int i=b-1;i>=a;i--)
#define YES(i) cout<<(i?"YES":"NO")<<endl
#define Yes(i) cout<<(i?"Yes":"No")<<endl
using namespace std;
//
const int INF=1e9+7;
const int mod=1e9+7;
//
//
struct poi{
  int X;int Y;int Z;
  bool operator<(const poi&R)const{
    return X==R.X ? Y==R.Y ? Z<R.Z : Y<R.Y : X<R.X;
  }
};
//
//
int main(){
	string S;
	cin>>S;
	double N=S.size(),A=0;
	FOR(i,0,(int)S.size()){
		if(S[i]=='o'){
			A++;
		}
	}
	FOR(i,0,(int)S.size()){
		printf("%.9f\n",A/N*100);
		if(S[i]=='o'){
			A--;
			N--;
		}else{
			N--;
		}
	}
	return 0;
}
0