QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#870797#8620. Jigsaw Puzzleucup-team987#AC ✓1ms4224kbC++205.4kb2025-01-25 17:47:252025-01-25 17:47:32

Judging History

你现在查看的是最新测评结果

  • [2025-01-25 17:47:32]
  • 评测
  • 测评结果:AC
  • 用时:1ms
  • 内存:4224kb
  • [2025-01-25 17:47:25]
  • 提交

answer

#if __INCLUDE_LEVEL__ == 0

#include __BASE_FILE__

using kactl::P;

void Solve() {
  int n;
  IN(n);

  vector<int> sz(n);
  vector<vector<P>> p(n);
  for (int i : Rep(0, n)) {
    IN(sz[i]);
    p[i].reserve(sz[i] + 1);
    p[i].resize(sz[i]);
    for (auto& [x, y] : p[i]) {
      IN(x, y);
    }
    p[i].push_back(p[i][0]);
  }

  vector<tuple<double, int, int>> v;
  for (int i : Rep(0, n)) {
    for (int t : Rep(0, sz[i])) {
      v.emplace_back((p[i][t + 1] - p[i][t]).dist(), i, t);
    }
  }
  ranges::sort(v);

  vector<vector<pair<int, int>>> to(n);
  for (int i : Rep(0, n)) {
    to[i].assign(sz[i], {-1, -1});
  }

  constexpr double EPS = 1e-11;
  for (int vi : Rep(1, Sz(v))) {
    const auto& [d1, i1, t1] = v[vi - 1];
    const auto& [d2, i2, t2] = v[vi];
    if (d2 - d1 < EPS && abs(d2 - 1) > EPS) {
      to[i1][t1] = {i2, t2};
      to[i2][t2] = {i1, t1};
    }
  }

  vector<vector<P>> ans(n);
  for (int i : Rep(0, n)) {
    ans[i].resize(sz[i]);
  }

  int si = -1;
  int st = -1;
  for (int i : Rep(0, n)) {
    for (int t : Rep(0, sz[i])) {
      if (to[i][t].first == -1 && to[i][Mod(t - 1, sz[i])].first == -1) {
        si = i;
        st = t;
        break;
      }
    }
    if (si != -1) {
      break;
    }
  }

  vector<bool> done(n);
  auto Go = [&](int i, int t, const P& q0, const P& q1) {
    const P& p0 = p[i][t];
    const P& p1 = p[i][t + 1];
    for (int t : Rep(0, sz[i])) {
      ans[i][t] = kactl::linearTransformation(p0, p1, q0, q1, p[i][t]);
    }
    done[i] = true;
  };

  Go(si, st, P(0, 0), P((p[si][st + 1] - p[si][st]).dist(), 0));

  vector<int> q{si};
  for (int qi = 0; qi < Sz(q); ++qi) {
    int i = q[qi];
    for (int t : Rep(0, sz[i])) {
      if (to[i][t].first == -1) {
        continue;
      }
      const auto& [i2, t2] = to[i][t];
      if (!done[i2]) {
        Go(i2, t2, ans[i][Mod(t + 1, sz[i])], ans[i][t]);
        q.push_back(i2);
      }
    }
  }

  for (int i : Rep(0, n)) {
    for (const auto& [x, y] : ans[i]) {
      OUT(clamp(x, 0.0, 1.0), clamp(y, 0.0, 1.0));
    }
    OUT();
  }
}

int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  cout << setprecision(DBL_DECIMAL_DIG);

  Solve();
}

#elif __INCLUDE_LEVEL__ == 1

#include <bits/stdc++.h>

template <class T> concept Range = std::ranges::range<T> && !std::convertible_to<T, std::string_view>;
template <class T> concept Tuple = std::__is_tuple_like<T>::value && !Range<T>;

namespace std {

istream& operator>>(istream& is, Range auto&& r) {
  for (auto&& e : r) is >> e;
  return is;
}
istream& operator>>(istream& is, Tuple auto&& t) {
  apply([&](auto&... xs) { (is >> ... >> xs); }, t);
  return is;
}

ostream& operator<<(ostream& os, Range auto&& r) {
  auto sep = "";
  for (auto&& e : r) os << exchange(sep, " ") << e;
  return os;
}
ostream& operator<<(ostream& os, Tuple auto&& t) {
  auto sep = "";
  apply([&](auto&... xs) { ((os << exchange(sep, " ") << xs), ...); }, t);
  return os;
}

}  // namespace std

using namespace std;

// https://github.com/kth-competitive-programming/kactl
namespace kactl {

typedef long long ll;
typedef pair<int, int> pii;
typedef vector<int> vi;

template <class T> int sgn(T x) { return (x > 0) - (x < 0); }
template <class T>
struct Point {
  typedef Point P;
  T x, y;
  explicit Point(T x = 0, T y = 0) : x(x), y(y) {}
  bool operator<(P p) const { return tie(x, y) < tie(p.x, p.y); }
  bool operator==(P p) const { return tie(x, y) == tie(p.x, p.y); }
  P operator+(P p) const { return P(x + p.x, y + p.y); }
  P operator-(P p) const { return P(x - p.x, y - p.y); }
  P operator*(T d) const { return P(x * d, y * d); }
  P operator/(T d) const { return P(x / d, y / d); }
  T dot(P p) const { return x * p.x + y * p.y; }
  T cross(P p) const { return x * p.y - y * p.x; }
  T cross(P a, P b) const { return (a - *this).cross(b - *this); }
  T dist2() const { return x * x + y * y; }
  double dist() const { return sqrt((double)dist2()); }
  double angle() const { return atan2(y, x); }
  P unit() const { return *this / dist(); }
  P perp() const { return P(-y, x); }
  P normal() const { return perp().unit(); }
  P rotate(double a) const {
    return P(x * cos(a) - y * sin(a), x * sin(a) + y * cos(a));
  }
  friend ostream& operator<<(ostream& os, P p) {
    return os << "(" << p.x << "," << p.y << ")";
  }
};

typedef Point<double> P;
P linearTransformation(const P& p0, const P& p1,
                       const P& q0, const P& q1, const P& r) {
  P dp = p1 - p0, dq = q1 - q0, num(dp.cross(dq), dp.dot(dq));
  return q0 + P((r - p0).cross(num), (r - p0).dot(num)) / dp.dist2();
}

}  // namespace kactl

#define LAMBDA2(x, y, ...) ([&](auto&& x, auto&& y) -> decltype(auto) { return __VA_ARGS__; })
#define LAMBDA3(x, y, z, ...) ([&](auto&& x, auto&& y, auto&& z) -> decltype(auto) { return __VA_ARGS__; })
#define Rep(...) [](int l, int r) { return views::iota(min(l, r), r); }(__VA_ARGS__)
#define Sz(r) int(size(r))
#define DivFloor(...) LAMBDA2(x, y, x / y - ((x ^ y) < 0 && x % y != 0))(__VA_ARGS__)
#define Floor(...) LAMBDA3(x, m, r, DivFloor(x - r, m) * m + r)(__VA_ARGS__)
#define Mod(...) LAMBDA2(x, m, x - Floor(x, m, 0))(__VA_ARGS__)
#define IN(...) (cin >> forward_as_tuple(__VA_ARGS__))
#define OUT(...) (cout << forward_as_tuple(__VA_ARGS__) << '\n')

#endif  // __INCLUDE_LEVEL__ == 1

这程序好像有点Bug,我给组数据试试?

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 0ms
memory: 4096kb

input:

