QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#247573#7629. Make SYSU Great Again IItritr (Keita Murase, Rin Saiki, Ryuto Kojima)#AC ✓194ms34516kbC++2010.0kb2023-11-11 14:58:582023-11-11 14:58:59

Judging History

This is the latest submission verdict.

  • [2023-11-11 14:58:59]
  • Judged
  • Verdict: AC
  • Time: 194ms
  • Memory: 34516kb
  • [2023-11-11 14:58:58]
  • Submitted

answer

// #pragma GCC target("avx2")
// #pragma GCC optimize("O3")
// #pragma GCC optimize("unroll-loops")
#include <bits/stdc++.h>
using namespace std;

namespace templates {
// type
using ll  = long long;
using ull = unsigned long long;
template <class T>
using pq = priority_queue<T>;
template <class T>
using qp = priority_queue<T, vector<T>, greater<T>>;
#define vec(T, A, ...) vector<T> A(__VA_ARGS__);
#define vvec(T, A, h, ...) vector<vector<T>> A(h, vector<T>(__VA_ARGS__));
#define vvvec(T, A, h1, h2, ...) vector<vector<vector<T>>> A(h1, vector<vector<T>>(h2, vector<T>(__VA_ARGS__)));

// for loop
#define fori1(a) for (ll _ = 0; _ < (a); _++)
#define fori2(i, a) for (ll i = 0; i < (a); i++)
#define fori3(i, a, b) for (ll i = (a); i < (b); i++)
#define fori4(i, a, b, c) for (ll i = (a); ((c) > 0 || i > (b)) && ((c) < 0 || i < (b)); i += (c))
#define overload4(a, b, c, d, e, ...) e
#define fori(...) overload4(__VA_ARGS__, fori4, fori3, fori2, fori1)(__VA_ARGS__)

// declare and input
// clang-format off
#define INT(...) int __VA_ARGS__; inp(__VA_ARGS__);
#define LL(...) ll __VA_ARGS__; inp(__VA_ARGS__);
#define STRING(...) string __VA_ARGS__; inp(__VA_ARGS__);
#define CHAR(...) char __VA_ARGS__; inp(__VA_ARGS__);
#define DOUBLE(...) double __VA_ARGS__; STRING(str___); __VA_ARGS__ = stod(str___);
#define VEC(T, A, n) vector<T> A(n); inp(A);
#define VVEC(T, A, n, m) vector<vector<T>> A(n, vector<T>(m)); inp(A);
// clang-format on

// const value
const ll MOD1   = 1000000007;
const ll MOD9   = 998244353;
const double PI = acos(-1);

// other macro
#ifndef RIN__LOCAL
#define endl "\n"
#endif
#define spa ' '
#define len(A) ll(A.size())
#define all(A) begin(A), end(A)

// function
vector<char> stoc(string &S) {
    int n = S.size();
    vector<char> ret(n);
    for (int i = 0; i < n; i++) ret[i] = S[i];
    return ret;
}
string ctos(vector<char> &S) {
    int n      = S.size();
    string ret = "";
    for (int i = 0; i < n; i++) ret += S[i];
    return ret;
}

template <class T>
auto min(const T &a) {
    return *min_element(all(a));
}
template <class T>
auto max(const T &a) {
    return *max_element(all(a));
}
template <class T, class S>
auto clamp(T &a, const S &l, const S &r) {
    return (a > r ? r : a < l ? l : a);
}
template <class T, class S>
inline bool chmax(T &a, const S &b) {
    return (a < b ? a = b, 1 : 0);
}
template <class T, class S>
inline bool chmin(T &a, const S &b) {
    return (a > b ? a = b, 1 : 0);
}
template <class T, class S>
inline bool chclamp(T &a, const S &l, const S &r) {
    auto b = clamp(a, l, r);
    return (a != b ? a = b, 1 : 0);
}

template <typename T>
T sum(vector<T> &A) {
    T tot = 0;
    for (auto a : A) tot += a;
    return tot;
}

template <typename T>
vector<T> compression(vector<T> X) {
    sort(all(X));
    X.erase(unique(all(X)), X.end());
    return X;
}

// input and output
namespace io {

// vector<T>
template <typename T>
istream &operator>>(istream &is, vector<T> &A) {
    for (auto &a : A) is >> a;
    return is;
}
template <typename T>
ostream &operator<<(ostream &os, vector<T> &A) {
    for (size_t i = 0; i < A.size(); i++) {
        os << A[i];
        if (i != A.size() - 1) os << ' ';
    }
    return os;
}

// vector<vector<T>>
template <typename T>
istream &operator>>(istream &is, vector<vector<T>> &A) {
    for (auto &a : A) is >> a;
    return is;
}
template <typename T>
ostream &operator<<(ostream &os, vector<vector<T>> &A) {
    for (size_t i = 0; i < A.size(); i++) {
        os << A[i];
        if (i != A.size() - 1) os << endl;
    }
    return os;
}

// pair<S, T>
template <typename S, typename T>
istream &operator>>(istream &is, pair<S, T> &A) {
    is >> A.first >> A.second;
    return is;
}
template <typename S, typename T>
ostream &operator<<(ostream &os, pair<S, T> &A) {
    os << A.first << ' ' << A.second;
    return os;
}

// vector<pair<S, T>>
template <typename S, typename T>
istream &operator>>(istream &is, vector<pair<S, T>> &A) {
    for (size_t i = 0; i < A.size(); i++) {
        is >> A[i];
    }
    return is;
}
template <typename S, typename T>
ostream &operator<<(ostream &os, vector<pair<S, T>> &A) {
    for (size_t i = 0; i < A.size(); i++) {
        os << A[i];
        if (i != A.size() - 1) os << endl;
    }
    return os;
}

// tuple
template <typename T, size_t N>
struct TuplePrint {
    static ostream &print(ostream &os, const T &t) {
        TuplePrint<T, N - 1>::print(os, t);
        os << ' ' << get<N - 1>(t);
        return os;
    }
};
template <typename T>
struct TuplePrint<T, 1> {
    static ostream &print(ostream &os, const T &t) {
        os << get<0>(t);
        return os;
    }
};
template <typename... Args>
ostream &operator<<(ostream &os, const tuple<Args...> &t) {
    TuplePrint<decltype(t), sizeof...(Args)>::print(os, t);
    return os;
}

// io functions
void FLUSH() {
    cout << flush;
}

void print() {
    cout << endl;
}
template <class Head, class... Tail>
void print(Head &&head, Tail &&...tail) {
    cout << head;
    if (sizeof...(Tail)) cout << spa;
    print(forward<Tail>(tail)...);
}

template <typename T, typename S>
void prisep(vector<T> &A, S sep) {
    int n = A.size();
    for (int i = 0; i < n; i++) {
        cout << A[i];
        if (i != n - 1) cout << sep;
    }
    cout << endl;
}
template <typename T, typename S>
void priend(T A, S end) {
    cout << A << end;
}
template <typename T>
void prispa(T A) {
    priend(A, spa);
}
template <typename T, typename S>
bool printif(bool f, T A, S B) {
    if (f)
        print(A);
    else
        print(B);
    return f;
}

template <class... T>
void inp(T &...a) {
    (cin >> ... >> a);
}

} // namespace io
using namespace io;

// read graph
vector<vector<int>> read_edges(int n, int m, bool direct = false, int indexed = 1) {
    vector<vector<int>> edges(n, vector<int>());
    for (int i = 0; i < m; i++) {
        INT(u, v);
        u -= indexed;
        v -= indexed;
        edges[u].push_back(v);
        if (!direct) edges[v].push_back(u);
    }
    return edges;
}
vector<vector<int>> read_tree(int n, int indexed = 1) {
    return read_edges(n, n - 1, false, indexed);
}

template <typename T = long long>
vector<vector<pair<int, T>>> read_wedges(int n, int m, bool direct = false, int indexed = 1) {
    vector<vector<pair<int, T>>> edges(n, vector<pair<int, T>>());
    for (int i = 0; i < m; i++) {
        INT(u, v);
        T w;
        inp(w);
        u -= indexed;
        v -= indexed;
        edges[u].push_back({v, w});
        if (!direct) edges[v].push_back({u, w});
    }
    return edges;
}
template <typename T = long long>
vector<vector<pair<int, T>>> read_wtree(int n, int indexed = 1) {
    return read_wedges<T>(n, n - 1, false, indexed);
}

// yes / no
namespace yesno {

// yes
inline bool yes(bool f = true) {
    cout << (f ? "yes" : "no") << endl;
    return f;
}
inline bool Yes(bool f = true) {
    cout << (f ? "Yes" : "No") << endl;
    return f;
}
inline bool YES(bool f = true) {
    cout << (f ? "YES" : "NO") << endl;
    return f;
}

// no
inline bool no(bool f = true) {
    cout << (!f ? "yes" : "no") << endl;
    return f;
}
inline bool No(bool f = true) {
    cout << (!f ? "Yes" : "No") << endl;
    return f;
}
inline bool NO(bool f = true) {
    cout << (!f ? "YES" : "NO") << endl;
    return f;
}

// possible
inline bool possible(bool f = true) {
    cout << (f ? "possible" : "impossible") << endl;
    return f;
}
inline bool Possible(bool f = true) {
    cout << (f ? "Possible" : "Impossible") << endl;
    return f;
}
inline bool POSSIBLE(bool f = true) {
    cout << (f ? "POSSIBLE" : "IMPOSSIBLE") << endl;
    return f;
}

// impossible
inline bool impossible(bool f = true) {
    cout << (!f ? "possible" : "impossible") << endl;
    return f;
}
inline bool Impossible(bool f = true) {
    cout << (!f ? "Possible" : "Impossible") << endl;
    return f;
}
inline bool IMPOSSIBLE(bool f = true) {
    cout << (!f ? "POSSIBLE" : "IMPOSSIBLE") << endl;
    return f;
}

// Alice Bob
inline bool Alice(bool f = true) {
    cout << (f ? "Alice" : "Bob") << endl;
    return f;
}
inline bool Bob(bool f = true) {
    cout << (f ? "Bob" : "Alice") << endl;
    return f;
}

// Takahashi Aoki
inline bool Takahashi(bool f = true) {
    cout << (f ? "Takahashi" : "Aoki") << endl;
    return f;
}
inline bool Aoki(bool f = true) {
    cout << (f ? "Aoki" : "Takahashi") << endl;
    return f;
}

} // namespace yesno
using namespace yesno;

} // namespace templates
using namespace templates;

