Submission #3624300
Source Code Expand
#include <bits/stdc++.h> using namespace std; #define REP(i,n) for(int i=0; i<int(n); i++) #define FOR(i,m,n) for(int i=int(m); i<int(n); i++) #define ALL(obj) (obj).begin(),(obj).end() #define VI vector<int> #define VLL vector<long long> #define VVI vector<vector<int>> #define VVLL vector<vector<long long>> #define VC vector<char> #define VS vector<string> #define VVS vector<vector<string>> #define VVC vector<vector<char>> typedef long long ll; int main() { double n, m, d; cin >> n >> m >> d; if (d == 0) { cout << fixed << setprecision(15) << 1 / n * (m - 1) << endl; } else { cout << fixed << setprecision(15) << 2 * (n - d) / (n*n)*(m - 1) << endl; } return 0; }
Submission Info
Submission Time | |
---|---|
Task | C - Ordinary Beauty |
User | toku |
Language | C++14 (GCC 5.4.1) |
Score | 300 |
Code Size | 716 Byte |
Status | AC |
Exec Time | 1 ms |
Memory | 256 KB |
Judge Result
Set Name | Sample | All | ||||
---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 300 / 300 | ||||
Status |
|
|
Set Name | Test Cases |
---|---|
Sample | sample_1000000000_180707_0.txt, sample_2_3_1.txt |
All | sample_1000000000_180707_0.txt, sample_2_3_1.txt, test_11936238_9_153932.txt, test_138666_2854897_1404.txt, test_1_2_0.txt, test_234679769_107_69508.txt, test_25213539_11160_27040.txt, test_28367_3200917_12993.txt, test_46387542_48_441879.txt, test_50484_560629_534.txt, test_569_56_8.txt, test_77_143_1.txt, test_8180059_850_58.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
sample_1000000000_180707_0.txt | AC | 1 ms | 256 KB |
sample_2_3_1.txt | AC | 1 ms | 256 KB |
test_11936238_9_153932.txt | AC | 1 ms | 256 KB |
test_138666_2854897_1404.txt | AC | 1 ms | 256 KB |
test_1_2_0.txt | AC | 1 ms | 256 KB |
test_234679769_107_69508.txt | AC | 1 ms | 256 KB |
test_25213539_11160_27040.txt | AC | 1 ms | 256 KB |
test_28367_3200917_12993.txt | AC | 1 ms | 256 KB |
test_46387542_48_441879.txt | AC | 1 ms | 256 KB |
test_50484_560629_534.txt | AC | 1 ms | 256 KB |
test_569_56_8.txt | AC | 1 ms | 256 KB |
test_77_143_1.txt | AC | 1 ms | 256 KB |
test_8180059_850_58.txt | AC | 1 ms | 256 KB |