Update 5723.cpp

Notes added. Fully Understood now.
This commit is contained in:
Kirigaya Kazuto 2016-09-19 11:39:31 +08:00 committed by GitHub
parent 48f40cd2f8
commit 2ad2d592ce

View File

@ -107,6 +107,11 @@ int main()
totalans=0; totalans=0;
dfs(b); dfs(b);
/// What The Hell ?
/// This Type is WRONG:
/// double ans=n*(n-1)/2.0;
/// But this type is Accepted !??
/// double ans=0.5*n*(n-1);
double tans=0.5*n*(n-1); double tans=0.5*n*(n-1);
/// Use Long Long? /// Use Long Long?
printf("%I64d %.2lf\n",sum,(double)totalans/tans); printf("%I64d %.2lf\n",sum,(double)totalans/tans);