void solve() {
    LL(n);
    Yes();
    if (n == 1) {
        print(0);
        return;
    }

    ll x = 1;
    while (x < n) x <<= 1;
    vec(ll, A, x >> 1);
    fori(i, x >> 1) {
        A[i] = i ^ (i >> 1);
    }
    vec(ll, B, 0);
    ll b    = A.back();
    ll mask = x - 1;
    for (auto a : A) {
        B.push_back(max(a, b) ^ mask);
        B.push_back(a);
        b = a;
    }

    fori(i, n - 1) assert((B[i] & B[i + 1]) == 0);

    vvec(ll, ans, n, n);
    fori(i, n) fori(j, n) {
        ll a = B[(i + j) % x];
        ll b = B[(j + x + 1 - i) % x];
        // if (j & 1) a = B[(i + 1) % x];
        // if (i & 1) b = B[(j + 1) % x];
        ans[i][j] = a * x + b;
    }
#ifndef RIN__LOCAL
    print(ans);
#else
    map<ll, ll> cnt;
    fori(i, n) fori(j, n) {
        assert(0 <= ans[i][j]);
        assert(ans[i][j] < 4 * n * n);
        if (i != n - 1) {
            assert((ans[i][j] & ans[i + 1][j]) == 0);
        }
        if (j != n - 1) {
            assert((ans[i][j] & ans[i][j + 1]) == 0);
        }

        cnt[ans[i][j]]++;
    }
    for (auto tmp : cnt) {
        assert(tmp.second <= 5);
    }
#endif
}