4
4
0.440405375916 0.778474079786
0.000000000000 0.090337001520
0.469097990019 0.000000000000
0.702887505082 0.689470121906
4
0.222810526978 0.000000000000
0.270828246634 0.522212063829
0.000000000000 0.547114887265
0.021480010612 0.069880870008
4
0.000000000000 0.312825941471
0.358219176380 0.00000...

output:

0.27716163632404389 0
0.47326243136115248 0.79311664451453445
2.8242961071728698e-12 0.72802924828228388
0 0

0.52441504651755244 0.999999999997775
3.8961114761062298e-12 1
2.8242961071728698e-12 0.72802924828228388
0.47326243136115242 0.79311664451453445

1 0.99999999999695455
0.52441504651624071 0...

result:

ok OK

Test #2:

score: 0
Accepted
time: 1ms
memory: 3968kb

input:

2
4
1.187724454426 0.260257896229
0.903481480651 1.219010174901
0.000000000000 0.951153431795
0.309873903757 0.000000000000
4
0.516015116935 0.888042716318
0.000000000000 0.031046166652
0.048574738349 0.000000000000
0.587115596943 0.842599396881

output:

0 0
0.99999999999960387 0
0.99999999999994604 0.94235132551860756
2.431943535443332e-13 0.91561769416029259

2.431943535443332e-13 0.91561769416029259
0.99999999999994593 0.94235132551860767
0.99999999999993927 0.99999999999996947
1.7688510150465619e-13 0.99999999999997791


result:

ok OK

Test #3:

score: 0
Accepted
time: 0ms
memory: 3968kb

input:

2
4
0.010984487654 0.637154242202
0.000000000000 0.364429379044
0.986132728982 0.000000000000
1.010174362438 0.596910060881
4
1.051085498217 0.708750184397
0.000000000000 0.686709156365
0.238826458657 0.000000000000
1.183335588457 0.328485165151

output:

0 0
0.2729459835820463 0
0.59739402484513371 1
3.9870378230398317e-13 1

0.59739402484513371 1
0.2729459835820463 2.2204460492503131e-16
1 3.1896707497480747e-13
1 1


result:

ok OK

Test #4:

score: 0
Accepted
time: 1ms
memory: 3968kb

input:

2
4
0.826904615568 0.393527743434
0.397181437913 1.296488423966
0.078224855062 1.144695506210
0.000000000000 0.000000000000
4
1.022875732881 0.126407334306
0.000000000000 0.646188215994
0.027327732878 0.000000000000
1.026434680216 0.042252902634

output:

0 0
1 0
1 0.35323418807480483
8.021361352910955e-14 0.91577034681186187

8.021361352910955e-14 0.91577034681186187
1 0.35323418807480478
1 0.99999999999924571
1.8458057707719321e-13 0.99999999999991351


result:

ok OK

Test #5:

score: 0
Accepted
time: 1ms
memory: 4096kb

input:

2
4
0.341358383182 1.391325004482
0.000000000000 0.397880525310
0.531982366752 0.000000000000
1.130916074772 0.800798609763
4
1.051975365355 0.325235570274
0.003475133323 0.261167306728
0.000000000000 0.247567137365
0.968870740861 0.000000000000

output:

1 0.98596286502522479
0 0.66431479808598348
0 0
1 0

0 0.66431479808598348
1 0.98596286502522479
1 1
1.7425836886843852e-13 0.99999999999968814


result:

ok OK

Test #6:

score: 0
Accepted
time: 1ms
memory: 4096kb

input:

2
4
0.082220615826 0.000000000000
0.226158368535 0.989676141653
0.157074587283 1.000663841224
0.000000000000 0.013077098690
4
0.796463091415 0.000000000000
1.301438005407 0.863236513506
0.516366280506 1.336613199533
0.000000000000 0.480245367141

output:

0.9999999999995508 0.083254070032369482
0 0.069952114863932047
0 0
0.99999999999952116 0

0 0.069952114863932047
0.99999999999955069 0.083254070032369454
0.99999999999981182 1
0 1


result:

ok OK

Test #7:

score: 0
Accepted
time: 1ms
memory: 4096kb

input:

2
4
0.919168715346 1.052156329422
0.000000000000 0.740689700679
0.930075742206 0.000000000000
1.240100800584 0.105054119170
4
1.147942957461 0.000000000000
1.169807209495 0.019794683310
0.498656378683 0.761115506098
0.000000000000 0.309659628218

output:

0 0
0.97050635654350337 5.8936381172250991e-17
0.32734065555220165 1
7.3051644463005107e-13 0.99999999999971734

0.97050635654350326 0
1 4.8772097471783127e-13
1 0.99999999999969347
0.32734065555220165 1


result:

ok OK

Test #8:

score: 0
Accepted
time: 0ms
memory: 4096kb

input:

3
4
0.000000000000 0.136914050437
1.205473860654 0.000000000000
1.271801552152 0.076389603324
0.516716328492 0.732016253949
4
0.193356841190 1.008675084911
0.000000000000 0.998661755544
0.051717482677 0.000000000000
0.069051074671 0.000897651020
4
0.189612940043 1.009339071474
0.000000000000 0.01178...

output:

0.99999999999974032 0.78812587621209995
0 0.10116686293175217
0 0
0.99999999999971423 0

0.99999999999945699 0.80638405334376762
0.99999999999969147 1
0 1
0 0.98264318033932707

0.99999999999945721 0.8063840533437675
0 0.98264318033932707
0 0.10116686293175217
0.9999999999997401 0.78812587621209995


result:

ok OK

Test #9:

score: 0
Accepted
time: 1ms
memory: 4096kb

input:

4
5
0.933026549197 0.034096050827
1.030580221284 0.341877704707
0.077317792660 0.644021283449
0.000000000000 0.400083791499
0.816713028753 0.000000000000
5
0.000000000000 0.567232254210
0.177744443744 0.000000000000
0.278219549927 0.015709015317
0.955605106642 0.861917658609
0.954247706440 0.8662495...

output:

4.0822900615420063e-13 0.32287190246716424
0 0
1 0
1 0.25589752058328169
0.10057540616276622 0.39051777000798971

1.1779743847029067e-12 1
4.50792181361237e-13 0.40557126794037235
0.10057540616276622 0.39051777000798971
1 0.99546046186167558
1 0.9999999999991025

1 0.99546046186167558
0.100575406162...

result:

ok OK

Test #10:

score: 0
Accepted
time: 0ms
memory: 3968kb

input:

4
4
0.578470606282 0.000000000000
1.060885700639 0.240610189702
0.817167310798 0.691089665380
0.000000000000 0.248985836080
4
0.000000000000 0.520597380570
0.022799149709 0.000000000000
0.882566155159 0.037652814638
0.461438543132 0.525442723877
4
0.057126159280 0.427841981239
0.000000000000 0.38584...

output:

0.53879133060654028 0.49425190379509198
0 0.51218201018174736
0 0
0.92909537170225887 0

0.99999999999871469 0.47890362322883973
0.99999999999864597 0.99999999999891476
0.13940890191072561 0.99999999999972733
0.53879133060654028 0.49425190379509198

0.92909537170225898 0
0.99999999999960798 0
0.9999...

result:

ok OK

Test #11:

score: 0
Accepted
time: 1ms
memory: 4096kb

input:

3
3
0.823899373670 0.782629779690
0.288601744213 0.945945553033
0.000000000000 0.000000000000
5
0.919151534064 0.575061183684
0.169973459288 1.263242535288
0.000000000000 1.135836341471
0.145355826013 0.008808731413
0.151958544733 0.000000000000
4
1.000848179486 0.040130744019
0.991701546880 0.26786...

