QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#115175 | #5419. Triangles | UrgantTeam# | AC ✓ | 6ms | 3540kb | C++23 | 7.0kb | 2023-06-24 19:51:22 | 2023-06-24 19:51:24 |
Judging History
answer
#define _CRT_SECURE_NO_WARNINGS
#define x first
#define y second
#include <iostream>
#include <vector>
#include <tuple>
#include <random>
#include <cmath>
#include <algorithm>
using namespace std;
using pii = pair<int, int>;
using vpii = vector<pii>;
using vb = vector<bool>;
using ll = long long;
using tri = tuple<pii, pii, pii>;
using vtri = vector<tri>;
using pdd = pair<double, double>;
ll gcd(ll a, ll b) {
while (b) {
a %= b;
swap(a, b);
}
return abs(a);
}
ll operator*(pii a, pii b) {
return ll(a.x) * b.x + ll(a.y) * b.y;
}
ll operator%(pii a, pii b) {
return ll(a.x) * b.y - ll(a.y) * b.x;
}
pii operator-(const pii a, const pii b) {
return { a.x - b.x, a.y - b.y };
}
pii operator+(const pii a, const pii b) {
return { a.x + b.x, a.y + b.y };
}
pii& operator/=(pii& a, const int b) {
return a = { a.x / b, a.y / b };
}
pii operator/(pii a, const int b) {
return a /= b;
}
bool acute_angle(pii a, pii b) {
return a * b > 0;
}
bool acute_angle(pii a, pii b, pii c) {
return acute_angle(a - b, c - b);
}
bool acute_triangle(const tri& t) {
return acute_angle(get<0>(t), get<1>(t), get<2>(t)) &&
acute_angle(get<1>(t), get<2>(t), get<0>(t)) &&
acute_angle(get<2>(t), get<0>(t), get<1>(t));
}
bool acute_triangles(const vtri& v) {
for (const tri& t : v) if (!acute_triangle(t)) return false;
return true;
}
const int N = 1000000000;
const int BIG = 32, SMALL = 1;
mt19937 rng;
pii point_on_seg(pii a, pii b, int y) {
int g = gcd(a.x - b.x, a.y - b.y);
g /= gcd(g, y);
uniform_int_distribution<int> d(1, max(g - 1, 1));
int l = d(rng);
return { a.x + (b.x - a.x) / g * l, a.y + (b.y - a.y) / g * l };
}
vtri try_find_partially_obtuse_ans(const int k) {
pii a = { 0, 0 }, b = { N, 0 }, c = { N, N }, d = { 0, N };
if (k == 4) {
pii e = c / 2;
pii f = d / 2;
pii g = point_on_seg(e, f, BIG);
return {
{a, b, g},
{b, c, g},
{c, d, g},
{g, d, a},
};
}
if (k == 5) {
pii e = c / 2;
pii f = d / 2;
pii g = point_on_seg(e, f, BIG);
pii q = point_on_seg(f, d, BIG);
return {
{a, b, g},
{b, c, g},
{c, d, g},
{q, a, g},
{q, g, d},
};
}
if (k == 6) {
pii e = c / 2;
pii f = d / 2;
pii h = point_on_seg(a, e, BIG);
pii s = point_on_seg(f, a, BIG);
pii ss = { s.y, s.x };
return {
{ss, b, h},
{h, b, c},
{d, h, c},
{s, h, d},
{s, ss, h},
{a, ss, s},
};
}
return {};
}
bool ccw(pii a, pii b) {
return a % b > 0;
}
bool ccw(pii a, pii b, pii c) {
return ccw(c - b, a - b);
}
bool inside(pii a, pii b, pii c, pii z) {
return ccw(a, b, z) && ccw(b, c, z) && ccw(c, a, z);
}
pii point_in_tri(pii a, pii b, pii c) {
while (true) {
uniform_real_distribution<double> d(0, 1);
double A = d(rng), B = d(rng), C = d(rng);
double S = A + B + C; A /= S; B /= S; C /= S;
pdd z{ a.x * A + b.x * B + c.x * C, a.y * A + b.y * B + c.y * C };
pii zz{ round(z.x), round(z.y) };
if (inside(a, b, c, z)) return zz;
}
}
vtri try_to_break(const tri& t) { // first angle is obtuse, all triangles are ccw
pii a = get<0>(t), b = get<1>(t), c = get<2>(t);
for (int i = 0; i < 30; ++i) {
pii e = point_on_seg(a, b, SMALL);
pii f = point_on_seg(b, c, SMALL);
pii g = point_on_seg(f, c, SMALL);
pii h = point_on_seg(a, c, SMALL);
pii d = point_in_tri(a, b, c);
vtri ans = {
{a, e, d},
{b, f, e},
{f, d, e},
{f, g, d},
{g, c, h},
{g, h, d},
{d, h, a},
};
if (acute_triangles(ans)) return ans;
}
return {};
}
vtri try_divide(const tri& t, const int k) {
if (k == 4) {
pii ab = get<1>(t) - get<0>(t);
pii ac = get<2>(t) - get<0>(t);
if (ab.x % 2 || ab.y % 2 || ac.x % 2 || ac.y % 2) return {};
ab /= 2;
ac /= 2;
pii a = get<0>(t), b = get<1>(t), c = get<2>(t);
pii A = get<0>(t) + ab + ac, B = get<0>(t) + ac, C = get<0>(t) + ab;
return {
{a, C, B},
{b, A, C},
{c, B, A},
{A, B, C},
};
}
else
return {};
}
vtri try_find_triv_ans(const int k) {
pii a = { 0, 0 }, b = { N, 0 }, c = { N, N }, d = { 0, N };
if (k == 8) {
pii e = (c + d) / 2;
pii f = (a + b) / 2;
pii g = point_in_tri(d, f, e);
pii gg = {N - g.x, g.y};
return {
{a, f, g},
{a, g, d},
{d, g, e},
{g, gg, e},
{e,gg, c},
{gg, b, c},
{f, b, gg},
{g, f, gg},
};
}
if (k == 9) {
pii e = c / 2;
pii f = d / 2;
pii g = point_on_seg(d, e, BIG);
pii q = point_on_seg(a, g, BIG);
pii r = point_in_tri(a, g, d);
pii x = point_on_seg({r.x, N}, {g.x, N}, BIG);
pii y = point_on_seg(a, d, BIG);
return {
{g, b, c},
{x, g, c},
{r, g, x},
{d, r, x},
{y, r, d},
{y, q, r},
{r, q, g},
{y, a, q},
{a, b, g},
};
}
}
vtri try_find_ans(const int k) {
if (k == 8 || k == 9) {
vtri ans = try_find_triv_ans(k);
if (!acute_triangles(ans)) return {};
return ans;
}
if (k <= 12) {
vtri ans = try_find_partially_obtuse_ans(k - 6);
if (ans.empty()) return {};
tri last = ans.back();
ans.pop_back();
vtri broken = try_to_break(last);
if (broken.empty()) return {};
for (const tri& t : broken) ans.push_back(t);
if (!acute_triangles(ans)) return {};
return ans;
}
vtri ans = try_find_ans(k - 3);
if (ans.empty()) return {};
for (int i = 0; i < ans.size(); ++i) {
vtri g = try_divide(ans[i], 4);
if (!g.empty()) {
ans.erase(ans.begin() + i);
for (const tri& t : g) ans.push_back(t);
return ans;
}
}
return {};
}
vtri find_ans(const int k) {
if (k <= 7) return {};
while (true) {
vtri t = try_find_ans(k);
if (!t.empty())
return t;
}
}
ostream& operator<<(ostream& out, const pii& p) {
return out << p.x << ' ' << p.y;
}
ostream& operator<<(ostream& out, const tri& t) {
return out << get<0>(t) << ' ' << get<1>(t) << ' ' << get<2>(t);
}
void solve() {
int k;
cin >> k;
vtri ans = find_ans(k);
if (ans.empty()) cout << "No\n";
else {
cout << "Yes\n";
for (const tri& t : ans)
cout << t << '\n';
}
}
bool constr(const int x) {
return x >= 0 && x <= N;
}
bool constr(const pii& p) {
return constr(p.x) && constr(p.y);
}
bool constr(const tri& t) {
return constr(get<0>(t)) && constr(get<1>(t)) && constr(get<2>(t));
}
bool constr(const vtri & v) {
for (const tri& t : v) {
if (!constr(t)) return false;
}
return true;
}
ll find_area(const tri& t) {
return (get<2>(t) - get<1>(t)) % (get<0>(t) - get<1>(t));
}
ll sum_area(const vtri& v) {
ll ans = 0;
for (const tri& t : v) {
ans += find_area(t);
}
return ans;
}
void stress() {
for (int k = 8; k <= 50; ++k) {
vtri ans = find_ans(k);
cerr << k << " is ";
if (acute_triangles(ans) && ans.size() == k && constr(ans) && sum_area(ans) == ll(N) * N * 2) {
cerr << "OK\n";
}
else {
cerr << "FAIL " << sum_area(ans) << "\n";
return;
}
}
}
int main() {
#ifdef ONPC
freopen("input.txt", "r", stdin);
freopen("output.txt", "w", stdout);
#endif
ios::sync_with_stdio(false);
cin.tie(nullptr);
#ifdef ONPC
stress();
#endif
solve();
}
详细
Test #1:
score: 100
Accepted
time: 1ms
memory: 3428kb
input:
2
output:
No
result:
ok no solution
Test #2:
score: 0
Accepted
time: 5ms
memory: 3496kb
input:
24
output:
Yes 0 188197952 188197952 0 311791328 311791328 0 0 102209124 0 90323183 38849135 188197952 0 137443842 50754110 102209124 0 137443842 50754110 90323183 38849135 102209124 0 137443842 50754110 85394515 102803437 90323183 38849135 85394515 102803437 0 188197952 0 70185343 85394515 102803437 0 7018534...
result:
ok 24 acute triangles
Test #3:
score: 0
Accepted
time: 1ms
memory: 3460kb
input:
1
output:
No
result:
ok no solution
Test #4:
score: 0
Accepted
time: 1ms
memory: 3436kb
input:
3
output:
No
result:
ok no solution
Test #5:
score: 0
Accepted
time: 0ms
memory: 3452kb
input:
4
output:
No
result:
ok no solution
Test #6:
score: 0
Accepted
time: 1ms
memory: 3468kb
input:
5
output:
No
result:
ok no solution
Test #7:
score: 0
Accepted
time: 1ms
memory: 3420kb
input:
6
output:
No
result:
ok no solution
Test #8:
score: 0
Accepted
time: 1ms
memory: 3456kb
input:
7
output:
No
result:
ok no solution
Test #9:
score: 0
Accepted
time: 1ms
memory: 3496kb
input:
8
output:
Yes 0 0 500000000 0 496840546 851436158 0 0 496840546 851436158 0 1000000000 0 1000000000 496840546 851436158 500000000 1000000000 496840546 851436158 503159454 851436158 500000000 1000000000 500000000 1000000000 503159454 851436158 1000000000 1000000000 503159454 851436158 1000000000 0 1000000000 1...
result:
ok 8 acute triangles
Test #10:
score: 0
Accepted
time: 3ms
memory: 3428kb
input:
9
output:
Yes 393934208 606065792 1000000000 0 1000000000 1000000000 299069194 1000000000 393934208 606065792 1000000000 1000000000 245922391 605979890 393934208 606065792 299069194 1000000000 0 1000000000 245922391 605979890 299069194 1000000000 0 523017664 245922391 605979890 0 1000000000 0 523017664 295450...
result:
ok 9 acute triangles
Test #11:
score: 0
Accepted
time: 2ms
memory: 3476kb
input:
10
output:
Yes 0 0 1000000000 0 474518784 500000000 1000000000 0 1000000000 1000000000 474518784 500000000 1000000000 1000000000 0 1000000000 474518784 500000000 474518784 500000000 242820159 744140625 105025073 487318112 0 1000000000 0 613053719 242820159 744140625 0 613053719 105025073 487318112 242820159 74...
result:
ok 10 acute triangles
Test #12:
score: 0
Accepted
time: 2ms
memory: 3456kb
input:
11
output:
Yes 0 0 1000000000 0 458406592 500000000 1000000000 0 1000000000 1000000000 458406592 500000000 1000000000 1000000000 0 1000000000 458406592 500000000 0 593178752 0 0 458406592 500000000 0 593178752 265016311 539309786 142175271 709195147 458406592 500000000 315154532 656250000 265016311 539309786 3...
result:
ok 11 acute triangles
Test #13:
score: 0
Accepted
time: 5ms
memory: 3500kb
input:
12
output:
Yes 188197952 0 1000000000 0 311791328 311791328 311791328 311791328 1000000000 0 1000000000 1000000000 0 1000000000 311791328 311791328 1000000000 1000000000 0 188197952 311791328 311791328 0 1000000000 0 188197952 188197952 0 311791328 311791328 0 0 102209124 0 90323183 38849135 188197952 0 137443...
result:
ok 12 acute triangles
Test #14:
score: 0
Accepted
time: 2ms
memory: 3472kb
input:
13
output:
Yes 1000000000 0 1000000000 1000000000 474518784 500000000 1000000000 1000000000 0 1000000000 474518784 500000000 474518784 500000000 242820159 744140625 105025073 487318112 0 1000000000 0 613053719 242820159 744140625 0 613053719 105025073 487318112 242820159 744140625 0 613053719 0 402207954 10502...
result:
ok 13 acute triangles
Test #15:
score: 0
Accepted
time: 2ms
memory: 3440kb
input:
14
output:
Yes 1000000000 0 1000000000 1000000000 458406592 500000000 1000000000 1000000000 0 1000000000 458406592 500000000 0 593178752 0 0 458406592 500000000 0 593178752 265016311 539309786 142175271 709195147 458406592 500000000 315154532 656250000 265016311 539309786 315154532 656250000 142175271 70919514...
result:
ok 14 acute triangles
Test #16:
score: 0
Accepted
time: 2ms
memory: 3420kb
input:
15
output:
Yes 311791328 311791328 1000000000 0 1000000000 1000000000 0 1000000000 311791328 311791328 1000000000 1000000000 0 188197952 311791328 311791328 0 1000000000 0 188197952 188197952 0 311791328 311791328 0 0 102209124 0 90323183 38849135 188197952 0 137443842 50754110 102209124 0 137443842 50754110 9...
result:
ok 15 acute triangles
Test #17:
score: 0
Accepted
time: 2ms
memory: 3524kb
input:
16
output:
Yes 1000000000 1000000000 0 1000000000 474518784 500000000 474518784 500000000 242820159 744140625 105025073 487318112 0 1000000000 0 613053719 242820159 744140625 0 613053719 105025073 487318112 242820159 744140625 0 613053719 0 402207954 105025073 487318112 0 402207954 0 0 239112981 251953125 0 40...
result:
ok 16 acute triangles
Test #18:
score: 0
Accepted
time: 2ms
memory: 3472kb
input:
17
output:
Yes 1000000000 1000000000 0 1000000000 458406592 500000000 0 593178752 0 0 458406592 500000000 0 593178752 265016311 539309786 142175271 709195147 458406592 500000000 315154532 656250000 265016311 539309786 315154532 656250000 142175271 709195147 265016311 539309786 315154532 656250000 179065075 804...
result:
ok 17 acute triangles
Test #19:
score: 0
Accepted
time: 5ms
memory: 3496kb
input:
18
output:
Yes 0 1000000000 311791328 311791328 1000000000 1000000000 0 188197952 311791328 311791328 0 1000000000 0 188197952 188197952 0 311791328 311791328 0 0 102209124 0 90323183 38849135 188197952 0 137443842 50754110 102209124 0 137443842 50754110 90323183 38849135 102209124 0 137443842 50754110 8539451...
result:
ok 18 acute triangles
Test #20:
score: 0
Accepted
time: 2ms
memory: 3496kb
input:
19
output:
Yes 474518784 500000000 242820159 744140625 105025073 487318112 0 1000000000 0 613053719 242820159 744140625 0 613053719 105025073 487318112 242820159 744140625 0 613053719 0 402207954 105025073 487318112 0 402207954 0 0 239112981 251953125 0 402207954 239112981 251953125 105025073 487318112 1050250...
result:
ok 19 acute triangles
Test #21:
score: 0
Accepted
time: 2ms
memory: 3524kb
input:
20
output:
Yes 0 593178752 0 0 458406592 500000000 0 593178752 265016311 539309786 142175271 709195147 458406592 500000000 315154532 656250000 265016311 539309786 315154532 656250000 142175271 709195147 265016311 539309786 315154532 656250000 179065075 804687500 142175271 709195147 179065075 804687500 0 100000...
result:
ok 20 acute triangles
Test #22:
score: 0
Accepted
time: 6ms
memory: 3524kb
input:
21
output:
Yes 0 188197952 311791328 311791328 0 1000000000 0 188197952 188197952 0 311791328 311791328 0 0 102209124 0 90323183 38849135 188197952 0 137443842 50754110 102209124 0 137443842 50754110 90323183 38849135 102209124 0 137443842 50754110 85394515 102803437 90323183 38849135 85394515 102803437 0 1881...
result:
ok 21 acute triangles
Test #23:
score: 0
Accepted
time: 2ms
memory: 3540kb
input:
22
output:
Yes 474518784 500000000 242820159 744140625 105025073 487318112 0 1000000000 0 613053719 242820159 744140625 0 613053719 105025073 487318112 242820159 744140625 0 613053719 0 402207954 105025073 487318112 0 402207954 0 0 239112981 251953125 0 402207954 239112981 251953125 105025073 487318112 1050250...
result:
ok 22 acute triangles
Test #24:
score: 0
Accepted
time: 2ms
memory: 3436kb
input:
23
output:
Yes 0 593178752 265016311 539309786 142175271 709195147 458406592 500000000 315154532 656250000 265016311 539309786 315154532 656250000 142175271 709195147 265016311 539309786 315154532 656250000 179065075 804687500 142175271 709195147 179065075 804687500 0 1000000000 0 800085365 179065075 804687500...
result:
ok 23 acute triangles
Test #25:
score: 0
Accepted
time: 2ms
memory: 3432kb
input:
25
output:
Yes 474518784 500000000 242820159 744140625 105025073 487318112 0 1000000000 0 613053719 242820159 744140625 0 613053719 105025073 487318112 242820159 744140625 0 613053719 0 402207954 105025073 487318112 0 402207954 0 0 239112981 251953125 0 402207954 239112981 251953125 105025073 487318112 1050250...
result:
ok 25 acute triangles
Test #26:
score: 0
Accepted
time: 2ms
memory: 3496kb
input:
26
output:
Yes 0 593178752 265016311 539309786 142175271 709195147 458406592 500000000 315154532 656250000 265016311 539309786 315154532 656250000 142175271 709195147 265016311 539309786 315154532 656250000 179065075 804687500 142175271 709195147 179065075 804687500 0 1000000000 0 800085365 179065075 804687500...
result:
ok 26 acute triangles
Test #27:
score: 0
Accepted
time: 5ms
memory: 3496kb
input:
27
output:
Yes 0 0 102209124 0 90323183 38849135 188197952 0 137443842 50754110 102209124 0 137443842 50754110 90323183 38849135 102209124 0 137443842 50754110 85394515 102803437 90323183 38849135 85394515 102803437 0 188197952 0 70185343 85394515 102803437 0 70185343 90323183 38849135 90323183 38849135 0 7018...
result:
ok 27 acute triangles
Test #28:
score: 0
Accepted
time: 2ms
memory: 3400kb
input:
28
output:
Yes 474518784 500000000 242820159 744140625 105025073 487318112 0 1000000000 0 613053719 242820159 744140625 0 613053719 105025073 487318112 242820159 744140625 0 613053719 0 402207954 105025073 487318112 0 402207954 0 0 239112981 251953125 0 402207954 239112981 251953125 105025073 487318112 1050250...
result:
ok 28 acute triangles
Test #29:
score: 0
Accepted
time: 2ms
memory: 3472kb
input:
29
output:
Yes 0 593178752 265016311 539309786 142175271 709195147 458406592 500000000 315154532 656250000 265016311 539309786 315154532 656250000 142175271 709195147 265016311 539309786 315154532 656250000 179065075 804687500 142175271 709195147 179065075 804687500 0 1000000000 0 800085365 179065075 804687500...
result:
ok 29 acute triangles
Test #30:
score: 0
Accepted
time: 6ms
memory: 3432kb
input:
30
output:
Yes 0 0 102209124 0 90323183 38849135 137443842 50754110 90323183 38849135 102209124 0 137443842 50754110 85394515 102803437 90323183 38849135 85394515 102803437 0 188197952 0 70185343 85394515 102803437 0 70185343 90323183 38849135 90323183 38849135 0 70185343 0 0 188197952 0 594098976 0 249994640 ...
result:
ok 30 acute triangles
Test #31:
score: 0
Accepted
time: 2ms
memory: 3460kb
input:
31
output:
Yes 474518784 500000000 242820159 744140625 105025073 487318112 0 1000000000 0 613053719 242820159 744140625 0 613053719 105025073 487318112 242820159 744140625 0 613053719 0 402207954 105025073 487318112 0 402207954 0 0 239112981 251953125 0 402207954 239112981 251953125 105025073 487318112 1050250...
result:
ok 31 acute triangles
Test #32:
score: 0
Accepted
time: 2ms
memory: 3468kb
input:
32
output:
Yes 0 593178752 265016311 539309786 142175271 709195147 458406592 500000000 315154532 656250000 265016311 539309786 315154532 656250000 142175271 709195147 265016311 539309786 315154532 656250000 179065075 804687500 142175271 709195147 179065075 804687500 0 1000000000 0 800085365 179065075 804687500...
result:
ok 32 acute triangles
Test #33:
score: 0
Accepted
time: 5ms
memory: 3468kb
input:
33
output:
Yes 0 0 102209124 0 90323183 38849135 137443842 50754110 90323183 38849135 102209124 0 137443842 50754110 85394515 102803437 90323183 38849135 85394515 102803437 0 188197952 0 70185343 85394515 102803437 0 70185343 90323183 38849135 90323183 38849135 0 70185343 0 0 1000000000 0 655895664 155895664 5...
result:
ok 33 acute triangles
Test #34:
score: 0
Accepted
time: 2ms
memory: 3464kb
input:
34
output:
Yes 474518784 500000000 242820159 744140625 105025073 487318112 0 1000000000 0 613053719 242820159 744140625 0 613053719 105025073 487318112 242820159 744140625 0 613053719 0 402207954 105025073 487318112 0 402207954 0 0 239112981 251953125 0 402207954 239112981 251953125 105025073 487318112 1050250...
result:
ok 34 acute triangles
Test #35:
score: 0
Accepted
time: 2ms
memory: 3504kb
input:
35
output:
Yes 0 593178752 265016311 539309786 142175271 709195147 458406592 500000000 315154532 656250000 265016311 539309786 315154532 656250000 142175271 709195147 265016311 539309786 315154532 656250000 179065075 804687500 142175271 709195147 179065075 804687500 0 1000000000 0 800085365 179065075 804687500...
result:
ok 35 acute triangles
Test #36:
score: 0
Accepted
time: 5ms
memory: 3480kb
input:
36
output:
Yes 0 0 102209124 0 90323183 38849135 137443842 50754110 90323183 38849135 102209124 0 137443842 50754110 85394515 102803437 90323183 38849135 85394515 102803437 0 188197952 0 70185343 85394515 102803437 0 70185343 90323183 38849135 90323183 38849135 0 70185343 0 0 311791328 311791328 249994640 1558...
result:
ok 36 acute triangles
Test #37:
score: 0
Accepted
time: 2ms
memory: 3456kb
input:
37
output:
Yes 474518784 500000000 242820159 744140625 105025073 487318112 0 1000000000 0 613053719 242820159 744140625 0 613053719 105025073 487318112 242820159 744140625 0 613053719 0 402207954 105025073 487318112 0 402207954 0 0 239112981 251953125 0 402207954 239112981 251953125 105025073 487318112 1050250...
result:
ok 37 acute triangles
Test #38:
score: 0
Accepted
time: 2ms
memory: 3480kb
input:
38
output:
Yes 0 593178752 265016311 539309786 142175271 709195147 458406592 500000000 315154532 656250000 265016311 539309786 315154532 656250000 142175271 709195147 265016311 539309786 315154532 656250000 179065075 804687500 142175271 709195147 179065075 804687500 0 1000000000 0 800085365 179065075 804687500...
result:
ok 38 acute triangles
Test #39:
score: 0
Accepted
time: 5ms
memory: 3468kb
input:
39
output:
Yes 0 0 102209124 0 90323183 38849135 137443842 50754110 90323183 38849135 102209124 0 137443842 50754110 85394515 102803437 90323183 38849135 85394515 102803437 0 188197952 0 70185343 85394515 102803437 0 70185343 90323183 38849135 90323183 38849135 0 70185343 0 0 655895664 155895664 249994640 1558...
result:
ok 39 acute triangles
Test #40:
score: 0
Accepted
time: 1ms
memory: 3432kb
input:
40
output:
Yes 474518784 500000000 242820159 744140625 105025073 487318112 0 1000000000 0 613053719 242820159 744140625 0 613053719 105025073 487318112 242820159 744140625 0 613053719 0 402207954 105025073 487318112 0 402207954 0 0 239112981 251953125 0 402207954 239112981 251953125 105025073 487318112 1050250...
result:
ok 40 acute triangles
Test #41:
score: 0
Accepted
time: 2ms
memory: 3460kb
input:
41
output:
Yes 0 593178752 265016311 539309786 142175271 709195147 458406592 500000000 315154532 656250000 265016311 539309786 315154532 656250000 142175271 709195147 265016311 539309786 315154532 656250000 179065075 804687500 142175271 709195147 179065075 804687500 0 1000000000 0 800085365 179065075 804687500...
result:
ok 41 acute triangles
Test #42:
score: 0
Accepted
time: 5ms
memory: 3528kb
input:
42
output:
Yes 0 0 102209124 0 90323183 38849135 137443842 50754110 90323183 38849135 102209124 0 137443842 50754110 85394515 102803437 90323183 38849135 85394515 102803437 0 188197952 0 70185343 85394515 102803437 0 70185343 90323183 38849135 90323183 38849135 0 70185343 0 0 311791328 311791328 655895664 1558...
result:
ok 42 acute triangles
Test #43:
score: 0
Accepted
time: 2ms
memory: 3500kb
input:
43
output:
Yes 474518784 500000000 242820159 744140625 105025073 487318112 0 1000000000 0 613053719 242820159 744140625 0 613053719 105025073 487318112 242820159 744140625 0 613053719 0 402207954 105025073 487318112 0 402207954 0 0 239112981 251953125 0 402207954 239112981 251953125 105025073 487318112 1050250...
result:
ok 43 acute triangles
Test #44:
score: 0
Accepted
time: 2ms
memory: 3456kb
input:
44
output:
Yes 0 593178752 265016311 539309786 142175271 709195147 458406592 500000000 315154532 656250000 265016311 539309786 315154532 656250000 142175271 709195147 265016311 539309786 315154532 656250000 179065075 804687500 142175271 709195147 179065075 804687500 0 1000000000 0 800085365 179065075 804687500...
result:
ok 44 acute triangles
Test #45:
score: 0
Accepted
time: 4ms
memory: 3440kb
input:
45
output:
Yes 0 0 102209124 0 90323183 38849135 137443842 50754110 90323183 38849135 102209124 0 137443842 50754110 85394515 102803437 90323183 38849135 85394515 102803437 0 188197952 0 70185343 85394515 102803437 0 70185343 90323183 38849135 90323183 38849135 0 70185343 0 0 1000000000 0 1000000000 500000000 ...
result:
ok 45 acute triangles
Test #46:
score: 0
Accepted
time: 1ms
memory: 3496kb
input:
46
output:
Yes 474518784 500000000 242820159 744140625 105025073 487318112 0 1000000000 0 613053719 242820159 744140625 0 613053719 105025073 487318112 242820159 744140625 0 613053719 0 402207954 105025073 487318112 0 402207954 0 0 239112981 251953125 0 402207954 239112981 251953125 105025073 487318112 1050250...
result:
ok 46 acute triangles
Test #47:
score: 0
Accepted
time: 2ms
memory: 3468kb
input:
47
output:
Yes 0 593178752 265016311 539309786 142175271 709195147 458406592 500000000 315154532 656250000 265016311 539309786 315154532 656250000 142175271 709195147 265016311 539309786 315154532 656250000 179065075 804687500 142175271 709195147 179065075 804687500 0 1000000000 0 800085365 179065075 804687500...
result:
ok 47 acute triangles
Test #48:
score: 0
Accepted
time: 2ms
memory: 3488kb
input:
48
output:
Yes 0 0 102209124 0 90323183 38849135 137443842 50754110 90323183 38849135 102209124 0 137443842 50754110 85394515 102803437 90323183 38849135 85394515 102803437 0 188197952 0 70185343 85394515 102803437 0 70185343 90323183 38849135 90323183 38849135 0 70185343 0 0 1000000000 1000000000 655895664 65...
result:
ok 48 acute triangles
Test #49:
score: 0
Accepted
time: 2ms
memory: 3440kb
input:
49
output:
Yes 474518784 500000000 242820159 744140625 105025073 487318112 0 1000000000 0 613053719 242820159 744140625 0 613053719 105025073 487318112 242820159 744140625 0 613053719 0 402207954 105025073 487318112 0 402207954 0 0 239112981 251953125 0 402207954 239112981 251953125 105025073 487318112 1050250...
result:
ok 49 acute triangles
Test #50:
score: 0
Accepted
time: 2ms
memory: 3440kb
input:
50
output:
Yes 0 593178752 265016311 539309786 142175271 709195147 458406592 500000000 315154532 656250000 265016311 539309786 315154532 656250000 142175271 709195147 265016311 539309786 315154532 656250000 179065075 804687500 142175271 709195147 179065075 804687500 0 1000000000 0 800085365 179065075 804687500...
result:
ok 50 acute triangles