QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#339604 | #895. Color | oscaryang | AC ✓ | 31ms | 4632kb | C++14 | 2.6kb | 2024-02-27 16:40:20 | 2024-02-27 16:40:20 |
Judging History
answer
#include<bits/stdc++.h>
#define vc vector
#define pb emplace_back
#define pii pair<int, int>
#define mkp make_pair
#define rep(i, a, b) for(int i = (a); i <= (b); ++i)
#define lep(i, a, b) for(int i = (a); i >= (b); --i)
using namespace std;
inline int read() {
int x = 0, w = 0; char ch = getchar(); while(!isdigit(ch)) w |= (ch == '-'), ch = getchar();
while(isdigit(ch)) x = x * 10 + (ch ^ 48), ch = getchar(); return w ? -x : x;
}
const int N = 205, inf = 1e9;
namespace flow {
const int MAXN = N * N;
int S, T, hed, tl, maxflow, Q[MAXN], dep[MAXN];
int cur[MAXN], hd[MAXN], to[MAXN << 1], ne[MAXN << 1], e[MAXN << 1], tc = 1;
inline void prework() {
tc = 1; maxflow = 0; rep(i, 0, T) hd[i] = 0;
}
inline void add(int x, int y, int z) {
to[++tc] = y; ne[tc] = hd[x]; hd[x] = tc; e[tc] = z;
to[++tc] = x; ne[tc] = hd[y]; hd[y] = tc; e[tc] = 0;
}
inline bool bfs() {
rep(i, 0, T) dep[i] = -1;
queue<int> Q; Q.push(S); dep[S] = 0;
while(!Q.empty()) {
int x = Q.front(); Q.pop(); cur[x] = hd[x];
if(x == T) return 1;
for(int i = hd[x], y; i; i = ne[i])
if(e[i] && dep[y = to[i]] == -1) dep[y] = dep[x] + 1, Q.push(y);
}
return 0;
}
inline int dfs(int x, int fl) {
if(x == T) return maxflow += fl, fl;
for(int &i = cur[x], y, o; i; i = ne[i])
if(e[i] && dep[y = to[i]] == dep[x] + 1 && (o = dfs(y, min(fl, e[i]))))
return e[i] -= o, e[i ^ 1] += o, o;
return 0;
}
inline void dinic() { while(bfs()) { while(dfs(S, inf)); } }
}
int n, m, p[N], a[N][N], in[N][N];
inline void testcase() {
n = read(); m = read();
rep(i, 0, m) rep(j, 0, m) in[i][j] = a[i][j] = 0, p[i] = 0;
rep(i, 1, n) rep(j, i + 1, n) {
a[i][j] = read(); ++p[a[i][j]];
in[a[i][j]][i] = in[a[i][j]][j] = 1;
}
if(m % 2 == 0) return puts("No"), void();
rep(i, 1, m) if(n - 2 * p[i] > m - n + 1) return puts("No"), void();
puts("Yes");
while(n <= m + 1) {
flow :: S = m + n + 2;
flow :: T = m + n + 3;
flow :: prework();
flow :: add(n + m + 1, flow :: T, m - n);
rep(i, 1, n) flow :: add(m + i, flow :: T, 1);
rep(i, 1, m) {
flow :: add(flow :: S, i, 1);
flow :: add(i, n + m + 1, m + 1 + 2 * p[i] - 2 * n);
rep(j, 1, n) if(!in[i][j]) flow :: add(i, j + m, 1);
}
flow :: dinic();
rep(x, 1, m) for(int i = flow :: hd[x], y; i; i = flow :: ne[i])
if((y = flow :: to[i]) != n + m + 1 && !flow :: e[i])
a[y - m][n + 1] = x, in[x][n + 1] = in[x][y - m] = 1, ++p[x];
++n;
}
rep(i, 1, m + 1) rep(j, i + 1, m + 1)
printf("%d%c", a[i][j], " \n"[j == m + 1]);
}
signed main() {
int t = 1; while(t--) testcase();
return 0;
}
詳細信息
Test #1:
score: 100
Accepted
time: 0ms
memory: 4040kb
input:
3 5 1 2 4
output:
Yes 1 2 4 3 5 4 3 5 2 5 1 3 2 1 4
result:
ok ok
Test #2:
score: 0
Accepted
time: 1ms
memory: 3760kb
input:
4 5 1 2 3 3 2 1
output:
No
result:
ok ok
Test #3:
score: 0
Accepted
time: 0ms
memory: 3500kb
input:
9 11 11 10 3 4 7 5 2 8 2 10 7 4 6 5 1 9 6 3 8 4 11 5 11 2 6 7 10 3 9 2 9 8 5 1 10 3
output:
No
result:
ok ok
Test #4:
score: 0
Accepted
time: 0ms
memory: 3768kb
input:
12 11 2 11 8 9 1 3 10 7 5 4 6 5 11 10 6 4 9 8 7 1 3 3 8 4 9 7 2 10 6 1 5 2 6 1 4 9 10 7 11 2 6 3 1 7 4 7 8 10 3 9 5 5 1 8 11 10 11 4 3 2 6 5 9 2 11 8
output:
Yes 2 11 8 9 1 3 10 7 5 4 6 5 11 10 6 4 9 8 7 1 3 3 8 4 9 7 2 10 6 1 5 2 6 1 4 9 10 7 11 2 6 3 1 7 4 7 8 10 3 9 5 5 1 8 11 10 11 4 3 2 6 5 9 2 11 8
result:
ok ok
Test #5:
score: 0
Accepted
time: 0ms
memory: 3760kb
input:
3 9 2 8 4
output:
Yes 2 8 7 5 9 1 3 6 4 4 8 9 7 6 1 5 3 9 7 6 3 5 2 1 6 1 5 4 3 2 3 4 2 1 8 2 8 4 5 9 8 7 7 6 9
result:
ok ok
Test #6:
score: 0
Accepted
time: 1ms
memory: 3608kb
input:
8 9 8 3 6 9 2 5 7 2 3 1 7 9 5 7 8 6 4 9 4 5 8 2 3 2 6 1 4 3
output:
No
result:
ok ok
Test #7:
score: 0
Accepted
time: 0ms
memory: 3764kb
input:
5 9 2 7 3 8 6 8 4 2 9 1
output:
Yes 2 7 3 8 6 1 9 5 4 6 8 4 5 9 1 7 3 2 9 8 5 4 3 1 1 9 7 5 4 6 7 3 6 2 5 4 3 1 2 2 6 8 8 7 9
result:
ok ok
Test #8:
score: 0
Accepted
time: 1ms
memory: 3704kb
input:
2 9 6
output:
Yes 6 8 9 4 7 2 1 3 5 9 8 7 4 3 5 2 1 7 5 1 6 3 4 2 6 2 5 4 1 3 3 1 2 8 9 9 6 5 8 8 7 4 9 7 6
result:
ok ok
Test #9:
score: 0
Accepted
time: 1ms
memory: 3764kb
input:
7 7 2 5 6 1 7 4 7 5 6 4 3 3 2 1 6 4 2 1 3 7 5
output:
Yes 2 5 6 1 7 4 3 7 5 6 4 3 1 3 2 1 6 4 4 2 1 7 3 7 5 5 6 2
result:
ok ok
Test #10:
score: 0
Accepted
time: 1ms
memory: 3852kb
input:
7 7 2 4 5 6 1 7 3 4 5 6 1 6 1 7 2 7 2 3 3 4 5
output:
Yes 2 4 5 6 1 7 3 3 4 5 6 1 7 6 1 7 2 5 7 2 3 1 3 4 2 5 4 6
result:
ok ok
Test #11:
score: 0
Accepted
time: 0ms
memory: 3816kb
input:
4 11 1 3 9 9 4 7
output:
Yes 1 3 9 7 8 10 11 4 2 5 6 9 4 8 7 11 10 2 3 6 5 7 10 11 4 2 5 6 8 1 11 10 2 1 6 5 3 8 9 5 6 3 1 4 2 6 5 1 4 2 3 3 8 9 1 7 9 8 7 4 7 10 11 11 10 9
result:
ok ok
Test #12:
score: 0
Accepted
time: 0ms
memory: 3772kb
input:
1 11
output:
Yes 11 9 10 5 6 7 8 3 4 1 2 10 9 6 5 8 7 4 3 2 1 11 7 8 1 2 5 6 3 4 8 7 2 1 6 5 4 3 11 3 4 1 2 9 10 4 3 2 1 10 9 11 9 10 5 6 10 9 6 5 11 7 8 8 7 11
result:
ok ok
Test #13:
score: 0
Accepted
time: 27ms
memory: 4304kb
input:
82 199 70 77 112 105 155 100 170 32 185 179 197 164 145 63 166 50 160 30 88 196 2 64 144 42 35 96 27 85 128 44 54 110 175 80 21 154 189 125 86 74 131 106 19 114 18 133 40 13 184 82 89 135 182 117 59 92 137 14 188 20 95 121 183 130 11 46 113 156 153 65 199 56 194 123 52 51 36 49 5 24 34 49 84 77 127 ...
output:
Yes 70 77 112 105 155 100 170 32 185 179 197 164 145 63 166 50 160 30 88 196 2 64 144 42 35 96 27 85 128 44 54 110 175 80 21 154 189 125 86 74 131 106 19 114 18 133 40 13 184 82 89 135 182 117 59 92 137 14 188 20 95 121 183 130 11 46 113 156 153 65 199 56 194 123 52 51 36 49 5 24 34 118 119 111 122 ...
result:
ok ok
Test #14:
score: 0
Accepted
time: 21ms
memory: 4256kb
input:
72 197 195 140 65 80 45 104 92 126 57 125 157 18 135 117 107 1 172 197 49 142 78 134 52 191 151 181 73 138 150 180 130 93 59 108 188 9 81 51 123 79 178 42 6 17 119 55 118 97 37 22 71 20 36 58 141 165 136 77 30 91 187 190 82 120 129 69 63 2 11 35 19 122 47 62 27 86 74 108 39 107 139 197 117 99 89 180...
output:
Yes 195 140 65 80 45 104 92 126 57 125 157 18 135 117 107 1 172 197 49 142 78 134 52 191 151 181 73 138 150 180 130 93 59 108 188 9 81 51 123 79 178 42 6 17 119 55 118 97 37 22 71 20 36 58 141 165 136 77 30 91 187 190 82 120 129 69 63 2 11 35 19 124 133 122 127 121 128 132 116 115 131 137 110 106 10...
result:
ok ok
Test #15:
score: 0
Accepted
time: 10ms
memory: 4260kb
input:
143 195 82 97 92 117 11 73 21 153 143 63 12 135 4 133 91 60 178 66 76 18 118 1 104 171 106 31 139 187 70 108 179 34 87 85 188 41 101 113 122 191 165 145 121 83 123 159 49 158 164 62 84 126 177 51 7 184 152 19 3 77 10 2 103 95 163 24 107 39 64 67 96 5 80 16 89 102 134 182 14 161 142 99 125 136 109 16...
output:
Yes 82 97 92 117 11 73 21 153 143 63 12 135 4 133 91 60 178 66 76 18 118 1 104 171 106 31 139 187 70 108 179 34 87 85 188 41 101 113 122 191 165 145 121 83 123 159 49 158 164 62 84 126 177 51 7 184 152 19 3 77 10 2 103 95 163 24 107 39 64 67 96 5 80 16 89 102 134 182 14 161 142 99 125 136 109 162 55...
result:
ok ok
Test #16:
score: 0
Accepted
time: 4ms
memory: 4152kb
input:
174 193 79 119 86 42 174 7 101 170 146 44 38 73 50 138 24 14 151 163 148 25 106 173 116 74 67 76 182 193 37 39 131 123 40 137 13 176 97 126 190 142 47 156 6 185 109 3 120 113 90 17 177 32 57 29 100 127 41 33 46 30 186 144 118 58 62 104 48 71 105 191 179 20 72 167 145 102 187 82 98 11 133 2 4 112 169...
output:
Yes 79 119 86 42 174 7 101 170 146 44 38 73 50 138 24 14 151 163 148 25 106 173 116 74 67 76 182 193 37 39 131 123 40 137 13 176 97 126 190 142 47 156 6 185 109 3 120 113 90 17 177 32 57 29 100 127 41 33 46 30 186 144 118 58 62 104 48 71 105 191 179 20 72 167 145 102 187 82 98 11 133 2 4 112 169 157...
result:
ok ok
Test #17:
score: 0
Accepted
time: 27ms
memory: 4568kb
input:
15 191 66 175 49 145 124 75 69 94 101 170 57 141 181 54 186 60 156 135 86 80 105 112 181 68 152 1 65 169 74 53 4 189 23 30 99 177 70 110 174 139 118 69 63 88 95 164 51 135 175 48 23 165 159 184 191 69 147 40 80 144 144 138 163 170 48 126 19 59 123 89 114 121 190 77 161 10 74 108 115 184 71 155 4 68 ...
output:
Yes 66 175 49 145 124 75 69 94 101 170 57 141 181 54 177 174 176 179 178 169 180 167 186 184 187 190 191 183 189 188 185 152 182 147 146 144 143 142 173 139 172 168 171 133 164 165 166 163 161 159 162 121 160 117 116 157 158 156 155 111 154 109 153 106 151 150 149 148 93 91 90 89 92 88 140 85 138 13...
result:
ok ok
Test #18:
score: 0
Accepted
time: 26ms
memory: 4632kb
input:
63 189 105 46 157 174 34 8 64 51 181 61 29 175 135 161 75 150 90 92 154 47 26 156 155 69 97 14 78 164 17 41 15 184 163 152 159 180 54 85 134 132 53 99 3 128 2 39 89 127 88 171 166 7 81 182 31 10 172 162 153 108 114 57 99 21 38 87 61 117 104 45 114 82 39 188 25 128 14 143 145 18 100 79 20 19 122 150 ...
output:
Yes 105 46 157 174 34 8 64 51 181 61 29 175 135 161 75 150 90 92 154 47 26 156 155 69 97 14 78 164 17 41 15 184 163 152 159 180 54 85 134 132 53 99 3 128 2 39 89 127 88 171 166 7 81 182 31 10 172 162 153 108 114 57 126 129 131 130 136 125 124 138 122 137 123 139 133 110 121 120 119 144 143 116 145 1...
result:
ok ok
Test #19:
score: 0
Accepted
time: 11ms
memory: 4512kb
input:
112 187 180 49 19 105 158 132 103 32 168 31 8 42 178 128 30 62 13 40 150 162 144 172 87 174 97 177 4 175 37 171 135 80 34 46 28 58 54 18 122 136 84 147 15 35 77 63 91 161 170 179 167 38 76 187 36 115 96 146 93 9 25 33 142 109 23 27 44 176 47 90 152 169 131 2 78 102 155 22 154 182 120 98 156 165 53 6...
output:
Yes 180 49 19 105 158 132 103 32 168 31 8 42 178 128 30 62 13 40 150 162 144 172 87 174 97 177 4 175 37 171 135 80 34 46 28 58 54 18 122 136 84 147 15 35 77 63 91 161 170 179 167 38 76 187 36 115 96 146 93 9 25 33 142 109 23 27 44 176 47 90 152 169 131 2 78 102 155 22 154 182 120 98 156 165 53 66 3 ...
result:
ok ok
Test #20:
score: 0
Accepted
time: 11ms
memory: 4296kb
input:
126 185 111 155 67 158 102 139 129 31 4 92 96 25 145 32 66 7 117 108 112 156 143 71 86 101 6 135 46 30 185 146 132 18 10 131 75 93 70 84 98 52 90 21 3 14 61 174 142 157 181 80 22 82 8 161 97 184 44 76 77 1 38 59 167 63 49 162 118 176 178 99 64 128 100 114 41 134 17 57 9 141 119 105 180 35 182 154 19...
output:
Yes 111 155 67 158 102 139 129 31 4 92 96 25 145 32 66 7 117 108 112 156 143 71 86 101 6 135 46 30 185 146 132 18 10 131 75 93 70 84 98 52 90 21 3 14 61 174 142 157 181 80 22 82 8 161 97 184 44 76 77 1 38 59 167 63 49 162 118 176 178 99 64 128 100 114 41 134 17 57 9 141 119 105 180 35 182 154 19 152...
result:
ok ok
Test #21:
score: 0
Accepted
time: 4ms
memory: 4144kb
input:
162 183 173 132 82 107 22 65 83 80 102 171 5 104 119 81 9 151 32 133 116 78 142 131 105 18 6 178 144 21 37 13 54 59 48 167 163 55 35 64 39 137 97 45 74 174 50 92 159 169 153 94 129 130 95 17 73 160 101 85 76 62 14 150 168 112 141 68 180 99 172 120 140 138 177 61 79 29 8 143 84 2 46 60 38 118 139 77 ...
output:
Yes 173 132 82 107 22 65 83 80 102 171 5 104 119 81 9 151 32 133 116 78 142 131 105 18 6 178 144 21 37 13 54 59 48 167 163 55 35 64 39 137 97 45 74 174 50 92 159 169 153 94 129 130 95 17 73 160 101 85 76 62 14 150 168 112 141 68 180 99 172 120 140 138 177 61 79 29 8 143 84 2 46 60 38 118 139 77 136 ...
result:
ok ok
Test #22:
score: 0
Accepted
time: 18ms
memory: 4304kb
input:
89 181 105 176 72 16 98 52 51 108 160 7 134 32 144 128 88 123 20 129 152 122 126 110 171 25 130 19 151 21 101 181 76 114 58 27 28 111 178 113 22 56 104 79 60 64 33 3 157 139 6 85 143 50 8 103 5 71 14 115 180 80 97 117 37 57 10 138 69 132 30 48 141 164 166 148 179 159 75 149 162 118 175 87 11 133 24 ...
output:
Yes 105 176 72 16 98 52 51 108 160 7 134 32 144 128 88 123 20 129 152 122 126 110 171 25 130 19 151 21 101 181 76 114 58 27 28 111 178 113 22 56 104 79 60 64 33 3 157 139 6 85 143 50 8 103 5 71 14 115 180 80 97 117 37 57 10 138 69 132 30 48 141 164 166 148 179 159 75 149 162 118 175 87 11 133 24 70 ...
result:
ok ok
Test #23:
score: 0
Accepted
time: 15ms
memory: 4300kb
input:
87 181 160 140 120 60 115 63 179 148 17 53 126 3 58 55 178 76 139 33 94 86 117 111 29 161 14 48 62 97 106 132 77 170 155 127 28 16 31 153 136 83 18 147 22 59 67 176 151 87 172 40 39 30 142 32 21 95 54 42 105 78 85 45 9 91 110 181 175 101 167 65 81 64 2 146 92 66 75 99 157 80 8 72 116 149 174 163 94 ...
output:
Yes 160 140 120 60 115 63 179 148 17 53 126 3 58 55 178 76 139 33 94 86 117 111 29 161 14 48 62 97 106 132 77 170 155 127 28 16 31 153 136 83 18 147 22 59 67 176 151 87 172 40 39 30 142 32 21 95 54 42 105 78 85 45 9 91 110 181 175 101 167 65 81 64 2 146 92 66 75 99 157 80 8 72 116 149 174 163 93 90 ...
result:
ok ok
Test #24:
score: 0
Accepted
time: 19ms
memory: 4404kb
input:
105 199 169 119 3 158 156 112 12 34 89 83 43 191 4 94 28 17 87 30 5 168 182 76 192 56 181 33 189 82 35 107 97 63 8 52 68 117 196 1 173 32 57 98 139 67 134 125 6 165 54 176 93 31 62 42 10 135 199 86 36 153 114 7 91 95 20 118 157 144 23 146 51 44 162 71 11 110 194 164 150 47 171 90 187 145 126 184 29 ...
output:
Yes 169 119 3 158 156 112 12 34 89 83 43 191 4 94 28 17 87 30 5 168 182 76 192 56 181 33 189 82 35 107 97 63 8 52 68 117 196 1 173 32 57 98 139 67 134 125 6 165 54 176 93 31 62 42 10 135 199 86 36 153 114 7 91 95 20 118 157 144 23 146 51 44 162 71 11 110 194 164 150 47 171 90 187 145 126 184 29 122 ...
result:
ok ok
Test #25:
score: 0
Accepted
time: 10ms
memory: 4288kb
input:
141 191 3 80 104 142 19 97 58 63 134 68 59 14 13 35 154 85 33 112 83 23 190 144 51 1 119 185 72 32 103 129 96 151 176 71 5 75 22 78 124 34 141 69 136 42 70 160 76 7 191 57 110 156 11 26 161 111 93 6 84 36 12 169 46 118 135 179 27 92 41 38 152 28 100 172 43 18 121 138 25 186 79 8 4 53 147 178 180 125...
output:
Yes 3 80 104 142 19 97 58 63 134 68 59 14 13 35 154 85 33 112 83 23 190 144 51 1 119 185 72 32 103 129 96 151 176 71 5 75 22 78 124 34 141 69 136 42 70 160 76 7 191 57 110 156 11 26 161 111 93 6 84 36 12 169 46 118 135 179 27 92 41 38 152 28 100 172 43 18 121 138 25 186 79 8 4 53 147 178 180 125 77 ...
result:
ok ok
Test #26:
score: 0
Accepted
time: 31ms
memory: 4316kb
input:
57 199 141 192 97 102 69 87 106 149 46 146 100 48 125 43 25 143 40 58 176 76 145 93 197 42 11 8 110 112 167 160 30 92 134 90 73 136 162 163 84 68 170 70 39 116 91 77 14 199 130 107 179 183 119 86 20 65 79 159 104 113 61 55 194 179 174 85 184 158 39 169 102 51 157 44 67 87 142 167 183 81 97 181 83 12...
output:
Yes 141 192 97 102 69 87 106 149 46 146 100 48 125 43 25 143 40 58 176 76 145 93 197 42 11 8 110 112 167 160 30 92 134 90 73 136 162 163 84 68 170 70 39 116 91 77 14 199 130 107 179 183 119 86 20 65 142 139 140 144 137 148 133 147 132 131 152 135 153 151 138 118 154 157 155 115 114 159 109 150 156 1...
result:
ok ok
Test #27:
score: 0
Accepted
time: 13ms
memory: 4500kb
input:
121 187 103 83 37 1 74 154 135 180 19 120 96 23 126 73 130 34 139 87 58 137 66 105 20 92 32 89 91 163 67 112 147 72 142 125 94 118 116 48 49 113 69 93 185 160 184 55 46 152 165 36 174 127 186 54 44 27 7 151 63 86 8 39 181 122 110 102 64 143 144 108 53 187 133 88 145 167 12 2 6 4 148 158 35 173 109 1...
output:
Yes 103 83 37 1 74 154 135 180 19 120 96 23 126 73 130 34 139 87 58 137 66 105 20 92 32 89 91 163 67 112 147 72 142 125 94 118 116 48 49 113 69 93 185 160 184 55 46 152 165 36 174 127 186 54 44 27 7 151 63 86 8 39 181 122 110 102 64 143 144 108 53 187 133 88 145 167 12 2 6 4 148 158 35 173 109 17 17...
result:
ok ok
Test #28:
score: 0
Accepted
time: 14ms
memory: 4296kb
input:
111 183 28 24 3 21 165 77 8 167 95 118 154 127 36 66 38 54 43 23 98 183 64 146 178 153 125 155 131 166 115 103 130 4 50 13 9 96 144 7 108 69 150 109 30 70 168 90 61 162 112 34 15 147 16 31 76 60 121 83 151 88 17 113 182 126 138 80 143 139 29 134 10 174 55 18 107 14 79 94 11 39 159 35 22 2 149 81 136...
output:
Yes 28 24 3 21 165 77 8 167 95 118 154 127 36 66 38 54 43 23 98 183 64 146 178 153 125 155 131 166 115 103 130 4 50 13 9 96 144 7 108 69 150 109 30 70 168 90 61 162 112 34 15 147 16 31 76 60 121 83 151 88 17 113 182 126 138 80 143 139 29 134 10 174 55 18 107 14 79 94 11 39 159 35 22 2 149 81 136 86 ...
result:
ok ok
Test #29:
score: 0
Accepted
time: 27ms
memory: 4288kb
input:
44 193 161 149 68 4 64 31 191 76 17 193 96 16 24 101 123 87 170 133 33 39 52 163 132 102 86 63 166 10 1 62 168 106 160 155 190 158 129 187 100 71 36 114 59 95 126 68 120 12 116 57 153 60 124 27 5 46 56 7 20 24 25 138 50 47 43 22 144 96 123 84 145 97 183 53 67 41 104 122 106 30 143 175 64 133 65 120 ...
output:
Yes 161 149 68 4 64 31 191 76 17 193 96 16 24 101 123 87 170 133 33 39 52 163 132 102 86 63 166 10 1 62 168 106 160 155 190 158 129 187 100 71 36 114 59 150 148 151 144 143 153 152 154 147 145 135 134 131 162 157 156 164 142 141 146 140 139 137 175 180 184 176 188 183 189 185 192 186 181 169 173 174...
result:
ok ok
Test #30:
score: 0
Accepted
time: 25ms
memory: 4360kb
input:
88 197 69 161 16 148 97 108 46 4 183 7 43 177 123 168 5 59 13 140 6 164 122 139 125 27 25 70 77 55 76 156 94 118 137 131 37 104 154 62 83 138 17 115 188 160 14 133 149 153 135 88 180 12 38 173 151 18 24 22 196 170 23 89 68 20 75 66 87 134 60 73 166 195 110 113 111 26 78 159 179 186 129 121 92 155 10...
output:
Yes 69 161 16 148 97 108 46 4 183 7 43 177 123 168 5 59 13 140 6 164 122 139 125 27 25 70 77 55 76 156 94 118 137 131 37 104 154 62 83 138 17 115 188 160 14 133 149 153 135 88 180 12 38 173 151 18 24 22 196 170 23 89 68 20 75 66 87 134 60 73 166 195 110 113 111 26 78 159 179 186 129 121 92 155 100 1...
result:
ok ok
Test #31:
score: 0
Accepted
time: 28ms
memory: 4248kb
input:
38 195 70 32 57 147 188 103 44 59 19 108 67 14 180 186 63 8 154 133 3 170 28 162 38 27 58 155 121 137 84 73 15 148 143 18 49 172 110 150 108 90 112 54 148 64 100 184 20 163 129 40 128 83 89 194 32 175 183 43 8 182 165 132 6 139 16 88 67 11 56 2 7 45 137 183 145 144 138 75 29 149 125 3 108 184 97 69 ...
output:
Yes 70 32 57 147 188 103 44 59 19 108 67 14 180 186 63 8 154 133 3 170 28 162 38 27 58 155 121 137 84 73 15 148 143 18 49 172 110 158 159 160 153 161 150 156 157 152 165 164 163 151 168 169 149 146 132 167 145 144 179 182 183 178 192 177 176 191 195 189 194 184 193 185 181 187 190 166 171 174 175 92...
result:
ok ok
Test #32:
score: 0
Accepted
time: 4ms
memory: 4148kb
input:
167 185 9 64 91 14 161 37 11 112 67 48 7 89 34 162 166 175 146 86 117 17 182 40 158 42 160 139 177 151 99 59 47 90 144 26 128 8 87 43 123 20 83 124 97 60 127 6 92 145 77 121 31 62 120 10 82 104 183 44 39 72 28 71 36 149 24 29 103 165 55 18 30 155 66 163 168 159 58 52 85 181 4 27 98 180 126 185 147 1...
output:
Yes 9 64 91 14 161 37 11 112 67 48 7 89 34 162 166 175 146 86 117 17 182 40 158 42 160 139 177 151 99 59 47 90 144 26 128 8 87 43 123 20 83 124 97 60 127 6 92 145 77 121 31 62 120 10 82 104 183 44 39 72 28 71 36 149 24 29 103 165 55 18 30 155 66 163 168 159 58 52 85 181 4 27 98 180 126 185 147 118 1...
result:
ok ok
Test #33:
score: 0
Accepted
time: 25ms
memory: 4320kb
input:
1 199
output:
Yes 199 197 198 193 194 195 196 185 186 187 188 189 190 191 192 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87...
result:
ok ok
Test #34:
score: 0
Accepted
time: 1ms
memory: 3552kb
input:
9 11 11 10 3 4 7 5 2 8 2 10 7 4 6 5 1 9 6 3 10 4 11 5 11 2 6 7 10 3 9 2 9 8 5 1 10 3
output:
No
result:
ok ok
Test #35:
score: 0
Accepted
time: 1ms
memory: 3908kb
input:
1 200
output:
No
result:
ok ok
Test #36:
score: 0
Accepted
time: 0ms
memory: 3836kb
input:
3 6 1 2 3
output:
No
result:
ok ok