output:

0 0.55965667504721661
0 0
0.98899138321104385 5.6753835711435807e-17

1 0.95879113880928135
0 0.77207916699510459
0 0.55965667504721661
0.98899138321104396 1.1102230246251565e-16
0.9999999999998167 0

0 1
0 0.77207916699510459
1 0.95879113880928135
1 1


result:

ok OK

Test #12:

score: 0
Accepted
time: 0ms
memory: 4096kb

input:

3
4
0.784316497399 0.634251077946
0.006801703755 1.263115726074
0.000000000000 1.254706245103
0.271325510967 0.000000000000
4
0.176866080715 0.000000000000
1.325780121566 0.313426050448
1.266765536888 0.366283123599
0.000000000000 0.158412084360
4
0.637108390812 0.412967145896
0.087765752860 1.24856...

output:

0 0
1 5.5511151231234223e-17
0.99999999999994182 0.010815846900376966
0 0.81574149216289049

0.99999999999967726 0.24825215199878181
0 0.89496643385936003
0 0.81574149216289049
0.99999999999994194 0.010815846900376958

0.99999999999869904 1
0 1
0 0.89496643385936003
0.99999999999967715 0.24825215199...

result:

ok OK

Test #13:

score: 0
Accepted
time: 0ms
memory: 4096kb

input:

6
4
0.921652078321 0.149600568920
0.078937119587 0.337059477836
0.000000000000 0.296726127108
0.743849912614 0.000000000000
4
1.023501554022 0.000000000000
0.951768850516 0.475614028074
0.000000000000 0.332067057777
0.284068099668 0.057351469275
4
0.049230909949 0.111307311191
0.213550746194 0.00000...

output:

0.19846996274262341 0.99999999999724587
0.72261121045938614 0.31400780132743611
0.80897963916311266 0.29404928052147616
0.43083592485930394 0.99999999999591327

4.8236065771309323e-13 0.48099301913131276
0 0
0.96253294878357065 0
0.72261121045938614 0.31400780132743611

0.19846996273582823 1
6.85310...

result:

ok OK

Test #14:

score: 0
Accepted
time: 0ms
memory: 3968kb

input:

5
4
0.000000000000 0.055459913902
0.998460914583 0.000000000000
1.018410323962 0.359155002823
0.013840567536 0.304635665324
4
0.500064513905 0.019086089913
0.674971706538 0.000000000000
0.813263023860 0.224894936058
0.000000000000 0.724982740923
4
0.731666528739 0.764701825648
0.735437510038 0.80982...

output:

0 0
0.99999999999996902 0
0.99999999999987976 0.35970862512227875
1.2065001775419441e-14 0.24955984534062547

0.84101019204774152 0.66062877441244794
1 0.73598821861275643
1 0.99999999999984657
0.045282995568045159 0.99999999999989386

0.045282995568045159 0.99999999999989386
0 0.99999999999910405
2...

result:

ok OK

Test #15:

score: 0
Accepted
time: 1ms
memory: 3968kb

input:

5
3
0.000000000000 0.061747330599
0.247806449221 0.000000000000
0.229822253050 0.275345649819
5
0.538394745273 0.029328826979
0.968971368133 0.672420034382
0.916291764826 0.738725056183
0.000000000000 0.284470622299
0.226013039857 0.000000000000
4
0.014373491307 0.145007400418
1.026752147154 0.00000...

output:

1 0.57219607709351805
1 0.82757964961056907
0.73717200749494782 0.74355522136704399

0.73717200749494782 0.74355522136704399
7.7870727889826419e-14 0.50788604527865577
4.3734807442253524e-13 0.42320135645824697
0.99999999999966838 0.20887056307544136
1 0.57219607709351805

0.99999999999966815 0.2088...

result:

ok OK

Test #16:

score: 0
Accepted
time: 0ms
memory: 4096kb

input:

7
5
0.810317691232 0.643017535788
0.309793761559 0.764262848182
0.000000000000 0.561376089933
0.651400345497 0.000000000000
0.931962307009 0.325553870105
4
0.171076044751 0.000000000000
0.265564197304 0.103411254234
0.071756689228 0.418964516278
0.000000000000 0.156314315443
4
0.386419063825 0.00000...

output:

0.59083771974035293 0.29939449400139212
0.35592923722224895 0.75769857950997943
0 0.8599218129935271
0 0
0.42976777053171877 0

0 1
0 0.8599218129935271
0.35592923722224895 0.75769857950997943
0.23173514688052116 1

0.77296287510673944 0.63792610094393154
0.96775344640797623 0.999999999999168
0.2317...

result:

ok OK

Test #17:

score: 0
Accepted
time: 0ms
memory: 4096kb

input:

7
4
0.000000000000 0.177488867232
0.176950314412 0.039266481958
0.556242974263 0.000000000000
0.075309305264 0.536013509980
4
0.203281319601 0.323314306022
0.000000000000 0.110510724304
0.349283252863 0.000000000000
0.408321765666 0.043218341300
5
0.860850463389 0.099669917919
0.433724726467 0.81261...

output:

0.2954871750091016 0.28972790430349871
0.25608956545788719 0.51078144967865047
0 0.79331093997094959
9.5571848429897865e-14 0.073166734372344916

0.34712437825091169 0
0.29548717500910154 0.28972790430349876
9.5571848429897865e-14 0.073166734372344916
0 0

0.99999999999073086 1
0.16889783370318617 0...

result:

ok OK

Test #18:

score: 0
Accepted
time: 1ms
memory: 4096kb

input:

6
4
0.880095449711 0.315891170135
0.784668799664 0.890843756640
0.000000000000 0.600905379684
0.728266831893 0.000000000000
4
0.083309474403 0.000000000000
0.291032832219 0.544543596864
0.066903447530 0.393219949838
0.000000000000 0.014725970157
4
0.007778511174 0.196667909856
0.000000000000 0.13427...

output:

0.19436792908902706 0.57238792365011826
0.084600961710662378 0
0.9211231596217091 3.2451819009793326e-13
0.44627296279605633 0.81607422722672018

0.084600961710662406 0
0.19436792908902706 0.57238792365011826
1.0214778043699881e-12 0.38436150164416916
0 0

0.33925182857964831 0.99999999999953371
0.2...

result:

ok OK

Test #19:

score: 0
Accepted
time: 0ms
memory: 3968kb

input:

9
4
0.062298941747 0.379982766518
0.000000000000 0.335827002916
0.238024873877 0.000000000000
0.368555159260 0.154177511533
4
0.271980593498 0.402027829795
0.000000000000 0.242759569523
0.006597351582 0.000000000000
0.412952594723 0.011043306806
4
0.713919783914 0.000000000000
0.775523766209 0.02973...

output:

1.7777689876609566e-13 0.076360261930350962
0 0
0.41162557800956051 0
0.3613188963891194 0.19564789354607254

0.60533007072500755 0.27620696578188209
0.75715080061310125 1.1115552922547067e-12
1 1.6589507545461402e-12
0.99999999999852651 0.40650527457181551

0.22773304372594522 0.96316802302774307
0...

result:

ok OK

Test #20:

score: 0
Accepted
time: 0ms
memory: 4096kb

input:

12
4
0.011736358846 0.082356480218
0.408765987214 0.000000000000
0.506829492828 0.122146405389
0.000000000000 0.183574392246
3
0.518781549596 0.245694689851
0.000000000000 0.398529593227
0.074761480444 0.000000000000
4
0.075538054618 0.530132543078
0.000000000000 0.488866489116
0.155089097424 0.0109...

