結果
| 問題 | No.3483 A Forbidden Fruit |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2026-03-27 21:43:24 |
| 言語 | C++23 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 1,001 bytes |
| 記録 | |
| コンパイル時間 | 4,141 ms |
| コンパイル使用メモリ | 374,436 KB |
| 実行使用メモリ | 7,716 KB |
| 最終ジャッジ日時 | 2026-03-27 21:43:52 |
| 合計ジャッジ時間 | 12,877 ms |
|
ジャッジサーバーID (参考情報) |
judge1_1 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 2 WA * 14 |
ソースコード
#include<bits/stdc++.h>
using namespace std;
#include<atcoder/all>
using namespace atcoder;
using mint=atcoder::modint998244353;
#define int long long
#define rep(i,n) for(int i=0;i<(n);i++)
#define rng(i,l,r) for(int i=(l);i<(r);i++)
#define rrep(i,n) for(int i=(n)-1;i>=0;i--)
#define rrng(i,l,r) for(int i=(r)-1;i>=(l);i--)
#define all(x) (x).begin(),(x).end()
#define pb push_back
#define fi first
#define se second
struct fast_io{fast_io(){cin.tie(nullptr)->sync_with_stdio(false);}}_;
template<class T> bool chmax(T &a,T b){return (a<b)?a=b,1:0;}
template<class T> bool chmin(T &a,T b){return (a>b)?a=b,1:0;}
template<class T>using pqmin=priority_queue<T,vector<T>,greater<T>>;
void solve();
signed main(){
int T;cin>>T;
cout<<fixed<<setprecision(15);
while(T--){
solve();
}
}
using ld=long double;
void solve(){
int N,M,K;cin>>N>>M>>K;
if(K<=(N-1)*M){
ld ans=ld((K+M-1)/M)/ld(N*M);
cout<<ld(1-ans)<<endl;
}else{
ld ans=ld(N+(K%M))/ld(N*M);
cout<<ld(1-ans)<<endl;
}
}