int main() {
    cin.tie(0)->sync_with_stdio(0);
    cout << fixed << setprecision(12);
    int t;
    t = 1;
    // cin >> t;
    while (t--) solve();
    return 0;
}

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

詳細信息

Test #1:

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

input:

4

output:

Yes
8 2 9 6
2 8 6 9
9 6 8 2
6 9 2 8

result:

ok 1

Test #2:

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

input:

1

output:

Yes
0

result:

ok 1

Test #3:

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

input:

2

output:

Yes
2 1
1 2

result:

ok 1

Test #4:

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

input:

3

output:

Yes
8 2 9
2 8 6
9 6 8

result:

ok 1

Test #5:

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

input:

5

output:

Yes
40 6 49 12 35
5 48 14 33 28
50 13 32 30 33
12 34 29 32 22
35 28 34 21 40

result:

ok 1

Test #6:

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

input:

8

output:

Yes
40 6 49 12 35 28 34 21
5 48 14 33 28 35 20 42
50 13 32 30 33 20 43 4
12 34 29 32 22 41 4 51
35 28 34 21 40 6 49 12
28 35 20 42 5 48 14 33
33 20 43 4 50 13 32 30
22 41 4 51 12 34 29 32

result:

ok 1

Test #7:

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

input:

13

output:

Yes
176 14 225 28 195 60 194 41 150 104 135 120 133
11 224 30 193 60 195 44 146 105 134 120 135 88
228 27 192 62 193 44 147 108 130 121 134 88 167
26 196 59 192 46 145 108 131 124 130 89 166 72
197 58 196 43 144 110 129 124 131 92 162 73 182
56 197 42 148 107 128 126 129 92 163 76 178 9
199 40 149 1...

result:

ok 1

Test #8:

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

input:

21

output:

Yes
736 30 961 60 899 124 898 89 806 216 775 248 773 186 836 147 620 402 589 432 527
23 960 62 897 124 899 92 802 217 774 248 775 184 837 154 612 403 588 434 525 496
968 55 896 126 897 92 803 220 770 249 774 184 839 152 613 410 580 435 524 498 525
54 904 119 896 94 801 220 771 252 770 185 838 152 61...

result:

ok 1

Test #9:

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

input:

34

output:

Yes
3008 62 3969 124 3843 252 3842 185 3654 440 3591 504 3589 378 3716 307 3276 818 3213 880 3087 1008 3086 945 3146 692 3339 756 3337 630 3464 551 2520 1574
47 3968 126 3841 252 3843 188 3650 441 3590 504 3591 376 3717 314 3268 819 3212 882 3085 1008 3087 944 3150 689 3338 756 3339 628 3465 566 250...

result:

ok 1

Test #10:

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

input:

55

output:

Yes
3008 62 3969 124 3843 252 3842 185 3654 440 3591 504 3589 378 3716 307 3276 818 3213 880 3087 1008 3086 945 3146 692 3339 756 3337 630 3464 551 2520 1574 2457 1636 2331 1764 2330 1697 2142 1952 2079 2016 2077 1890 2204 1827 2260 1322 2709 1384 2583 1512 2582
47 3968 126 3841 252 3843 188 3650 44...

result:

ok 1

Test #11:

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

input:

89

output:

Yes
12160 126 16129 252 15875 508 15874 377 15494 888 15367 1016 15365 762 15620 627 14732 1650 14605 1776 14351 2032 14350 1905 14474 1396 14859 1524 14857 1270 15112 1127 13208 3174 13081 3300 12827 3556 12826 3425 12446 3936 12319 4064 12317 3810 12572 3683 12692 2666 13589 2792 13335 3048 13334 ...

result:

ok 1

Test #12:

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

input:

100

output:

Yes
12160 126 16129 252 15875 508 15874 377 15494 888 15367 1016 15365 762 15620 627 14732 1650 14605 1776 14351 2032 14350 1905 14474 1396 14859 1524 14857 1270 15112 1127 13208 3174 13081 3300 12827 3556 12826 3425 12446 3936 12319 4064 12317 3810 12572 3683 12692 2666 13589 2792 13335 3048 13334 ...

result:

ok 1

Test #13:

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

input:

200

output:

Yes
48896 254 65025 508 64515 1020 64514 761 63750 1784 63495 2040 63493 1530 64004 1267 62220 3314 61965 3568 61455 4080 61454 3825 61706 2804 62475 3060 62473 2550 62984 2279 59160 6374 58905 6628 58395 7140 58394 6881 57630 7904 57375 8160 57373 7650 57884 7395 58132 5354 59925 5608 59415 6120 59...

result:

ok 1

Test #14:

score: 0
Accepted
time: 2ms
memory: 3892kb

input:

300

output:

Yes
196096 510 261121 1020 260099 2044 260098 1529 258566 3576 258055 4088 258053 3066 259076 2547 255500 6642 254989 7152 253967 8176 253966 7665 254474 5620 256011 6132 256009 5110 257032 4583 249368 12774 248857 13284 247835 14308 247834 13793 246302 15840 245791 16352 245789 15330 246812 14819 2...