output:

0.63884202608730756 0.656981486448735
1 0.84131822591086336
0.99999999999937228 0.99795856389197701
0.56632343045417888 0.72856263705209701

1 0.3004921874361785
1 0.84131822591086336
0.63884202608730756 0.656981486448735

0.48494222989129676 0.5784303019706083
0.42677372962847177 0.6418756365684954...

result:

ok OK

Test #21:

score: 0
Accepted
time: 1ms
memory: 4096kb

input:

14
4
0.238874723659 0.350932855333
0.056257209931 0.347991971885
0.000000000000 0.014112992049
0.083758710992 0.000000000000
3
0.000000000000 0.000000000000
0.074629721440 0.057264984008
0.050867075265 0.098486920063
5
0.000000000000 0.100859535910
0.152266736787 0.000000000000
0.585330206242 0.2675...

output:

0.17959046741987966 0.37182794128161645
8.6182274803618813e-13 0.33858536123930211
0 0
0.084939379628159034 0

0.49058872653287883 0.90674452935375816
0.47824810618449598 0.99999999999830647
0.43066752857788398 0.99999999999890232

8.6182274803618813e-13 0.33858536123930211
0.17959046741987966 0.371...

result:

ok OK

Test #22:

score: 0
Accepted
time: 0ms
memory: 4096kb

input:

25
4
0.000000000000 0.627504305794
0.147063422648 0.000000000000
0.282537740951 0.083274926848
0.087264778840 0.609639797093
3
0.040754587534 0.053855777929
0.019823186956 0.059913069526
0.000000000000 0.000000000000
4
0.000000000000 0.138379187270
0.054487787984 0.000000000000
0.282847594751 0.1139...

output:

0.37960340706436285 1
0.6495290235323109 0.41473983080546395
0.76554943919392393 0.5234930721872777
0.46867799545615296 1

0.86938260129851208 0.35683096263729536
0.85786019799854218 0.37532551680472775
0.80307363486866934 0.34400512182585752

0.49983174862163704 1.1354755677372985e-11
0.43762446055...

result:

ok OK

Test #23:

score: 0
Accepted
time: 0ms
memory: 4096kb

input:

31
4
0.335089288956 0.202130218860
0.111257412594 0.213056135994
0.000000000000 0.115005293141
0.101353839372 0.000000000000
5
0.368599476325 0.185829203903
0.028334455772 0.164205533565
0.000000000000 0.125424247883
0.009151606319 0.000000000000
0.420642774919 0.030024538656
4
0.014611117134 0.4683...

output:

0.15618926151272725 0.30899918906477375
0 0.14829760497491271
0 0
0.15329324253173235 9.2277165854547699e-18

0.15917884996932494 0.6279820461343909
0.16237419300470574 0.96891848759263133
0.12575767911344488 0.99999999999961364
2.7739093565539619e-12 1
0 0.58741491210030328

0 0.14829760497491271
0...

result:

ok OK

Test #24:

score: 0
Accepted
time: 1ms
memory: 3968kb

input:

38
6
0.055783185423 0.185264589599
0.000000000000 0.109085977012
0.008304609077 0.000000000000
0.192122870699 0.013993905045
0.330134360764 0.183894016971
0.331013036656 0.209310854427
6
0.313528615558 0.117272301270
0.460548489005 0.402591166057
0.450995573032 0.409647373622
0.000000000000 0.427107...

output:

0.061404905993671238 0.18112598071794458
3.3934891290460415e-13 0.10940163121537255
0 0
0.18435016323329495 0
0.3348604624073957 0.15893353725677789
0.33766597923379288 0.18421034031659361

0.096670289959483763 0.70952101568898163
0.37069961704758136 0.54239942614764391
0.37842335661933879 0.5514211...

result:

ok OK

Test #25:

score: 0
Accepted
time: 1ms
memory: 4096kb

input:

42
3
0.023946458177 0.001644458456
0.052848741781 0.000000000000
0.000000000000 0.033937501244
4
0.000000000000 0.437888290711
0.220437603206 0.000000000000
0.252072649283 0.037291610744
0.214541156503 0.387891843578
5
0.056385180666 0.000000000000
0.307613101005 0.119085407065
0.324470389249 0.5126...

output:

0.95417585129228488 0.67312126711150444
0.92899840795045185 0.65883341955135566
0.99180545464208769 0.65896900851244045

0.67591030112135253 0.99999999999445244
0.18566659433437349 0.99999999999256362
0.20475099220098317 0.95497527200673993
0.53478498702603661 0.83085154957263219

0 0
0.278023024466...

result:

ok OK

Test #26:

score: 0
Accepted
time: 1ms
memory: 4096kb

input:

47
4
0.000000000000 0.000000000000
0.240721682184 0.063972715782
0.212144051267 0.142587916515
0.194188982632 0.164356993645
3
0.000000000000 0.007329294278
0.004097455454 0.000000000000
0.012808348423 0.004742705864
4
0.000000000000 0.191434375054
0.194726601227 0.006150268983
0.209266332239 0.0000...

output:

1.7821577547039169e-11 0.9989178707437667
6.6519567631928567e-12 0.74984070069517128
0.083317840909366336 0.75726822804858851
0.10896821813177021 0.76902983325985852

0.8362147867700398 0.99999999999612355
0.8278179006921087 0.99999999999648503
0.82770692991691253 0.99008230869712144

0.576382215862...

result:

ok OK

Test #27:

score: 0
Accepted
time: 1ms
memory: 4096kb

input:

66
5
0.000000000000 0.005053823688
0.010340563564 0.000000000000
0.068710101615 0.119429160119
0.065718142206 0.133817342462
0.045777209397 0.180721261022
5
0.319222361577 0.160705577488
0.145577264946 0.213639327175
0.045295283323 0.175775668292
0.000000000000 0.039061839645
0.232351393621 0.000000...

output:

2.2316158106283242e-13 0.011509491243774171
0 0
0.13292978319028764 0
0.14454290108789988 0.0090059483085724642
0.17792708676125513 0.047517174262871942

2.2316158106283242e-13 0.011509491243774171
0.17792708676125513 0.047517174262871942
0.24813977989632807 0.12851291627983866
0.22297447245645582 0...

result:

ok OK

Test #28:

score: 0
Accepted
time: 1ms
memory: 4224kb

input:

65
3
0.000000000000 0.037227150695
0.041112144465 0.000000000000
0.053670737603 0.076203761999
4
0.225553825935 0.000000000000
0.223161633995 0.030611367046
0.001148070858 0.117279311869
0.000000000000 0.054401518608
3
0.131607859592 0.000000000000
0.015270081138 0.023579309412
0.000000000000 0.0133...

output:

0.82495260808390847 1
0.76949028599409386 1
0.81133019007008889 0.93508348415618547

0.91238352793118116 0.31372309675453847
0.91577250229154439 0.34424019405418493
0.71394297460421119 0.47099269555485535
0.7010274769915622 0.40944495088503757

0.87001933348039739 0.80364496919006401
0.7702515518511...

result:

ok OK

Test #29:

score: 0
Accepted
time: 0ms
memory: 4224kb

input:

87
3
0.000000000000 0.015182039322
0.008005468111 0.000000000000
0.008505409967 0.010237923361
3
0.006579715319 0.000000000000
0.016526460362 0.024920112337
0.000000000000 0.034862041390
4
0.000000000000 0.113613541825
0.016977010685 0.055116049444
0.095225367059 0.000000000000
0.088645927138 0.0572...

