QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#520839#9175. Geometry Hackingucup-team133AC ✓1ms3636kbC++231.4kb2024-08-15 16:20:512024-08-15 16:20:51

Judging History

This is the latest submission verdict.

  • [2024-08-15 16:20:51]
  • Judged
  • Verdict: AC
  • Time: 1ms
  • Memory: 3636kb
  • [2024-08-15 16:20:51]
  • Submitted

answer

#include <bits/stdc++.h>
#ifdef LOCAL
#include <debug.hpp>
#else
#define debug(...) void(0)
#endif

template <class T> std::istream& operator>>(std::istream& is, std::vector<T>& v) {
    for (auto& e : v) {
        is >> e;
    }
    return is;
}

template <class T> std::ostream& operator<<(std::ostream& os, const std::vector<T>& v) {
    for (std::string_view sep = ""; const auto& e : v) {
        os << std::exchange(sep, " ") << e;
    }
    return os;
}

template <class T, class U = T> bool chmin(T& x, U&& y) {
    return y < x and (x = std::forward<U>(y), true);
}

template <class T, class U = T> bool chmax(T& x, U&& y) {
    return x < y and (x = std::forward<U>(y), true);
}

template <class T> void mkuni(std::vector<T>& v) {
    std::ranges::sort(v);
    auto result = std::ranges::unique(v);
    v.erase(result.begin(), result.end());
}

template <class T> int lwb(const std::vector<T>& v, const T& x) {
    return std::distance(v.begin(), std::ranges::lower_bound(v, x));
}

using ll = long long;

using namespace std;

int main() {
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    cout << fixed << setprecision(15);
    int k;
    cin >> k;
    vector<pair<int, int>> v = {{1, -1}, {-2, 1}, {1, 0}};
    for (int i = 0; i < k; i++) {
        cout << 4 << "\n";
        for (auto [x, y] : v) cout << x << " " << y << "\n";
        cout << 2 << " " << i + 1 << "\n";
    }
    return 0;
}

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

详细

Test #1:

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

input:

2

output:

4
1 -1
-2 1
1 0
2 1
4
1 -1
-2 1
1 0
2 2

result:

ok Everything ok

Test #2:

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

input:

1

output:

4
1 -1
-2 1
1 0
2 1

result:

ok Everything ok

Test #3:

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

input:

1000

output:

4
1 -1
-2 1
1 0
2 1
4
1 -1
-2 1
1 0
2 2
4
1 -1
-2 1
1 0
2 3
4
1 -1
-2 1
1 0
2 4
4
1 -1
-2 1
1 0
2 5
4
1 -1
-2 1
1 0
2 6
4
1 -1
-2 1
1 0
2 7
4
1 -1
-2 1
1 0
2 8
4
1 -1
-2 1
1 0
2 9
4
1 -1
-2 1
1 0
2 10
4
1 -1
-2 1
1 0
2 11
4
1 -1
-2 1
1 0
2 12
4
1 -1
-2 1
1 0
2 13
4
1 -1
-2 1
1 0
2 14
4
1 -1
-2 1
1 0...

result:

ok Everything ok

Test #4:

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

input:

500

output:

4
1 -1
-2 1
1 0
2 1
4
1 -1
-2 1
1 0
2 2
4
1 -1
-2 1
1 0
2 3
4
1 -1
-2 1
1 0
2 4
4
1 -1
-2 1
1 0
2 5
4
1 -1
-2 1
1 0
2 6
4
1 -1
-2 1
1 0
2 7
4
1 -1
-2 1
1 0
2 8
4
1 -1
-2 1
1 0
2 9
4
1 -1
-2 1
1 0
2 10
4
1 -1
-2 1
1 0
2 11
4
1 -1
-2 1
1 0
2 12
4
1 -1
-2 1
1 0
2 13
4
1 -1
-2 1
1 0
2 14
4
1 -1
-2 1
1 0...

result:

ok Everything ok

Test #5:

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

input:

399

output:

4
1 -1
-2 1
1 0
2 1
4
1 -1
-2 1
1 0
2 2
4
1 -1
-2 1
1 0
2 3
4
1 -1
-2 1
1 0
2 4
4
1 -1
-2 1
1 0
2 5
4
1 -1
-2 1
1 0
2 6
4
1 -1
-2 1
1 0
2 7
4
1 -1
-2 1
1 0
2 8
4
1 -1
-2 1
1 0
2 9
4
1 -1
-2 1
1 0
2 10
4
1 -1
-2 1
1 0
2 11
4
1 -1
-2 1
1 0
2 12
4
1 -1
-2 1
1 0
2 13
4
1 -1
-2 1
1 0
2 14
4
1 -1
-2 1
1 0...

result:

ok Everything ok

Test #6:

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

input:

420

output:

4
1 -1
-2 1
1 0
2 1
4
1 -1
-2 1
1 0
2 2
4
1 -1
-2 1
1 0
2 3
4
1 -1
-2 1
1 0
2 4
4
1 -1
-2 1
1 0
2 5
4
1 -1
-2 1
1 0
2 6
4
1 -1
-2 1
1 0
2 7
4
1 -1
-2 1
1 0
2 8
4
1 -1
-2 1
1 0
2 9
4
1 -1
-2 1
1 0
2 10
4
1 -1
-2 1
1 0
2 11
4
1 -1
-2 1
1 0
2 12
4
1 -1
-2 1
1 0
2 13
4
1 -1
-2 1
1 0
2 14
4
1 -1
-2 1
1 0...

result:

ok Everything ok

Test #7:

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

input:

69

output:

4
1 -1
-2 1
1 0
2 1
4
1 -1
-2 1
1 0
2 2
4
1 -1
-2 1
1 0
2 3
4
1 -1
-2 1
1 0
2 4
4
1 -1
-2 1
1 0
2 5
4
1 -1
-2 1
1 0
2 6
4
1 -1
-2 1
1 0
2 7
4
1 -1
-2 1
1 0
2 8
4
1 -1
-2 1
1 0
2 9
4
1 -1
-2 1
1 0
2 10
4
1 -1
-2 1
1 0
2 11
4
1 -1
-2 1
1 0
2 12
4
1 -1
-2 1
1 0
2 13
4
1 -1
-2 1
1 0
2 14
4
1 -1
-2 1
1 0...

result:

ok Everything ok

Extra Test:

score: 0
Extra Test Passed