result:

ok 1

Test #15:

score: 0
Accepted
time: 4ms
memory: 4456kb

input:

400

output:

Yes
196096 510 261121 1020 260099 2044 260098 1529 258566 3576 258055 4088 258053 3066 259076 2547 255500 6642 254989 7152 253967 8176 253966 7665 254474 5620 256011 6132 256009 5110 257032 4583 249368 12774 248857 13284 247835 14308 247834 13793 246302 15840 245791 16352 245789 15330 246812 14819 2...

result:

ok 1

Test #16:

score: 0
Accepted
time: 14ms
memory: 5416kb

input:

500

output:

Yes
196096 510 261121 1020 260099 2044 260098 1529 258566 3576 258055 4088 258053 3066 259076 2547 255500 6642 254989 7152 253967 8176 253966 7665 254474 5620 256011 6132 256009 5110 257032 4583 249368 12774 248857 13284 247835 14308 247834 13793 246302 15840 245791 16352 245789 15330 246812 14819 2...

result:

ok 1

Test #17:

score: 0
Accepted
time: 20ms
memory: 6000kb

input:

600

output:

Yes
785408 1022 1046529 2044 1044483 4092 1044482 3065 1041414 7160 1040391 8184 1040389 6138 1042436 5107 1035276 13298 1034253 14320 1032207 16368 1032206 15345 1033226 11252 1036299 12276 1036297 10230 1038344 9191 1023000 25574 1021977 26596 1019931 28644 1019930 27617 1016862 31712 1015839 3273...

result:

ok 1

Test #18:

score: 0
Accepted
time: 28ms
memory: 7072kb

input:

700

output:

Yes
785408 1022 1046529 2044 1044483 4092 1044482 3065 1041414 7160 1040391 8184 1040389 6138 1042436 5107 1035276 13298 1034253 14320 1032207 16368 1032206 15345 1033226 11252 1036299 12276 1036297 10230 1038344 9191 1023000 25574 1021977 26596 1019931 28644 1019930 27617 1016862 31712 1015839 3273...

result:

ok 1

Test #19:

score: 0
Accepted
time: 27ms
memory: 8152kb

input:

800

output:

Yes
785408 1022 1046529 2044 1044483 4092 1044482 3065 1041414 7160 1040391 8184 1040389 6138 1042436 5107 1035276 13298 1034253 14320 1032207 16368 1032206 15345 1033226 11252 1036299 12276 1036297 10230 1038344 9191 1023000 25574 1021977 26596 1019931 28644 1019930 27617 1016862 31712 1015839 3273...

result:

ok 1

Test #20:

score: 0
Accepted
time: 41ms
memory: 9512kb

input:

900

output:

Yes
785408 1022 1046529 2044 1044483 4092 1044482 3065 1041414 7160 1040391 8184 1040389 6138 1042436 5107 1035276 13298 1034253 14320 1032207 16368 1032206 15345 1033226 11252 1036299 12276 1036297 10230 1038344 9191 1023000 25574 1021977 26596 1019931 28644 1019930 27617 1016862 31712 1015839 3273...

result:

ok 1

Test #21:

score: 0
Accepted
time: 43ms
memory: 11040kb

input:

1000

output:

Yes
785408 1022 1046529 2044 1044483 4092 1044482 3065 1041414 7160 1040391 8184 1040389 6138 1042436 5107 1035276 13298 1034253 14320 1032207 16368 1032206 15345 1033226 11252 1036299 12276 1036297 10230 1038344 9191 1023000 25574 1021977 26596 1019931 28644 1019930 27617 1016862 31712 1015839 3273...

result:

ok 1

Test #22:

score: 0
Accepted
time: 72ms
memory: 14456kb

input:

1200

output:

Yes
3143680 2046 4190209 4092 4186115 8188 4186114 6137 4179974 14328 4177927 16376 4177925 12282 4182020 10227 4167692 26610 4165645 28656 4161551 32752 4161550 30705 4163594 22516 4169739 24564 4169737 20470 4173832 18407 4143128 51174 4141081 53220 4136987 57316 4136986 55265 4130846 63456 412879...

result:

ok 1

Test #23:

score: 0
Accepted
time: 90ms
memory: 18768kb

input:

1400

output:

Yes
3143680 2046 4190209 4092 4186115 8188 4186114 6137 4179974 14328 4177927 16376 4177925 12282 4182020 10227 4167692 26610 4165645 28656 4161551 32752 4161550 30705 4163594 22516 4169739 24564 4169737 20470 4173832 18407 4143128 51174 4141081 53220 4136987 57316 4136986 55265 4130846 63456 412879...

result:

ok 1

Test #24:

score: 0
Accepted
time: 118ms
memory: 23184kb

input:

1600

output:

Yes
3143680 2046 4190209 4092 4186115 8188 4186114 6137 4179974 14328 4177927 16376 4177925 12282 4182020 10227 4167692 26610 4165645 28656 4161551 32752 4161550 30705 4163594 22516 4169739 24564 4169737 20470 4173832 18407 4143128 51174 4141081 53220 4136987 57316 4136986 55265 4130846 63456 412879...

result:

ok 1

Test #25:

score: 0
Accepted
time: 147ms
memory: 28720kb

input:

1800

output:

Yes
3143680 2046 4190209 4092 4186115 8188 4186114 6137 4179974 14328 4177927 16376 4177925 12282 4182020 10227 4167692 26610 4165645 28656 4161551 32752 4161550 30705 4163594 22516 4169739 24564 4169737 20470 4173832 18407 4143128 51174 4141081 53220 4136987 57316 4136986 55265 4130846 63456 412879...

result:

ok 1

Test #26:

score: 0
Accepted
time: 174ms
memory: 31608kb

input:

1900

output:

Yes
3143680 2046 4190209 4092 4186115 8188 4186114 6137 4179974 14328 4177927 16376 4177925 12282 4182020 10227 4167692 26610 4165645 28656 4161551 32752 4161550 30705 4163594 22516 4169739 24564 4169737 20470 4173832 18407 4143128 51174 4141081 53220 4136987 57316 4136986 55265 4130846 63456 412879...

result:

ok 1

Test #27:

score: 0
Accepted
time: 174ms
memory: 32224kb

input:

1920

output:

Yes
3143680 2046 4190209 4092 4186115 8188 4186114 6137 4179974 14328 4177927 16376 4177925 12282 4182020 10227 4167692 26610 4165645 28656 4161551 32752 4161550 30705 4163594 22516 4169739 24564 4169737 20470 4173832 18407 4143128 51174 4141081 53220 4136987 57316 4136986 55265 4130846 63456 412879...

result:

ok 1

Test #28:

score: 0
Accepted
time: 194ms
memory: 34516kb

input:

2000

output:

Yes
3143680 2046 4190209 4092 4186115 8188 4186114 6137 4179974 14328 4177927 16376 4177925 12282 4182020 10227 4167692 26610 4165645 28656 4161551 32752 4161550 30705 4163594 22516 4169739 24564 4169737 20470 4173832 18407 4143128 51174 4141081 53220 4136987 57316 4136986 55265 4130846 63456 412879...

result:

ok 1

Test #29:

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

input:

62

output:

Yes
3008 62 3969 124 3843 252 3842 185 3654 440 3591 504 3589 378 3716 307 3276 818 3213 880 3087 1008 3086 945 3146 692 3339 756 3337 630 3464 551 2520 1574 2457 1636 2331 1764 2330 1697 2142 1952 2079 2016 2077 1890 2204 1827 2260 1322 2709 1384 2583 1512 2582 1449 2642 1196 2835 1260 2833 1134
47...

result:

ok 1

Test #30:

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

input:

130

output:

Yes
48896 254 65025 508 64515 1020 64514 761 63750 1784 63495 2040 63493 1530 64004 1267 62220 3314 61965 3568 61455 4080 61454 3825 61706 2804 62475 3060 62473 2550 62984 2279 59160 6374 58905 6628 58395 7140 58394 6881 57630 7904 57375 8160 57373 7650 57884 7395 58132 5354 59925 5608 59415 6120 59...

result:

ok 1

Test #31:

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

input:

126

output:

Yes
12160 126 16129 252 15875 508 15874 377 15494 888 15367 1016 15365 762 15620 627 14732 1650 14605 1776 14351 2032 14350 1905 14474 1396 14859 1524 14857 1270 15112 1127 13208 3174 13081 3300 12827 3556 12826 3425 12446 3936 12319 4064 12317 3810 12572 3683 12692 2666 13589 2792 13335 3048 13334 ...