output:

0.57070854434392582 0.42850611684060658
0.56579092899152084 0.44494992712958154
0.56332010733159632 0.43500206017719012

0.48500193981286377 0.4075603812485043
0.5002967798454836 0.42960618820111857
0.48642865105297467 0.44300920462182558

0.40984517044673108 0.56993783778017493
0.41760655121017509 ...

result:

ok OK

Test #30:

score: 0
Accepted
time: 1ms
memory: 4224kb

input:

81
3
0.000000000000 0.018267088323
0.021828432930 0.000000000000
0.065397626776 0.045720726608
6
0.015975080205 0.143941945631
0.000000000000 0.039492133537
0.018991882284 0.000000000000
0.265356466097 0.239413579318
0.222071970974 0.269301144149
0.186580330217 0.282053589632
6
0.013895601825 0.0000...

output:

1 0.11369231283376477
1 0.14215574551693069
0.93697548202819081 0.14622632533150481

0.24704098485026221 0.50237879185839351
0.15314858715868804 0.5508471742446639
0.10966083587221662 0.54544942542890729
0.25794804581294462 0.23556997547803143
0.30008470879658045 0.26705514154917182
0.32349538871341...

result:

ok OK

Test #31:

score: 0
Accepted
time: 0ms
memory: 4224kb

input:

95
5
0.047827693957 0.000000000000
0.098857399884 0.086786768459
0.102220020859 0.096330476080
0.001430528120 0.223787762853
0.000000000000 0.223443956666
3
0.041762757505 0.000000000000
0.019205931557 0.054198718204
0.000000000000 0.047533425298
4
0.013367507814 0.039249301738
0.185174533248 0.0000...

output:

0.22843395807766295 0.59003450927482348
0.15597470433012572 0.65993179543835534
0.14748101127807819 0.66543150027729892
0 0.59721688964170161
0 0.59574562712387658

0.74471693598141975 0.20480644160842132
0.68864699781216077 0.22219820697542556
0.68146420199420366 0.20317975849031422

0.513870185017...

result:

ok OK

Test #32:

score: 0
Accepted
time: 1ms
memory: 4096kb

input:

116
5
0.021396819174 0.015342509410
0.001564438290 0.039397972939
0.000000000000 0.014915990992
0.013335003291 0.000226832016
0.023349444489 0.000000000000
4
0.012103646607 0.000000000000
0.016163789301 0.004840038879
0.003320086741 0.012493169256
0.000000000000 0.005575920918
4
0.000000000000 0.054...

output:

0.070533663569950791 0.98470564133043958
0.090905687317307776 0.96110544418089305
0.091915337716710455 0.98561657457605401
0.078251122482119989 0.99999999997442679
0.068234112685518822 0.99999999997443578

0.68643712732853568 0.35980238321343938
0.69200091680159004 0.3627948707649703
0.6829042261691...

result:

ok OK

Test #33:

score: 0
Accepted
time: 0ms
memory: 4224kb

input:

133
6
0.072574557839 0.312677865325
0.001137204536 0.330688379241
0.000000000000 0.013845009228
0.004399538886 0.000000000000
0.108499348680 0.123193399648
0.163704701535 0.244778990085
4
0.003230768068 0.050209672075
0.122105847351 0.000000000000
0.133421862210 0.070986500693
0.000000000000 0.06213...

output:

0.57411508659939248 6.7910954637540044e-12
0.64778783636589543 6.5387417702567063e-12
0.57143296892797157 0.3075076398602028
0.5637822819794075 0.31985702090284224
0.49295774416051874 0.17495267673990889
0.46915104041911759 0.043560410446385783

0.46633139081130154 0.73078829392935341
0.584117357779...

result:

ok OK

Test #34:

score: 0
Accepted
time: 0ms
memory: 3968kb

input:

138
3
0.118685904723 0.066395606854
0.000000000000 0.031651747666
0.055681967637 0.000000000000
4
0.075000665916 0.000000000000
0.082124079088 0.034173858786
0.019340637052 0.077974103991
0.000000000000 0.064478480978
5
0.030628968215 0.043757686336
0.000000000000 0.024195722398
0.004477590785 0.000...

output:

0.79956425560056288 0.96606136977810453
0.71100327491654747 0.87974548232301708
0.77502545524040833 0.87788132684113251

0.73025956640584944 0.52560688322919957
0.75578488784687592 0.54941977059918279
0.72974635269908916 0.62140738593233213
0.70616296530413469 0.62153356467168985

0.5201744498068385...

result:

ok OK

Test #35:

score: 0
Accepted
time: 0ms
memory: 4224kb

input:

148
3
0.026621319141 0.000000000000
0.007296844689 0.016827125239
0.000000000000 0.012235984397
5
0.021570834617 0.000000000000
0.154819739283 0.077564199064
0.050155665830 0.113755864820
0.000000000000 0.119522929551
0.001664388533 0.009536516799
3
0.005288235752 0.016716105247
0.000000000000 0.001...

output:

0.29769458142628008 0.86486479808589589
0.30743980303232465 0.88856328142467589
0.30075203992983263 0.8940035333800147

0.48282260542994743 0.24721453442902563
0.34525487680701622 0.17759703940394206
0.4476167133769513 0.13533051179083988
0.49734792103395281 0.12663241800334304
0.50213561269887208 0...

result:

ok OK

Test #36:

score: 0
Accepted
time: 1ms
memory: 4096kb

input:

154
3
0.056906082314 0.036639142594
0.017316385181 0.066883717906
0.000000000000 0.000000000000
5
0.000062233246 0.085710539368
0.000000000000 0.085546504140
0.016747101114 0.000000000000
0.087129946292 0.060459853042
0.082449394349 0.077583985414
3
0.003341899019 0.029877838968
0.000000000000 0.007...

output:

0.55112786672942338 0.40836755753934112
0.57419818434309855 0.45252453773667639
0.50534375014475608 0.45821275432919717

0.49436312543067196 0.13272582724623838
0.49452033896944825 0.13280370173601827
0.54045026905254778 0.20689223856151431
0.44773381226510262 0.21046957920607404
0.43951327917963168...

result:

ok OK

Test #37:

score: 0
Accepted
time: 1ms
memory: 4096kb

input:

157
3
0.022975295316 0.133753786252
0.000000000000 0.000000000000
0.078583822597 0.009635574028
3
0.037772151360 0.047904437968
0.000000000000 0.024531195919
0.050382878792 0.000000000000
3
0.000000000000 0.000000000000
0.020626099645 0.002132947552
0.005061027297 0.032396497109
3
0.011486204366 0.0...

output:

0.16231578978542863 2.0981549830878521e-12
0.29802849932811826 3.5624558858415867e-12
0.27522826896878461 0.075818275876232522

0.45309720917308699 0.24048324822353623
0.45433031772743793 0.19608140923558601
0.50085285800547619 0.22732028396922346

1 0.060236274384203231
0.97995029559876101 0.054945...

result:

ok OK

Test #38:

score: 0
Accepted
time: 1ms
memory: 4224kb

input:

165
4
0.090134183082 0.025631923190
0.043091940369 0.042946264434
0.000000000000 0.000000000000
0.087801581797 0.022553046918
3
0.047090776615 0.014149434646
0.000000000000 0.013150413325
0.057969691667 0.000000000000
6
0.000000000000 0.198704670057
0.018044187015 0.071766500734
0.178666873308 0.000...

output:

0.80396279159380934 0.16836651512738404
0.78680012157110335 0.21546430456444912
0.72618132564339355 0.2206274948429012
0.80010566585529574 0.16815893649103514

0.83527561361534342 0.63979693319609765
0.79736203163358854 0.61184877428288165
0.85231966295531969 0.63449998355145565

0.45205304705622507...

result:

ok OK

Test #39:

score: 0
Accepted
time: 1ms
memory: 4224kb

input:

141
4
0.070754311340 0.076269199248
0.062424474687 0.079390660730
0.000000000000 0.006608944100
0.027761363879 0.000000000000
3
0.032333140816 0.000000000000
0.018854367463 0.075770826201
0.000000000000 0.004917529209
4
0.043452229407 0.020635378104
0.071652138659 0.000000000000
0.010439540528 0.213...

output:

0.30656350395341087 0.52088366173490919
0.31505186685692022 0.51822332422480633
0.37339447375881629 0.59431625119870857
0.34531268017602407 0.5993940790525516

0.20130502370162434 0.59239637558639502
0.27573316231027933 0.6119756405960094
0.20358419055643195 0.6250218179150111

0.43629219065659308 0...

result:

ok OK

Test #40:

score: 0
Accepted
time: 1ms
memory: 4096kb

input:

150
4
0.104430286936 0.036068594926
0.000000000000 0.072773969166
0.025770678197 0.013811311664
0.091197517141 0.000000000000
3
0.022670063559 0.000000000000
0.104750912415 0.033498179724
0.000000000000 0.018301996997
4
0.000000000000 0.033588192686
0.055509876760 0.000000000000
0.093612013862 0.164...

output:

0.79531020343874059 1
0.79681961489285402 0.88931716033287811
0.8432982974341241 0.9338194625658337
0.83372959615279396 1

0.93232970692405959 0.31804660495542941
0.84937625842610009 0.34932150186293442
0.93649894837006475 0.28921064993968426

0.85939583790274054 0.82248315381664139
0.79746719050223...

result:

ok OK

Test #41:

score: 0
Accepted
time: 0ms
memory: 4224kb

input:

151
4
0.082120886773 0.006976355697
0.071345566846 0.031392713209
0.000000000000 0.019517191355
0.053143917683 0.000000000000
3
0.000000000000 0.000000000000
0.091126171335 0.009853756763
0.057587797068 0.021670311143
3
0.007139134362 0.125189875294
0.000000000000 0.053938889174
0.089421404760 0.000...

output:

3.5727291611301782e-12 0.60116449802927685
3.6614283235246191e-12 0.57447618534923361
0.070066678132400653 0.55653521146074758
0.029326863446995997 0.59584760447612428

0.84960262033558043 0.92221174598749056
0.92134808575184779 0.97925264211345853
0.88668721078339108 0.97131052309920174

0.18460131...

result:

ok OK

Test #42:

score: 0
Accepted
time: 1ms
memory: 4224kb

input:

160
4
0.040696066791 0.047219823786
0.009305331291 0.057176448200
0.000000000000 0.056984712422
0.032268750605 0.000000000000
4
0.000000000000 0.038789020633
0.016915008366 0.016976583470
0.032763462120 0.000000000000
0.051547223008 0.019191763974
4
0.000000000000 0.000000000000
0.130172492374 0.038...

output:

0.44341810791161251 0.4319789693215062
0.43925824005496261 0.4646471211562575
0.43517301724497576 0.47300995008139163
0.39702984943257758 0.41977811313781943

0.12019401425364878 0.46650489634409614
0.1472696823928174 0.4718722157707092
0.16954337115159071 0.47844949954005084
0.16078475079656707 0.5...

result:

ok OK

Test #43:

score: 0
Accepted
time: 0ms
memory: 4224kb

input:

158
3
0.001915550667 0.000000000000
0.034028370155 0.018544352097
0.000000000000 0.005907043128
5
0.136245359655 0.128970898398
0.014463156719 0.152180580927
0.000000000000 0.017124902848
0.038946667270 0.000000000000
0.100028820871 0.046477522374
3
0.000000000000 0.000000000000
0.002176023513 0.001...

output:

0.42386854677483421 0.73338268139399787
0.45921099294451317 0.74460933134533458
0.4232642696818732 0.73956308122531877

0.1572256500592373 0.51903730676218229
0.12945365761182487 0.63986077613419901
0 0.59873937519553855
0 0.55619404420542828
0.067132408636807334 0.51898612454800086

0.8494394752809...

result:

ok OK

Test #44:

score: 0
Accepted
time: 1ms
memory: 4224kb

input:

136
3
0.000000000000 0.023909081840
0.004747357667 0.000000000000
0.037644065273 0.052155951394
3
0.019338142325 0.000000000000
0.003097556485 0.018698869165
0.000000000000 0.010189096166
3
0.089777029945 0.000000000000
0.129191001371 0.059173456144
0.000000000000 0.047646040548
3
0.003324443491 0.0...

output:

0.61088875757743077 0.64501994550363773
0.60758780580945726 0.62086864498626182
0.65568157007184236 0.65946173343786274

0.52568873010594463 0.021656863301643403
0.51367271545283089 0
0.52272871306055002 0

0.16900779354613868 0.26892785873691627
0.11355587221006766 0.22443017929475975
0.24019098863...

result:

ok OK

Test #45:

score: 0
Accepted
time: 0ms
memory: 3968kb

input:

147
4
0.000000000000 0.004988602097
0.018122462737 0.000000000000
0.054083088523 0.101958262931
0.041936821245 0.106597694731
3
0.000000000000 0.061781491377
0.042986062660 0.000000000000
0.045863729411 0.002715666325
5
0.039071319391 0.085484407189
0.000000000000 0.067403622352
0.001901523050 0.008...

output:

0.98125010082458752 0.28765545632597528
1 0.28897874278948305
1 0.39709282137834279
0.9870021628847131 0.39742803243888297

0.99999999999240241 0.64547926130693778
0.99606155456689049 0.57031781567748341
0.99999999999377032 0.57069789085787148

0.48824874039834537 0.37064151437106296
0.4724695012224...

result:

ok OK

Test #46:

score: 0
Accepted
time: 1ms
memory: 4224kb

input:

152
3
0.000000000000 0.000000000000
0.010639615111 0.022310601976
0.005074044661 0.020707084072
4
0.067107543470 0.119800061582
0.012479352939 0.177432457247
0.000000000000 0.166544695638
0.050115844889 0.000000000000
4
0.000000000000 0.062067256374
0.234459572373 0.000000000000
0.207296942934 0.082...

output:

0.018492935788136294 0.84133484984283402
0 0.85773532837625466
0 0.85194336462456444

9.7793648179411719e-13 0.14075891218087072
1.0147299667195853e-12 0.061350271399754144
0.016547238549810959 0.060667264052386781
0.094747030188979842 0.21601695391795506

0.9999999999761664 0.28356529048904233
0.99...

result:

ok OK

Test #47:

score: 0
Accepted
time: 1ms
memory: 4096kb

input:

141
6
0.328655198005 0.062850413203
0.046943207866 0.145096334586
0.000000000000 0.115104420358
0.129362518690 0.000000000000
0.235511611236 0.013330329888
0.333701001790 0.049138167929
3
0.026067824377 0.000000000000
0.059607653338 0.042772395466
0.000000000000 0.029248826459
3
0.000000000000 0.018...

output:

0.54108446140979705 0.22098027294984685
0.73420037462574361 0
0.78990656533878312 0
0.74286529993269723 0.16664575654826677
0.64623724194179122 0.21256248500287339
0.5442149979979013 0.23525211750330155

