結果
| 問題 |
No.667 Mice's Luck(ネズミ達の運)
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-09-13 16:41:41 |
| 言語 | C++17(clang) (17.0.6 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 710 bytes |
| コンパイル時間 | 10,804 ms |
| コンパイル使用メモリ | 129,352 KB |
| 実行使用メモリ | 6,948 KB |
| 最終ジャッジ日時 | 2024-06-13 01:50:12 |
| 合計ジャッジ時間 | 6,439 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | WA * 10 |
ソースコード
#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <unordered_map>
using namespace std;
#define ll long long
#define all(v) v.begin(),v.end()
#define bootstrap ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0);
void solve() {
string boxes;
cin >> boxes;
double o, x = 0;
for (char &ch:boxes) {
if (ch == 'x') {
x++;
}
}
o = boxes.length() - x;
for (int i = 0; i < boxes.length() - 1; ++i) {
cout << o / (x + o) << endl;
if(boxes.at(i) == 'o') {
o --;
} else {
x --;
}
}
}
int main() {
bootstrap;
int t;
t = 1;//cin>>t;
solve();
}