result:

ok 1

Test #32:

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

input:

66

output:

Yes
12160 126 16129 252 15875 508 15874 377 15494 888 15367 1016 15365 762 15620 627 14732 1650 14605 1776 14351 2032 14350 1905 14474 1396 14859 1524 14857 1270 15112 1127 13208 3174 13081 3300 12827 3556 12826 3425 12446 3936 12319 4064 12317 3810 12572 3683 12692 2666 13589 2792 13335 3048 13334 ...

result:

ok 1

Test #33:

score: 0
Accepted
time: 53ms
memory: 11448kb

input:

1021

output:

Yes
785408 1022 1046529 2044 1044483 4092 1044482 3065 1041414 7160 1040391 8184 1040389 6138 1042436 5107 1035276 13298 1034253 14320 1032207 16368 1032206 15345 1033226 11252 1036299 12276 1036297 10230 1038344 9191 1023000 25574 1021977 26596 1019931 28644 1019930 27617 1016862 31712 1015839 3273...

result:

ok 1

Test #34:

score: 0
Accepted
time: 52ms
memory: 11444kb

input:

1022

output:

Yes
785408 1022 1046529 2044 1044483 4092 1044482 3065 1041414 7160 1040391 8184 1040389 6138 1042436 5107 1035276 13298 1034253 14320 1032207 16368 1032206 15345 1033226 11252 1036299 12276 1036297 10230 1038344 9191 1023000 25574 1021977 26596 1019931 28644 1019930 27617 1016862 31712 1015839 3273...

result:

ok 1

Test #35:

score: 0
Accepted
time: 49ms
memory: 11284kb

input:

1023

output:

Yes
785408 1022 1046529 2044 1044483 4092 1044482 3065 1041414 7160 1040391 8184 1040389 6138 1042436 5107 1035276 13298 1034253 14320 1032207 16368 1032206 15345 1033226 11252 1036299 12276 1036297 10230 1038344 9191 1023000 25574 1021977 26596 1019931 28644 1019930 27617 1016862 31712 1015839 3273...

result:

ok 1

Test #36:

score: 0
Accepted
time: 41ms
memory: 11752kb

input:

1024

output:

Yes
785408 1022 1046529 2044 1044483 4092 1044482 3065 1041414 7160 1040391 8184 1040389 6138 1042436 5107 1035276 13298 1034253 14320 1032207 16368 1032206 15345 1033226 11252 1036299 12276 1036297 10230 1038344 9191 1023000 25574 1021977 26596 1019931 28644 1019930 27617 1016862 31712 1015839 3273...

result:

ok 1

Test #37:

score: 0
Accepted
time: 46ms
memory: 11556kb

input:

1025

output:

Yes
3143680 2046 4190209 4092 4186115 8188 4186114 6137 4179974 14328 4177927 16376 4177925 12282 4182020 10227 4167692 26610 4165645 28656 4161551 32752 4161550 30705 4163594 22516 4169739 24564 4169737 20470 4173832 18407 4143128 51174 4141081 53220 4136987 57316 4136986 55265 4130846 63456 412879...

result:

ok 1

Test #38:

score: 0
Accepted
time: 43ms
memory: 11704kb

input:

1026

output:

Yes
3143680 2046 4190209 4092 4186115 8188 4186114 6137 4179974 14328 4177927 16376 4177925 12282 4182020 10227 4167692 26610 4165645 28656 4161551 32752 4161550 30705 4163594 22516 4169739 24564 4169737 20470 4173832 18407 4143128 51174 4141081 53220 4136987 57316 4136986 55265 4130846 63456 412879...

result:

ok 1

Test #39:

score: 0
Accepted
time: 51ms
memory: 11636kb

input:

1027

output:

Yes
3143680 2046 4190209 4092 4186115 8188 4186114 6137 4179974 14328 4177927 16376 4177925 12282 4182020 10227 4167692 26610 4165645 28656 4161551 32752 4161550 30705 4163594 22516 4169739 24564 4169737 20470 4173832 18407 4143128 51174 4141081 53220 4136987 57316 4136986 55265 4130846 63456 412879...

result:

ok 1

Extra Test:

score: 0
Extra Test Passed