0.5737159403714629 0.7658648198454342
0.62258885249960305 0.78965213580419347
0.5630722008936579...

result:

ok OK

Test #48:

score: 0
Accepted
time: 0ms
memory: 4096kb

input:

158
4
0.024406826487 0.032172963861
0.015608274423 0.025319045425
0.000000000000 0.000000000000
0.050016028285 0.020714849837
4
0.140172916532 0.134925795210
0.025568500801 0.144618612986
0.000000000000 0.062404706178
0.168463466075 0.000000000000
4
0.046351016861 0.019411868345
0.026866241127 0.033...

output:

0.22466070896406215 0.77957572497737204
0.2319559521721902 0.77113948512318531
0.25804064253105929 0.75684748664403834
0.23479313587915407 0.80573778755819181

0.58412614996890433 0.34282769441691741
0.50878677485663049 0.42973052163956343
0.43310939136576609 0.38867192529378014
0.51025628183540062 ...

result:

ok OK

Test #49:

score: 0
Accepted
time: 0ms
memory: 4224kb

input:

136
4
0.058333638597 0.055267647262
0.018532765770 0.061375091556
0.000000000000 0.000000000000
0.047535755657 0.026462387095
4
0.158436082817 0.000000000000
0.005640697347 0.049039899629
0.000000000000 0.042779928077
0.042276568079 0.026216620864
4
0.050874635669 0.000000000000
0.072532929267 0.025...

output:

0.96013281675912154 0.52475702576130079
0.99999999992860633 0.53041547601893146
0.99999999992183464 0.59452760645895619
0.96214304342464796 0.55545387051429729

0.48684888268378063 0.85366114669688919
0.4209984339917317 0.99999999999272937
0.41257200471277655 0.99999999999259448
0.42856733191349061 ...

result:

ok OK

Test #50:

score: 0
Accepted
time: 0ms
memory: 4096kb

input:

150
4
0.050930453374 0.040675733274
0.000000000000 0.000000000000
0.090489613664 0.027030713833
0.090644214061 0.031734310584
3
0.000000000000 0.038180721417
0.102378163864 0.000000000000
0.075858452362 0.071485422261
4
0.147519116039 0.040480032340
0.000000000000 0.055626082924
0.007378810610 0.023...

output:

0.96001394124196038 0.68793214542106484
0.91044720743717378 0.64560525965499294
1 0.67559404103083431
1 0.68030017784155494

0.08270597961274874 0.91558113651749307
0 0.98698685659524588
0 0.91074080296709936

0.99999999993175348 0.82337815410443171
0.92716659863088269 0.69420157689623185
0.96001394...

result:

ok OK

Test #51:

score: 0
Accepted
time: 1ms
memory: 4224kb

input:

149
3
0.000000000000 0.009457169089
0.013227115495 0.000000000000
0.007993787855 0.013491863341
4
0.106274800461 0.000000000000
0.223840008192 0.168639770258
0.000000000000 0.284066455116
0.056537356181 0.066149676903
4
0.005819735526 0.000000000000
0.028771871972 0.025762444182
0.019086516540 0.033...

output:

0.43498526863398945 0.64747279544637659
0.4365763107910044 0.663654983691505
0.42749861053289018 0.65238495917230477

0.20376730050132805 0.45886763419742627
2.8945509962861681e-11 0.48606758713151599
1.3162304579594775e-11 0.234219083374645
0.16776980288178397 0.38434399175427614

0.293038940955820...

result:

ok OK

Test #52:

score: 0
Accepted
time: 1ms
memory: 4224kb

input:

173
5
0.162419071840 0.123170796359
0.108172711702 0.239725731867
0.046979840194 0.211245680539
0.000000000000 0.112041537218
0.034523915162 0.000000000000
4
0.043748171602 0.119042457148
0.000000000000 0.172557399870
0.031143373054 0.000000000000
0.037209742994 0.001341519136
5
0.014751437295 0.014...

output:

1.4555172518312523e-12 0.12856018271415001
0 0
0.067495783920479904 0
0.15194802800295198 0.070116944500896797
0.16792430331587729 0.18626325484871231

0.28819032800406313 0.22758972731831953
0.35355989966427492 0.25005237884965675
0.18091643085545323 0.28071503710773432
0.18006979537900553 0.274560...

result:

ok OK

Test #53:

score: 0
Accepted
time: 1ms
memory: 4224kb

input:

153
3
0.037995211990 0.073840717347
0.000000000000 0.031362395847
0.034114436013 0.000000000000
4
0.000000000000 0.008168093912
0.009033033279 0.000000000000
0.010332569236 0.000941880086
0.002932149345 0.009706794502
4
0.044746639703 0.000000000000
0.167078713538 0.004539375752
0.104202365982 0.087...

output:

0.50498985954669395 0.072250237100001696
0.45866248905236601 0.039056582970825829
0.48513580268628309 0.001022936250851765

0.76653757980471215 0.4514919147301189
0.77726236279347394 0.45726187817902147
0.77681094204801238 0.45880205710051397
0.76607152957272651 0.45477031319080891

0.94576425629609...

result:

ok OK

Test #54:

score: 0
Accepted
time: 1ms
memory: 4224kb

input:

151
3
0.000000000000 0.007505744932
0.005909417185 0.000000000000
0.021242430501 0.019227332910
5
0.003677449651 0.020790713761
0.031858768117 0.000000000000
0.031996593613 0.000431028732
0.010661229233 0.040388485236
0.000000000000 0.027804418085
4
0.000000000000 0.000092700685
0.000393953272 0.000...

output:

0.64713876552681604 0.28649369059287977
0.65526456308174719 0.28147085946369327
0.66307056257704911 0.30479162274656962

0.60016091337032762 0.22136173235393708
0.62805865523724114 0.20019202550490062
0.62820229382820769 0.20062115204844136
0.60740893396698459 0.24086332258468041
0.59657859522397749...

result:

ok OK

Test #55:

score: 0
Accepted
time: 1ms
memory: 4224kb

input:

145
4
0.101131401683 0.004239534871
0.002126395285 0.110398984452
0.000000000000 0.093429526203
0.100428648617 0.000000000000
3
0.000000000000 0.089510657057
0.025031463510 0.000000000000
0.062445965055 0.062590645816
3
0.040123598749 0.062067037262
0.000000000000 0.071414645490
0.036307712564 0.000...

output:

0.92903688721613331 0.8106174385485353
0.85588939164597444 0.68523297410091688
0.87275224955060315 0.68808395525507104
0.93329918507795506 0.81116546659196398

0.45900366410659604 1
0.36605888538087616 0.99999999999806111
0.41626063061815105 0.94711126164342097

0.99999999996176492 0.709597564710648...

result:

ok OK

Test #56:

score: 0
Accepted
time: 1ms
memory: 4096kb

input:

148
3
0.022473707689 0.010628823145
0.000000000000 0.000000000000
0.017614905907 0.003846837707
4
0.000000000000 0.087683018843
0.103166140069 0.000000000000
0.112110946314 0.008167588666
0.040918392450 0.140222920679
6
0.001360882089 0.113699841394
0.000000000000 0.111893896240
0.000530315798 0.104...

output:

0.7708806482139644 0.10954321026630078
0.76109527068120719 0.13239678340717004
0.76428411935783114 0.11465095813508462

0.45860637402421173 0.68400628807269626
0.55348511376386922 0.58741649052355049
0.56312697695756408 0.59474817092382126
0.50407584716006937 0.73266102203733341

