Skip to content

Commit

Permalink
Add 20575.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
Hiyabye committed Feb 18, 2024
1 parent 9dadcc4 commit c81e8a0
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions 20xxx/20575.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#include <cmath>
#include <iomanip>
#include <iostream>
using namespace std;

void solve(void) {
int n; cin >> n;

double ans = 0;
for (int i=0; i<n; i++) {
double x1, y1, x2, y2; cin >> x1 >> y1 >> x2 >> y2;
if ((int)floor(x1) != (int)floor(x2)) ans++;
}
cout << fixed << setprecision(7) << 2 / ans * n;
}

int main(void) {
ios::sync_with_stdio(false);
cin.tie(nullptr);

solve();
return 0;
}

0 comments on commit c81e8a0

Please sign in to comment.