QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#253283 | #4569. Connect the Points | LaStataleBlue# | AC ✓ | 1ms | 3480kb | C++20 | 1.2kb | 2023-11-16 20:48:52 | 2023-11-16 20:48:53 |
Judging History
answer
#pragma ide diagnostic ignored "misc-no-recursion"
#include "bits/stdc++.h"
using namespace std;
typedef long long ll;
typedef double db;
#define x first
#define y second
#define TESTCASE 0
static constexpr int INF = 1e9;
static void solve([[maybe_unused]] int tc) {
array<pair<int, int>, 3> P;
for (auto &p: P) {
cin >> p.x >> p.y;
}
sort(P.begin(), P.end());
vector<array<int, 4>> res;
res.push_back({
P[1].x, min({P[0].y, P[1].y, P[2].y}),
P[1].x, max({P[0].y, P[1].y, P[2].y})
});
if (P[0].x != P[1].x) {
res.push_back({P[0].x, P[0].y, P[1].x, P[0].y});
}
if (P[1].x != P[2].x) {
res.push_back({P[2].x, P[2].y, P[1].x, P[2].y});
}
cout << res.size() << '\n';
for (auto &r: res) {
cout << r[0] << ' ' << r[1] << ' ' << r[2] << ' ' << r[3] << '\n';
}
}
int main() {
ios::sync_with_stdio(false);
if (const char *f = getenv("REDIRECT_STDOUT"); f) {
freopen(f, "w", stdout);
}
int T = 1;
#if TESTCASE
cin >> T;
#endif
for (int t = 1; t <= T; t++) {
solve(t);
}
return 0;
}
详细
Test #1:
score: 100
Accepted
time: 1ms
memory: 3404kb
input:
1 1 3 5 8 6
output:
3 3 1 3 6 1 1 3 1 8 6 3 6
result:
ok Total length is 12
Test #2:
score: 0
Accepted
time: 0ms
memory: 3420kb
input:
1 1 2 2 3 3
output:
3 2 1 2 3 1 1 2 1 3 3 2 3
result:
ok Total length is 4
Test #3:
score: 0
Accepted
time: 1ms
memory: 3424kb
input:
1 1 2 3 3 2
output:
3 2 1 2 3 1 1 2 1 3 2 2 2
result:
ok Total length is 4
Test #4:
score: 0
Accepted
time: 1ms
memory: 3440kb
input:
1 2 2 1 3 3
output:
3 2 1 2 3 1 2 2 2 3 3 2 3
result:
ok Total length is 4
Test #5:
score: 0
Accepted
time: 0ms
memory: 3344kb
input:
1 2 2 3 3 1
output:
3 2 1 2 3 1 2 2 2 3 1 2 1
result:
ok Total length is 4
Test #6:
score: 0
Accepted
time: 0ms
memory: 3424kb
input:
1 3 2 1 3 2
output:
3 2 1 2 3 1 3 2 3 3 2 2 2
result:
ok Total length is 4
Test #7:
score: 0
Accepted
time: 0ms
memory: 3408kb
input:
1 3 2 2 3 1
output:
3 2 1 2 3 1 3 2 3 3 1 2 1
result:
ok Total length is 4
Test #8:
score: 0
Accepted
time: 0ms
memory: 3476kb
input:
-811089219 -147580223 -131318959 -47863115 180743101 601547107
output:
3 -131318959 -147580223 -131318959 601547107 -811089219 -147580223 -131318959 -147580223 180743101 601547107 -131318959 601547107
result:
ok Total length is 1740959650
Test #9:
score: 0
Accepted
time: 0ms
memory: 3388kb
input:
-953648657 -254962225 -198962039 539064186 536177467 -81912224
output:
3 -198962039 -254962225 -198962039 539064186 -953648657 -254962225 -198962039 -254962225 536177467 -81912224 -198962039 -81912224
result:
ok Total length is 2283852535
Test #10:
score: 0
Accepted
time: 1ms
memory: 3480kb
input:
170075350 644693857 -70945648 -531201615 -813420873 75995752
output:
3 -70945648 -531201615 -70945648 644693857 -813420873 75995752 -70945648 75995752 170075350 644693857 -70945648 644693857
result:
ok Total length is 2159391695
Test #11:
score: 0
Accepted
time: 0ms
memory: 3368kb
input:
-598308052 155442794 -752953801 111986435 782202531 -333732768
output:
3 -598308052 -333732768 -598308052 155442794 -752953801 111986435 -598308052 111986435 782202531 -333732768 -598308052 -333732768
result:
ok Total length is 2024331894
Test #12:
score: 0
Accepted
time: 1ms
memory: 3436kb
input:
140537651 392873314 856272625 199854620 284394957 -862945504
output:
3 284394957 -862945504 284394957 392873314 140537651 392873314 284394957 392873314 856272625 199854620 284394957 199854620
result:
ok Total length is 1971553792
Test #13:
score: 0
Accepted
time: 0ms
memory: 3368kb
input:
-531600195 66788696 495972018 -828643104 -537934741 235845303
output:
3 -531600195 -828643104 -531600195 235845303 -537934741 235845303 -531600195 235845303 495972018 -828643104 -531600195 -828643104
result:
ok Total length is 2098395166
Test #14:
score: 0
Accepted
time: 1ms
memory: 3392kb
input:
-565864098 -762723255 903590907 -762723255 -486054726 -762723255
output:
3 -486054726 -762723255 -486054726 -762723255 -565864098 -762723255 -486054726 -762723255 903590907 -762723255 -486054726 -762723255
result:
ok Total length is 1469455005
Test #15:
score: 0
Accepted
time: 0ms
memory: 3368kb
input:
80565983 -977814210 80565983 384343197 80565983 102575609
output:
1 80565983 -977814210 80565983 384343197
result:
ok Total length is 1362157407
Test #16:
score: 0
Accepted
time: 1ms
memory: 3384kb
input:
435839201 -838682337 435839201 821052661 499609215 273341058
output:
2 435839201 -838682337 435839201 821052661 499609215 273341058 435839201 273341058
result:
ok Total length is 1723505012
Test #17:
score: 0
Accepted
time: 0ms
memory: 3364kb
input:
435839201 273341058 499609215 821052661 435839201 -838682337
output:
2 435839201 -838682337 435839201 821052661 499609215 821052661 435839201 821052661
result:
ok Total length is 1723505012
Test #18:
score: 0
Accepted
time: 0ms
memory: 3368kb
input:
-550183491 -223052429 756776472 349902936 239047012 -223052429
output:
3 239047012 -223052429 239047012 349902936 -550183491 -223052429 239047012 -223052429 756776472 349902936 239047012 349902936
result:
ok Total length is 1879915328
Test #19:
score: 0
Accepted
time: 1ms
memory: 3372kb
input:
1000000000 894586329 -444648850 -239939045 -733796075 -301669878
output:
3 -444648850 -301669878 -444648850 894586329 -733796075 -301669878 -444648850 -301669878 1000000000 894586329 -444648850 894586329
result:
ok Total length is 2930052282
Test #20:
score: 0
Accepted
time: 0ms
memory: 3372kb
input:
669699982 91018932 438054159 1000000000 -364758687 -418769264
output:
3 438054159 -418769264 438054159 1000000000 -364758687 -418769264 438054159 -418769264 669699982 91018932 438054159 91018932
result:
ok Total length is 2453227933
Test #21:
score: 0
Accepted
time: 0ms
memory: 3476kb
input:
-1000000000 -167957680 247368494 215997643 -384275539 -796580213
output:
3 -384275539 -796580213 -384275539 215997643 -1000000000 -167957680 -384275539 -167957680 247368494 215997643 -384275539 215997643
result:
ok Total length is 2259946350
Test #22:
score: 0
Accepted
time: 0ms
memory: 3408kb
input:
-619431287 -131966997 616405883 224993162 793394764 -1000000000
output:
3 616405883 -1000000000 616405883 224993162 -619431287 -131966997 616405883 -131966997 793394764 -1000000000 616405883 -1000000000
result:
ok Total length is 2637819213
Test #23:
score: 0
Accepted
time: 0ms
memory: 3424kb
input:
1000000000 127343545 -28934934 951599244 274060166 -1000000000
output:
3 274060166 -1000000000 274060166 951599244 -28934934 951599244 274060166 951599244 1000000000 127343545 274060166 127343545
result:
ok Total length is 2980534178
Test #24:
score: 0
Accepted
time: 0ms
memory: 3424kb
input:
-950000000 950000000 629494532 268139913 853768075 -8108129
output:
3 629494532 -8108129 629494532 950000000 -950000000 950000000 629494532 950000000 853768075 -8108129 629494532 -8108129
result:
ok Total length is 2761876204