0.18531768360086898...

result:

ok OK

Test #57:

score: 0
Accepted
time: 1ms
memory: 4224kb

input:

150
4
0.037812750287 0.118691582975
0.001602217304 0.100272318707
0.000000000000 0.092146832178
0.077894051429 0.000000000000
4
0.000000000000 0.166863616956
0.016468251275 0.000000000000
0.082759596790 0.041741422179
0.156888493136 0.122134882854
5
0.160621142263 0.000000000000
0.088097129596 0.111...

output:

0.81701782385653832 0.046014115271873185
0.80770802470376091 0.0064692087155005587
0.81287909521554258 2.4386187513769642e-12
0.93353779538292414 1.0691595178635716e-11

1.5537293673872909e-12 0.36865710799634793
8.8590246249964366e-13 0.20098281073026311
0.07007050040622137 0.23601156732618259
0.15...

result:

ok OK

Test #58:

score: 0
Accepted
time: 0ms
memory: 3968kb

input:

156
5
0.000000000000 0.016621088768
0.056901538926 0.000000000000
0.074741463499 0.160031560021
0.055981532148 0.169355988143
0.029253608240 0.115581750078
3
0.000000000000 0.000000000000
0.034035228583 0.005898946498
0.016475149241 0.023913417617
4
0.029184342947 0.061591924268
0.000000000000 0.000...

output:

0.1616887297384276 0.017850381068835939
0.15124627450906067 0.076202766219431936
0 0.020949462620711241
0 0
0.06005040046413624 0

0.37222941622151628 0.25237950748501597
0.39433940923841171 0.27891896044300452
0.36929244299703073 0.28126992584370947

0.74519210536895009 0.52264225974239154
0.795599...

result:

ok OK

Test #59:

score: 0
Accepted
time: 1ms
memory: 4224kb

input:

160
4
0.301116540960 0.000000000000
0.282162133515 0.024002994058
0.045466397780 0.130185785396
0.000000000000 0.112053345874
4
0.075018503604 0.082492555514
0.051596048309 0.096497968422
0.000000000000 0.022819865699
0.062013219697 0.000000000000
3
0.000000000000 0.005320856028
0.024433520492 0.000...

output:

0.98463463651092531 0.021533411368750199
0.97175094672849549 0.049271901286190828
0.7660614098156896 0.20735881059220243
0.71763267548429244 0.20024288612019742

0.30460407600707673 0.89259027117366008
0.279689159969368 0.90372624717679417
0.23717222157274373 0.82446134340042954
0.30144969937314547 ...

result:

ok OK

Test #60:

score: 0
Accepted
time: 0ms
memory: 4224kb

input:

151
5
0.000000000000 0.080017205009
0.038123286005 0.003287620398
0.053870922825 0.000000000000
0.030379830730 0.085418334516
0.020762689044 0.109049498312
4
0.032386625780 0.033994295628
0.005874752088 0.022289474166
0.000000000000 0.000000000000
0.032924358501 0.026248804149
6
0.263635510998 0.323...

output:

0.9326807736451681 0.51401767891451899
0.99999999997146172 0.56701707378305444
0.9999999999717768 0.58310422745509882
0.92118511811586834 0.54265255658116074
0.90001807509349796 0.52840904556102597

0.22526962548854218 0.19265876821013003
0.19696787296269988 0.18642233525147231
0.18680539170679353 0...

result:

ok OK

Test #61:

score: 0
Accepted
time: 1ms
memory: 4224kb

input:

168
3
0.000000000000 0.001146888301
0.000291100186 0.000000000000
0.000500169700 0.000557039726
3
0.209796982239 0.000000000000
0.246804544500 0.173582948482
0.000000000000 0.093418372480
3
0.005153064521 0.077315638343
0.000000000000 0.000000000000
0.018439012022 0.074752853640
4
0.000000000000 0.0...

output:

0.70102935350814943 0.20245596645120315
0.70206191077107505 0.20187811042017018
0.7018015275428402 0.20241309069328531

0 0.47804026562379515
0 0.30055618276362439
0.22466445640294902 0.43042043674004626

0.48750952838809969 0.47501618024423453
0.55942045310069166 0.44615303915969806
0.4940640609948...

result:

ok OK

Test #62:

score: 0
Accepted
time: 1ms
memory: 4096kb

input:

162
4
0.000000000000 0.000000000000
0.250910891552 0.053737344615
0.265536347277 0.114938183410
0.034457838249 0.125482144000
5
0.020476398942 0.000000000000
0.040931873605 0.069430814812
0.021599535739 0.061698637553
0.008901949037 0.053065308412
0.000000000000 0.028630811545
4
0.000000000000 0.038...

output:

0.76845094285423443 0.68831749188332347
1 0.79890235451839708
1 0.86182648840031673
0.77279927544659999 0.81837210766096014

0.69203233897207705 0.65182094589395356
0.62671750014539729 0.62062741581266445
0.64539055617957697 0.61141639898847822
0.66029915557484375 0.60774260745704589
0.6844235278977...

result:

ok OK

Test #63:

score: 0
Accepted
time: 0ms
memory: 4096kb

input:

147
3
0.001083556391 0.000000000000
0.152321287992 0.109791901403
0.000000000000 0.017044690253
3
0.003386432280 0.000421260288
0.000000000000 0.002328169275
0.002829614976 0.000000000000
4
0.000000000000 0.000000000000
0.000770412465 0.000236023713
0.061801957545 0.036052266859
0.051636396354 0.050...

output:

0.67890949863195682 0.2518529536479957
0.83097776942685253 0.14321431369485038
0.69473183991321297 0.25828327841832821

0.71991530942464199 0.56968711684237361
0.71631034021670958 0.57113915764104695
0.71941777045839028 0.56919725898817275

0.45666979893189863 0.41062255491205363
0.45703523412555985...

result:

ok OK

Test #64:

score: 0
Accepted
time: 0ms
memory: 4224kb

input:

158
4
0.008787147495 0.022483653147
0.057727560167 0.000000000000
0.069478843787 0.058464505159
0.000000000000 0.042953147789
3
0.053494024620 0.034724045645
0.000000000000 0.000000000000
0.084513534638 0.009737313038
4
0.039433456562 0.053136488521
0.000000000000 0.000000000000
0.148948017168 0.059...

output:

0.73984490706149808 0.51314873731300836
0.7230593006257322 0.56432414223551908
0.67219631973390837 0.53319299695782618
0.73080826918412745 0.49278815411772153

0.90815843097431748 9.213074747549399e-12
0.9719343669963989 8.7618870492356393e-12
0.8957443757945055 0.037847563232288862

0.8171450586874...

result:

ok OK

Test #65:

score: 0
Accepted
time: 1ms
memory: 4224kb

input:

157
3
0.012527864086 0.070302721785
0.000000000000 0.000000000000
0.032659044428 0.018927675092
4
0.000000000000 0.000000000000
0.131851381518 0.148916617985
0.113565101275 0.160310174130
0.021268067916 0.059481444005
5
0.000000000000 0.098715729102
0.012723032513 0.050579865256
0.090130202082 0.000...

output:

0.95371508092826141 0.53222166322473063
0.89412361463292378 0.57156981710690968
0.89856811302605366 0.53408493346782848

0.54470330663280064 0.34981301543835835
0.58446400476354965 0.54469768083532788
0.56293096397134279 0.54542522535256299
0.53339159133099379 0.41196137013078998

0.3824999077901301...

result:

ok OK

Extra Test:

score: 0
Extra Test Passed