結果
| 問題 | No.3615 Ge Gusser |
| コンテスト | |
| ユーザー |
mocchi
|
| 提出日時 | 2026-08-06 16:17:37 |
| 言語 | C++23(gnu拡張gcc16) (gcc 16.1.0 + boost 1.90.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 831 bytes |
| 記録 | |
| コンパイル時間 | 4,577 ms |
| コンパイル使用メモリ | 363,536 KB |
| 実行使用メモリ | 5,888 KB |
| 最終ジャッジ日時 | 2026-08-06 16:17:48 |
| 合計ジャッジ時間 | 8,898 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| サブタスク | 配点 | 結果 |
|---|---|---|
| サンプル | 0 % | WA * 3 |
| 小課題1 | 40 % | AC * 1 WA * 7 |
| 小課題2 | 40 % | AC * 1 WA * 7 RE * 7 |
| 小課題3 | 20 % | AC * 1 WA * 10 RE * 16 |
| 合計 | 2.5 * 0% = 0 点 |
ソースコード
#include <bits/stdc++.h>
#include <cassert>
using namespace std;
#define rep(i,n) for(int i = 0; i < (int)(n); i++)
using ll = long long;
constexpr int inf = 1e9;
signed main() {
int N,M;
cin >> N >> M;
vector<string> S(N);
rep(i,N) cin >> S[i];
assert(N <= 6);
vector<int> per(N);
ranges::iota(per,0);
ll cnt = 0;
do
{
string p;
rep(i,N) p.push_back('o');
rep(i,N)
{
rep(j,N)
{
if (S[per[i]][j] == 'x') p[j] = 'x';
}
if (ranges::count(p,'o') == 1) cnt += i + 1;
}
}while (ranges::next_permutation(per).found);
ll div = 1;
for (int i = 1; i <= N; i++) div *= i;
cout << fixed << setprecision(10) << static_cast<long double>(cnt) / static_cast<long double>(div) << endl;
}
mocchi