QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#183974 | #4902. 聚会 | hos_lyric# | 9.090909 | 168ms | 13008kb | C++14 | 3.8kb | 2023-09-20 05:40:16 | 2024-07-04 02:05:08 |
Judging History
answer
#include <cassert>
#include <cmath>
#include <cstdint>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <algorithm>
#include <bitset>
#include <complex>
#include <deque>
#include <functional>
#include <iostream>
#include <limits>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <utility>
#include <vector>
using namespace std;
using Int = long long;
template <class T1, class T2> ostream &operator<<(ostream &os, const pair<T1, T2> &a) { return os << "(" << a.first << ", " << a.second << ")"; };
template <class T> ostream &operator<<(ostream &os, const vector<T> &as) { const int sz = as.size(); os << "["; for (int i = 0; i < sz; ++i) { if (i >= 256) { os << ", ..."; break; } if (i > 0) { os << ", "; } os << as[i]; } return os << "]"; }
template <class T> void pv(T a, T b) { for (T i = a; i != b; ++i) cerr << *i << " "; cerr << endl; }
template <class T> bool chmin(T &t, const T &f) { if (t > f) { t = f; return true; } return false; }
template <class T> bool chmax(T &t, const T &f) { if (t < f) { t = f; return true; } return false; }
#define COLOR(s) ("\x1b[" s "m")
int N;
int counter;
bool used[3010][3010];
void add(int u, int v, int w) {
++counter;
printf("%d %d %d\n", u, v, w);
assert(1 <= u); assert(u <= N);
assert(1 <= v); assert(v <= N);
assert(1 <= w); assert(w <= N);
assert(u != v); assert(!used[u][v]); used[u][v] = used[v][u] = true;
assert(v != w); assert(!used[v][w]); used[v][w] = used[w][v] = true;
assert(w != u); assert(!used[w][u]); used[w][u] = used[u][w] = true;
}
int M;
int mod(int u) {
return ((u %= M) < 0) ? (u + M) : u;
}
int main() {
for (; ~scanf("%d", &N); ) {
cerr<<"N = "<<N<<endl;
assert(N % 6 == 1 || N % 6 == 3);
counter = 0;
memset(used, 0, sizeof(used));
if (N >= 3) {
M = N - 2;
for (int u = 1; u < M; ++u) for (int v = u + 1; v < M; ++v) {
const int w = mod(-(u + v));
if (v < w) {
add(u, v, w);
}
}
/*
remaining:
(u, -u): matching
(u, -2u): cycles
-> 3 matchings
*/
vector<pair<int, int>> mas[3];
vector<int> vis(M, 0);
for (int u = 1; u < M; ++u) if (!vis[u]) {
vector<int> cyc;
for (int v = u; !vis[v]; v = mod(-2 * v)) {
vis[v] = u;
cyc.push_back(v);
}
// cerr<<"cyc = "<<cyc<<endl;
const int len = cyc.size();
if (len & 1) {
for (int j = 0; j < len; ++j) {
assert(!vis[M - cyc[j]]);
vis[M - cyc[j]] = u;
}
for (int j = 0; j < len - 1; ++j) {
mas[j & 1].emplace_back(cyc[j], cyc[(j + 1) % len]);
mas[j & 1].emplace_back(M - cyc[j], M - cyc[(j + 1) % len]);
}
mas[2].emplace_back(cyc[0], cyc[len - 1]);
mas[2].emplace_back(M - cyc[0], M - cyc[len - 1]);
mas[0].emplace_back(cyc[len - 1], M - cyc[len - 1]);
mas[1].emplace_back(cyc[0], M - cyc[0]);
for (int j = 1; j < len - 1; ++j) {
mas[2].emplace_back(cyc[j], M - cyc[j]);
}
} else {
for (int j = 0; j < len; ++j) {
mas[j & 1].emplace_back(cyc[j], cyc[(j + 1) % len]);
}
for (int j = 0; j < len / 2; ++j) {
assert(cyc[j + len / 2] = M - cyc[j]);
mas[2].emplace_back(cyc[j], cyc[j + len / 2]);
}
}
}
for (int k = 0; k < 3; ++k) {
for (const auto &e : mas[k]) {
add(M + k, e.first, e.second);
}
}
add(M, M + 1, M + 2);
}
assert(counter == N * (N - 1) / 6);
}
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Subtask #1:
score: 0
Runtime Error
Test #1:
score: 9.09091
Accepted
time: 0ms
memory: 12528kb
input:
1
output:
result:
ok accepted
Test #2:
score: 0
Accepted
time: 0ms
memory: 12644kb
input:
3
output:
1 2 3
result:
ok accepted
Test #3:
score: 0
Accepted
time: 0ms
memory: 12640kb
input:
7
output:
5 1 3 5 4 2 6 3 4 6 2 1 7 1 4 7 3 2 5 6 7
result:
ok accepted
Test #4:
score: 0
Accepted
time: 0ms
memory: 12644kb
input:
15
output:
1 2 10 1 3 9 1 4 8 1 5 7 2 3 8 2 4 7 2 5 6 3 4 6 3 11 12 4 10 12 5 9 12 5 10 11 6 8 12 6 9 11 7 8 11 7 9 10 13 1 11 13 4 5 13 3 7 13 12 2 13 9 8 13 10 6 14 11 4 14 5 3 14 7 12 14 2 9 14 8 10 14 6 1 15 1 12 15 11 2 15 4 9 15 5 8 15 3 10 15 7 6 13 14 15
result:
ok accepted
Test #5:
score: 0
Accepted
time: 0ms
memory: 12640kb
input:
31
output:
1 2 26 1 3 25 1 4 24 1 5 23 1 6 22 1 7 21 1 8 20 1 9 19 1 10 18 1 11 17 1 12 16 1 13 15 2 3 24 2 4 23 2 5 22 2 6 21 2 7 20 2 8 19 2 9 18 2 10 17 2 11 16 2 12 15 2 13 14 3 4 22 3 5 21 3 6 20 3 7 19 3 8 18 3 9 17 3 10 16 3 11 15 3 12 14 3 27 28 4 5 20 4 6 19 4 7 18 4 8 17 4 9 16 4 10 15 4 11 14 4 12 1...
result:
ok accepted
Test #6:
score: 0
Accepted
time: 0ms
memory: 12644kb
input:
63
output:
1 2 58 1 3 57 1 4 56 1 5 55 1 6 54 1 7 53 1 8 52 1 9 51 1 10 50 1 11 49 1 12 48 1 13 47 1 14 46 1 15 45 1 16 44 1 17 43 1 18 42 1 19 41 1 20 40 1 21 39 1 22 38 1 23 37 1 24 36 1 25 35 1 26 34 1 27 33 1 28 32 1 29 31 2 3 56 2 4 55 2 5 54 2 6 53 2 7 52 2 8 51 2 9 50 2 10 49 2 11 48 2 12 47 2 13 46 2 1...
result:
ok accepted
Test #7:
score: 0
Accepted
time: 0ms
memory: 12652kb
input:
127
output:
1 2 122 1 3 121 1 4 120 1 5 119 1 6 118 1 7 117 1 8 116 1 9 115 1 10 114 1 11 113 1 12 112 1 13 111 1 14 110 1 15 109 1 16 108 1 17 107 1 18 106 1 19 105 1 20 104 1 21 103 1 22 102 1 23 101 1 24 100 1 25 99 1 26 98 1 27 97 1 28 96 1 29 95 1 30 94 1 31 93 1 32 92 1 33 91 1 34 90 1 35 89 1 36 88 1 37 ...
result:
ok accepted
Test #8:
score: -9.09091
Runtime Error
input:
255
output:
1 2 250 1 3 249 1 4 248 1 5 247 1 6 246 1 7 245 1 8 244 1 9 243 1 10 242 1 11 241 1 12 240 1 13 239 1 14 238 1 15 237 1 16 236 1 17 235 1 18 234 1 19 233 1 20 232 1 21 231 1 22 230 1 23 229 1 24 228 1 25 227 1 26 226 1 27 225 1 28 224 1 29 223 1 30 222 1 31 221 1 32 220 1 33 219 1 34 218 1 35 217 1 ...
result:
Subtask #2:
score: 0
Runtime Error
Test #12:
score: 9.09091
Accepted
time: 0ms
memory: 12720kb
input:
3
output:
1 2 3
result:
ok accepted
Test #13:
score: 0
Accepted
time: 3ms
memory: 12660kb
input:
9
output:
1 2 4 3 5 6 7 1 5 7 4 6 7 2 3 8 5 4 8 6 2 8 3 1 9 1 6 9 5 2 9 4 3 7 8 9
result:
ok accepted
Test #14:
score: 0
Accepted
time: 0ms
memory: 12940kb
input:
27
output:
1 2 22 1 3 21 1 4 20 1 5 19 1 6 18 1 7 17 1 8 16 1 9 15 1 10 14 1 11 13 2 3 20 2 4 19 2 5 18 2 6 17 2 7 16 2 8 15 2 9 14 2 10 13 2 11 12 3 4 18 3 5 17 3 6 16 3 7 15 3 8 14 3 9 13 3 10 12 3 23 24 4 5 16 4 6 15 4 7 14 4 8 13 4 9 12 4 10 11 4 22 24 5 6 14 5 7 13 5 8 12 5 9 11 5 21 24 5 22 23 6 7 12 6 8...
result:
ok accepted
Test #15:
score: 0
Accepted
time: 0ms
memory: 12576kb
input:
81
output:
1 2 76 1 3 75 1 4 74 1 5 73 1 6 72 1 7 71 1 8 70 1 9 69 1 10 68 1 11 67 1 12 66 1 13 65 1 14 64 1 15 63 1 16 62 1 17 61 1 18 60 1 19 59 1 20 58 1 21 57 1 22 56 1 23 55 1 24 54 1 25 53 1 26 52 1 27 51 1 28 50 1 29 49 1 30 48 1 31 47 1 32 46 1 33 45 1 34 44 1 35 43 1 36 42 1 37 41 1 38 40 2 3 74 2 4 7...
result:
ok accepted
Test #16:
score: 0
Accepted
time: 0ms
memory: 12712kb
input:
243
output:
1 2 238 1 3 237 1 4 236 1 5 235 1 6 234 1 7 233 1 8 232 1 9 231 1 10 230 1 11 229 1 12 228 1 13 227 1 14 226 1 15 225 1 16 224 1 17 223 1 18 222 1 19 221 1 20 220 1 21 219 1 22 218 1 23 217 1 24 216 1 25 215 1 26 214 1 27 213 1 28 212 1 29 211 1 30 210 1 31 209 1 32 208 1 33 207 1 34 206 1 35 205 1 ...
result:
ok accepted
Test #17:
score: 0
Accepted
time: 6ms
memory: 12732kb
input:
729
output:
1 2 724 1 3 723 1 4 722 1 5 721 1 6 720 1 7 719 1 8 718 1 9 717 1 10 716 1 11 715 1 12 714 1 13 713 1 14 712 1 15 711 1 16 710 1 17 709 1 18 708 1 19 707 1 20 706 1 21 705 1 22 704 1 23 703 1 24 702 1 25 701 1 26 700 1 27 699 1 28 698 1 29 697 1 30 696 1 31 695 1 32 694 1 33 693 1 34 692 1 35 691 1 ...
result:
ok accepted
Test #18:
score: -9.09091
Runtime Error
input:
2187
output:
1 2 2182 1 3 2181 1 4 2180 1 5 2179 1 6 2178 1 7 2177 1 8 2176 1 9 2175 1 10 2174 1 11 2173 1 12 2172 1 13 2171 1 14 2170 1 15 2169 1 16 2168 1 17 2167 1 18 2166 1 19 2165 1 20 2164 1 21 2163 1 22 2162 1 23 2161 1 24 2160 1 25 2159 1 26 2158 1 27 2157 1 28 2156 1 29 2155 1 30 2154 1 31 2153 1 32 215...
result:
Subtask #3:
score: 0
Runtime Error
Test #19:
score: 9.09091
Accepted
time: 3ms
memory: 12808kb
input:
1
output:
result:
ok accepted
Test #20:
score: 0
Accepted
time: 3ms
memory: 12644kb
input:
25
output:
1 2 20 1 3 19 1 4 18 1 5 17 1 6 16 1 7 15 1 8 14 1 9 13 1 10 12 2 3 18 2 4 17 2 5 16 2 6 15 2 7 14 2 8 13 2 9 12 2 10 11 3 4 16 3 5 15 3 6 14 3 7 13 3 8 12 3 9 11 3 21 22 4 5 14 4 6 13 4 7 12 4 8 11 4 9 10 4 20 22 5 6 12 5 7 11 5 8 10 5 19 22 5 20 21 6 7 10 6 8 9 6 18 22 6 19 21 7 17 22 7 18 21 7 19...
result:
ok accepted
Test #21:
score: -9.09091
Runtime Error
input:
2977
output:
1 2 2972 1 3 2971 1 4 2970 1 5 2969 1 6 2968 1 7 2967 1 8 2966 1 9 2965 1 10 2964 1 11 2963 1 12 2962 1 13 2961 1 14 2960 1 15 2959 1 16 2958 1 17 2957 1 18 2956 1 19 2955 1 20 2954 1 21 2953 1 22 2952 1 23 2951 1 24 2950 1 25 2949 1 26 2948 1 27 2947 1 28 2946 1 29 2945 1 30 2944 1 31 2943 1 32 294...
result:
Subtask #4:
score: 0
Runtime Error
Test #24:
score: 9.09091
Accepted
time: 0ms
memory: 12680kb
input:
7
output:
5 1 3 5 4 2 6 3 4 6 2 1 7 1 4 7 3 2 5 6 7
result:
ok accepted
Test #25:
score: 0
Accepted
time: 0ms
memory: 12660kb
input:
31
output:
1 2 26 1 3 25 1 4 24 1 5 23 1 6 22 1 7 21 1 8 20 1 9 19 1 10 18 1 11 17 1 12 16 1 13 15 2 3 24 2 4 23 2 5 22 2 6 21 2 7 20 2 8 19 2 9 18 2 10 17 2 11 16 2 12 15 2 13 14 3 4 22 3 5 21 3 6 20 3 7 19 3 8 18 3 9 17 3 10 16 3 11 15 3 12 14 3 27 28 4 5 20 4 6 19 4 7 18 4 8 17 4 9 16 4 10 15 4 11 14 4 12 1...
result:
ok accepted
Test #26:
score: -9.09091
Runtime Error
input:
2983
output:
1 2 2978 1 3 2977 1 4 2976 1 5 2975 1 6 2974 1 7 2973 1 8 2972 1 9 2971 1 10 2970 1 11 2969 1 12 2968 1 13 2967 1 14 2966 1 15 2965 1 16 2964 1 17 2963 1 18 2962 1 19 2961 1 20 2960 1 21 2959 1 22 2958 1 23 2957 1 24 2956 1 25 2955 1 26 2954 1 27 2953 1 28 2952 1 29 2951 1 30 2950 1 31 2949 1 32 294...
result:
Subtask #5:
score: 0
Runtime Error
Test #29:
score: 9.09091
Accepted
time: 0ms
memory: 12644kb
input:
13
output:
1 2 8 1 3 7 1 4 6 2 3 6 2 4 5 3 9 10 4 8 10 5 7 10 5 8 9 6 7 9 11 1 9 11 10 2 11 4 3 11 7 8 11 5 6 12 9 4 12 2 7 12 3 5 12 8 6 12 1 10 13 1 5 13 10 6 13 9 2 13 4 7 13 3 8 11 12 13
result:
ok accepted
Test #30:
score: -9.09091
Runtime Error
input:
37
output:
result:
Subtask #6:
score: 0
Runtime Error
Test #34:
score: 9.09091
Accepted
time: 0ms
memory: 12952kb
input:
19
output:
1 2 14 1 3 13 1 4 12 1 5 11 1 6 10 1 7 9 2 3 12 2 4 11 2 5 10 2 6 9 2 7 8 3 4 10 3 5 9 3 6 8 3 15 16 4 5 8 4 6 7 4 14 16 5 13 16 5 14 15 6 12 16 6 13 15 7 11 16 7 12 15 7 13 14 8 10 16 8 11 15 8 12 14 9 10 15 9 11 14 9 12 13 10 11 13 17 1 15 17 4 9 17 16 2 17 13 8 17 3 11 17 12 10 17 14 6 17 5 7 18 ...
result:
ok accepted
Test #35:
score: 0
Accepted
time: 0ms
memory: 12636kb
input:
43
output:
1 2 38 1 3 37 1 4 36 1 5 35 1 6 34 1 7 33 1 8 32 1 9 31 1 10 30 1 11 29 1 12 28 1 13 27 1 14 26 1 15 25 1 16 24 1 17 23 1 18 22 1 19 21 2 3 36 2 4 35 2 5 34 2 6 33 2 7 32 2 8 31 2 9 30 2 10 29 2 11 28 2 12 27 2 13 26 2 14 25 2 15 24 2 16 23 2 17 22 2 18 21 2 19 20 3 4 34 3 5 33 3 6 32 3 7 31 3 8 30 ...
result:
ok accepted
Test #36:
score: -9.09091
Runtime Error
input:
2995
output:
1 2 2990 1 3 2989 1 4 2988 1 5 2987 1 6 2986 1 7 2985 1 8 2984 1 9 2983 1 10 2982 1 11 2981 1 12 2980 1 13 2979 1 14 2978 1 15 2977 1 16 2976 1 17 2975 1 18 2974 1 19 2973 1 20 2972 1 21 2971 1 22 2970 1 23 2969 1 24 2968 1 25 2967 1 26 2966 1 27 2965 1 28 2964 1 29 2963 1 30 2962 1 31 2961 1 32 296...
result:
Subtask #7:
score: 9.09091
Accepted
Test #39:
score: 9.09091
Accepted
time: 0ms
memory: 12940kb
input:
3
output:
1 2 3
result:
ok accepted
Test #40:
score: 0
Accepted
time: 0ms
memory: 12648kb
input:
27
output:
1 2 22 1 3 21 1 4 20 1 5 19 1 6 18 1 7 17 1 8 16 1 9 15 1 10 14 1 11 13 2 3 20 2 4 19 2 5 18 2 6 17 2 7 16 2 8 15 2 9 14 2 10 13 2 11 12 3 4 18 3 5 17 3 6 16 3 7 15 3 8 14 3 9 13 3 10 12 3 23 24 4 5 16 4 6 15 4 7 14 4 8 13 4 9 12 4 10 11 4 22 24 5 6 14 5 7 13 5 8 12 5 9 11 5 21 24 5 22 23 6 7 12 6 8...
result:
ok accepted
Test #41:
score: 0
Accepted
time: 168ms
memory: 13008kb
input:
2979
output:
1 2 2974 1 3 2973 1 4 2972 1 5 2971 1 6 2970 1 7 2969 1 8 2968 1 9 2967 1 10 2966 1 11 2965 1 12 2964 1 13 2963 1 14 2962 1 15 2961 1 16 2960 1 17 2959 1 18 2958 1 19 2957 1 20 2956 1 21 2955 1 22 2954 1 23 2953 1 24 2952 1 25 2951 1 26 2950 1 27 2949 1 28 2948 1 29 2947 1 30 2946 1 31 2945 1 32 294...
result:
ok accepted
Test #42:
score: 0
Accepted
time: 152ms
memory: 12728kb
input:
2955
output:
1 2 2950 1 3 2949 1 4 2948 1 5 2947 1 6 2946 1 7 2945 1 8 2944 1 9 2943 1 10 2942 1 11 2941 1 12 2940 1 13 2939 1 14 2938 1 15 2937 1 16 2936 1 17 2935 1 18 2934 1 19 2933 1 20 2932 1 21 2931 1 22 2930 1 23 2929 1 24 2928 1 25 2927 1 26 2926 1 27 2925 1 28 2924 1 29 2923 1 30 2922 1 31 2921 1 32 292...
result:
ok accepted
Test #43:
score: 0
Accepted
time: 37ms
memory: 12944kb
input:
1419
output:
1 2 1414 1 3 1413 1 4 1412 1 5 1411 1 6 1410 1 7 1409 1 8 1408 1 9 1407 1 10 1406 1 11 1405 1 12 1404 1 13 1403 1 14 1402 1 15 1401 1 16 1400 1 17 1399 1 18 1398 1 19 1397 1 20 1396 1 21 1395 1 22 1394 1 23 1393 1 24 1392 1 25 1391 1 26 1390 1 27 1389 1 28 1388 1 29 1387 1 30 1386 1 31 1385 1 32 138...
result:
ok accepted
Subtask #8:
score: 0
Runtime Error
Test #44:
score: 9.09091
Accepted
time: 0ms
memory: 12644kb
input:
21
output:
1 2 16 1 3 15 1 4 14 1 5 13 1 6 12 1 7 11 1 8 10 2 3 14 2 4 13 2 5 12 2 6 11 2 7 10 2 8 9 3 4 12 3 5 11 3 6 10 3 7 9 3 17 18 4 5 10 4 6 9 4 7 8 4 16 18 5 6 8 5 15 18 5 16 17 6 14 18 6 15 17 7 13 18 7 14 17 7 15 16 8 12 18 8 13 17 8 14 16 9 11 18 9 12 17 9 13 16 9 14 15 10 11 17 10 12 16 10 13 15 11 ...
result:
ok accepted
Test #45:
score: 0
Accepted
time: 0ms
memory: 12936kb
input:
45
output:
1 2 40 1 3 39 1 4 38 1 5 37 1 6 36 1 7 35 1 8 34 1 9 33 1 10 32 1 11 31 1 12 30 1 13 29 1 14 28 1 15 27 1 16 26 1 17 25 1 18 24 1 19 23 1 20 22 2 3 38 2 4 37 2 5 36 2 6 35 2 7 34 2 8 33 2 9 32 2 10 31 2 11 30 2 12 29 2 13 28 2 14 27 2 15 26 2 16 25 2 17 24 2 18 23 2 19 22 2 20 21 3 4 36 3 5 35 3 6 3...
result:
ok accepted
Test #46:
score: -9.09091
Runtime Error
input:
2997
output:
1 2 2992 1 3 2991 1 4 2990 1 5 2989 1 6 2988 1 7 2987 1 8 2986 1 9 2985 1 10 2984 1 11 2983 1 12 2982 1 13 2981 1 14 2980 1 15 2979 1 16 2978 1 17 2977 1 18 2976 1 19 2975 1 20 2974 1 21 2973 1 22 2972 1 23 2971 1 24 2970 1 25 2969 1 26 2968 1 27 2967 1 28 2966 1 29 2965 1 30 2964 1 31 2963 1 32 296...
result:
Subtask #9:
score: 0
Runtime Error
Test #49:
score: 9.09091
Accepted
time: 3ms
memory: 12636kb
input:
9
output:
1 2 4 3 5 6 7 1 5 7 4 6 7 2 3 8 5 4 8 6 2 8 3 1 9 1 6 9 5 2 9 4 3 7 8 9
result:
ok accepted
Test #50:
score: 0
Accepted
time: 0ms
memory: 12604kb
input:
33
output:
1 2 28 1 3 27 1 4 26 1 5 25 1 6 24 1 7 23 1 8 22 1 9 21 1 10 20 1 11 19 1 12 18 1 13 17 1 14 16 2 3 26 2 4 25 2 5 24 2 6 23 2 7 22 2 8 21 2 9 20 2 10 19 2 11 18 2 12 17 2 13 16 2 14 15 3 4 24 3 5 23 3 6 22 3 7 21 3 8 20 3 9 19 3 10 18 3 11 17 3 12 16 3 13 15 3 29 30 4 5 22 4 6 21 4 7 20 4 8 19 4 9 1...
result:
ok accepted
Test #51:
score: -9.09091
Runtime Error
input:
2985
output:
1 2 2980 1 3 2979 1 4 2978 1 5 2977 1 6 2976 1 7 2975 1 8 2974 1 9 2973 1 10 2972 1 11 2971 1 12 2970 1 13 2969 1 14 2968 1 15 2967 1 16 2966 1 17 2965 1 18 2964 1 19 2963 1 20 2962 1 21 2961 1 22 2960 1 23 2959 1 24 2958 1 25 2957 1 26 2956 1 27 2955 1 28 2954 1 29 2953 1 30 2952 1 31 2951 1 32 295...
result:
Subtask #10:
score: 0
Runtime Error
Test #54:
score: 9.09091
Accepted
time: 3ms
memory: 12648kb
input:
15
output:
1 2 10 1 3 9 1 4 8 1 5 7 2 3 8 2 4 7 2 5 6 3 4 6 3 11 12 4 10 12 5 9 12 5 10 11 6 8 12 6 9 11 7 8 11 7 9 10 13 1 11 13 4 5 13 3 7 13 12 2 13 9 8 13 10 6 14 11 4 14 5 3 14 7 12 14 2 9 14 8 10 14 6 1 15 1 12 15 11 2 15 4 9 15 5 8 15 3 10 15 7 6 13 14 15
result:
ok accepted
Test #55:
score: 0
Accepted
time: 2ms
memory: 12624kb
input:
39
output:
1 2 34 1 3 33 1 4 32 1 5 31 1 6 30 1 7 29 1 8 28 1 9 27 1 10 26 1 11 25 1 12 24 1 13 23 1 14 22 1 15 21 1 16 20 1 17 19 2 3 32 2 4 31 2 5 30 2 6 29 2 7 28 2 8 27 2 9 26 2 10 25 2 11 24 2 12 23 2 13 22 2 14 21 2 15 20 2 16 19 2 17 18 3 4 30 3 5 29 3 6 28 3 7 27 3 8 26 3 9 25 3 10 24 3 11 23 3 12 22 3...
result:
ok accepted
Test #56:
score: -9.09091
Runtime Error
input:
2991
output:
1 2 2986 1 3 2985 1 4 2984 1 5 2983 1 6 2982 1 7 2981 1 8 2980 1 9 2979 1 10 2978 1 11 2977 1 12 2976 1 13 2975 1 14 2974 1 15 2973 1 16 2972 1 17 2971 1 18 2970 1 19 2969 1 20 2968 1 21 2967 1 22 2966 1 23 2965 1 24 2964 1 25 2963 1 26 2962 1 27 2961 1 28 2960 1 29 2959 1 30 2958 1 31 2957 1 32 295...
result:
Subtask #11:
score: 0
Skipped
Dependency #1:
0%