QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#261671 | #6451. Maximum Color Clique | ZhouShang# | AC ✓ | 304ms | 7772kb | C++14 | 3.4kb | 2023-11-23 08:16:41 | 2023-11-23 08:16:41 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define int ll
#define rep(i,a,b) for(int i = a; i < (b); i++)
#define all(x) begin(x), end(x)
#define sz(x) (int)(x).size()
#define PB push_back
#define FS first
#define SD second
#define cmx(x, y) x = max(x, y)
#define cmn(x, y) x = min(x, y)
#define ary(k) array<int, k>
typedef pair<int, int> pii;
typedef vector<int> vi;
int kra[302][302];
int out[302];
vector<int> createSequence(int n) {
vector<int> cols;
for (int iter = 0; iter < n; iter++) {
for (int i = 0; i < n; i++) {
if (out[i])
continue;
int col = -1, ile = 0;
for (int j = 0; j < n; j++) {
if (i != j && !out[j])
col = kra[i][j];
}
for (int j = 0; j < n; j++) {
if (!out[j] && kra[i][j] == col)
ile++;
}
if (ile == n - iter - 1) {
cols.PB(col);
out[i] = 1;
break;
}
}
}
return cols;
}
const int mod = 1000000007;
int ile[302];
int dwumian[302][302];
int how_many[302][302], prefix[302][302], sufix[302][302];
int result[302][302];
inline int exactly(int c, int x) {
if (x == 0)
return how_many[c][x];
return how_many[c][x] - how_many[c][x-1];
}
inline int dwu(int n, int k) {
return dwumian[n][k];
}
signed main() {
cin.tie(0)->sync_with_stdio(0); cin.exceptions(cin.failbit);
int n;
cin >> n;
for (int i = 0; i < n; i++) {
for (int j = 0; j < n; j++) {
cin >> kra[i][j];
}
}
for (int i = 0; i <= n; i++) {
dwumian[i][0] = dwumian[i][i] = 1;
for (int j = 1; j < i; j++) {
dwumian[i][j] = dwumian[i-1][j-1] + dwumian[i-1][j];
dwumian[i][j] %= mod;
}
}
// Creating sequence
vector<int> col = createSequence(n);
// Solving
int res = 0;
for (int pref = 0; pref < n-1; pref++) {
ile[col[pref]]++;
for (int x = 0; x <= n+1; x++) {
prefix[0][x] = 1;
sufix[301][x] = 1;
}
// cerr << col[prefix] << "\n";
for (int c = 1; c <= 300; c++) {
how_many[c][0] = 1;
prefix[c][0] = 1;
for (int x = 1; x <= n; x++) {
how_many[c][x] = (dwu(ile[c], x) + how_many[c][x-1]) % mod;
prefix[c][x] = prefix[c-1][x] * how_many[c][x] % mod;
}
}
for (int c = 300; c >= 1; c--) {
for (int x = 1; x <= n; x++) {
sufix[c][x] = sufix[c+1][x] * how_many[c][x] % mod;
}
}
for (int c = 1; c <= 300; c++) {
for (int x = 1; x <= n; x++) {
result[c][x] = exactly(c, x) * prefix[c-1][x-1] % mod * sufix[c+1][x] % mod;
// if (c < 4)
// cerr << c << " " << x << " " << exactly(c, x) << " " << prefix[c-1][x-1] << " " << sufix[c+1][x] << "\n",
// cerr << c << " " << x << " " << result[c][x] << "\n";
// res += result[c][x] * (x + 1) * (n - pref - 1) % mod;
res += result[c][x] * (x + 1) % mod;
res %= mod;
}
}
// cerr << pref << " " << res << "\n\n";
}
cout << (res + n) % mod << "\n";
}
详细
Test #1:
score: 100
Accepted
time: 0ms
memory: 6252kb
input:
4 0 1 1 1 1 0 2 2 1 2 0 3 1 2 3 0
output:
26
result:
ok single line: '26'
Test #2:
score: 0
Accepted
time: 2ms
memory: 6280kb
input:
5 0 300 300 300 300 300 0 300 300 300 300 300 0 300 300 300 300 300 0 300 300 300 300 300 0
output:
80
result:
ok single line: '80'
Test #3:
score: 0
Accepted
time: 282ms
memory: 7708kb
input:
299 0 101 101 101 101 101 101 101 101 101 101 101 101 101 101 101 101 101 101 101 101 101 101 101 101 101 101 101 101 101 101 101 101 101 101 101 101 101 101 101 101 101 101 101 101 101 101 101 101 101 101 101 101 101 101 101 101 101 101 101 101 101 101 101 101 101 101 101 101 101 101 101 101 101 10...
output:
224065094
result:
ok single line: '224065094'
Test #4:
score: 0
Accepted
time: 288ms
memory: 7660kb
input:
295 0 106 106 106 106 106 106 106 278 106 218 106 106 106 106 93 106 197 106 93 218 106 106 106 106 93 93 106 222 218 106 106 106 106 220 62 106 106 106 278 106 106 106 106 106 106 106 197 106 106 278 106 106 106 218 106 106 278 106 106 106 106 106 106 93 5 106 106 106 106 106 66 106 106 227 106 93 ...
output:
137501046
result:
ok single line: '137501046'
Test #5:
score: 0
Accepted
time: 294ms
memory: 7648kb
input:
300 0 228 228 228 228 228 228 228 228 228 228 228 228 228 228 228 228 228 228 228 228 228 228 228 228 228 228 228 228 228 228 228 228 228 228 228 228 228 228 228 228 228 228 228 228 228 228 228 228 228 228 228 228 228 228 228 228 228 228 228 228 228 228 228 228 228 228 228 228 228 228 228 228 228 22...
output:
799949831
result:
ok single line: '799949831'
Test #6:
score: 0
Accepted
time: 296ms
memory: 7704kb
input:
300 0 129 129 129 129 129 129 129 215 129 215 129 129 129 129 129 129 129 215 129 215 215 129 271 129 215 129 129 129 129 129 90 129 90 90 90 129 129 129 129 215 129 90 129 129 215 129 129 215 215 215 129 129 215 129 13 129 129 129 177 90 215 129 129 129 215 129 129 177 129 90 129 215 129 129 129 21...
output:
197646554
result:
ok single line: '197646554'
Test #7:
score: 0
Accepted
time: 299ms
memory: 7712kb
input:
300 0 117 117 117 117 117 255 117 117 117 117 117 117 117 117 117 271 117 117 117 117 117 117 117 117 117 117 117 117 117 117 117 117 117 117 117 117 117 117 117 117 117 117 117 117 117 117 117 117 117 117 117 117 117 117 117 117 117 117 117 117 117 117 117 117 117 117 117 117 117 257 117 117 117 16...
output:
178274746
result:
ok single line: '178274746'
Test #8:
score: 0
Accepted
time: 297ms
memory: 7696kb
input:
296 0 86 86 86 86 86 86 86 86 86 86 86 86 86 86 86 86 86 86 86 86 86 86 86 86 86 86 86 86 113 86 86 86 86 86 86 86 86 86 86 86 189 86 86 86 86 86 86 86 86 86 86 86 86 86 86 86 86 86 86 86 86 86 86 86 77 86 86 86 86 86 86 86 86 86 86 86 86 86 86 86 86 86 86 86 86 86 86 86 86 86 86 86 86 86 86 86 86 8...
output:
603115574
result:
ok single line: '603115574'
Test #9:
score: 0
Accepted
time: 292ms
memory: 7636kb
input:
297 0 300 81 187 187 187 84 267 261 187 43 187 187 233 136 123 284 254 187 248 187 187 185 84 84 155 187 187 187 274 187 75 187 118 296 187 187 187 187 148 187 197 187 53 172 187 114 26 187 285 158 187 95 187 187 186 187 24 285 187 187 129 187 33 187 197 2 187 187 187 274 187 187 187 187 166 187 187...
output:
832699692
result:
ok single line: '832699692'
Test #10:
score: 0
Accepted
time: 301ms
memory: 7644kb
input:
298 0 98 98 98 98 98 98 98 98 98 98 98 98 98 98 98 98 98 98 98 98 98 98 98 98 98 98 98 98 98 98 98 98 98 19 98 98 98 98 98 98 19 98 19 98 98 98 98 19 98 98 98 98 98 98 98 98 98 19 98 98 98 98 19 98 98 19 98 98 98 98 19 98 98 19 98 98 98 98 98 98 98 98 98 98 98 98 98 98 98 98 98 98 19 19 98 98 98 98 ...
output:
414162421
result:
ok single line: '414162421'
Test #11:
score: 0
Accepted
time: 281ms
memory: 7648kb
input:
295 0 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 10...
output:
85514344
result:
ok single line: '85514344'
Test #12:
score: 0
Accepted
time: 179ms
memory: 7364kb
input:
235 0 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 ...
output:
895535980
result:
ok single line: '895535980'
Test #13:
score: 0
Accepted
time: 288ms
memory: 7648kb
input:
294 0 138 138 106 138 166 166 166 166 239 166 166 166 166 37 166 144 166 166 166 166 166 170 166 97 166 166 151 7 166 166 166 166 166 166 166 166 166 166 166 166 97 166 166 166 166 233 293 166 293 166 166 154 166 166 166 166 166 200 166 166 149 243 216 166 144 166 166 166 166 166 166 166 166 300 166...
output:
490436597
result:
ok single line: '490436597'
Test #14:
score: 0
Accepted
time: 292ms
memory: 7708kb
input:
300 0 176 44 176 176 176 44 44 176 176 176 176 176 44 176 176 176 176 176 176 176 176 176 176 176 176 176 176 176 44 176 176 176 176 176 176 176 176 44 176 44 176 176 176 44 176 176 176 176 176 176 176 176 44 176 176 44 44 176 176 44 44 176 176 176 176 176 44 44 176 176 176 176 176 176 176 176 176 1...
output:
746382416
result:
ok single line: '746382416'
Test #15:
score: 0
Accepted
time: 293ms
memory: 7648kb
input:
300 0 58 245 196 98 245 78 245 190 196 190 196 196 190 196 58 245 245 58 196 196 78 196 196 78 190 196 190 196 196 196 245 196 196 190 245 245 245 196 58 245 98 196 190 196 190 58 190 245 190 190 245 58 196 58 190 78 245 190 190 245 190 245 245 58 196 190 58 196 58 196 196 190 190 190 196 190 58 58 ...
output:
905678311
result:
ok single line: '905678311'
Test #16:
score: 0
Accepted
time: 296ms
memory: 7652kb
input:
300 0 172 46 259 156 39 262 61 177 177 30 172 151 60 256 288 151 224 157 288 93 62 136 159 247 77 177 92 224 247 210 224 288 39 92 72 151 40 50 253 263 158 233 38 112 262 158 256 216 261 172 288 75 22 256 292 163 19 220 263 166 132 295 279 210 39 67 263 92 222 92 253 253 18 253 282 32 36 282 157 177...
output:
899220466
result:
ok single line: '899220466'
Test #17:
score: 0
Accepted
time: 297ms
memory: 7772kb
input:
300 0 269 166 166 269 269 260 269 269 184 184 269 166 269 166 260 260 166 218 218 260 269 269 166 218 166 166 218 218 269 269 260 166 166 206 218 218 260 218 184 166 269 260 184 83 218 184 83 218 260 166 184 184 260 218 83 83 260 72 166 83 72 166 218 166 83 206 166 166 184 206 72 184 206 184 218 166...
output:
706796123
result:
ok single line: '706796123'
Test #18:
score: 0
Accepted
time: 304ms
memory: 7648kb
input:
300 0 186 186 44 186 186 186 186 44 44 44 44 186 44 186 186 186 44 67 44 44 186 44 186 186 186 186 186 44 44 44 44 44 186 186 44 67 186 186 44 186 186 44 186 186 44 44 67 186 44 186 44 44 44 186 186 186 44 186 44 186 186 186 44 44 186 186 186 186 67 186 44 44 44 186 186 186 186 186 186 186 186 44 44...
output:
205173206
result:
ok single line: '205173206'
Test #19:
score: 0
Accepted
time: 294ms
memory: 7676kb
input:
300 0 28 28 28 134 22 168 28 28 296 79 296 28 168 282 296 79 79 28 28 296 257 28 28 137 28 296 79 142 79 79 28 296 22 79 1 257 28 296 28 28 168 28 28 28 282 28 28 79 28 28 28 28 296 28 22 94 28 28 22 28 79 137 134 28 28 134 28 28 108 28 28 79 108 28 28 28 28 28 257 296 296 28 296 202 28 28 28 79 142...
output:
815908627
result:
ok single line: '815908627'
Test #20:
score: 0
Accepted
time: 292ms
memory: 7712kb
input:
299 0 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 ...
output:
926962184
result:
ok single line: '926962184'
Test #21:
score: 0
Accepted
time: 267ms
memory: 7660kb
input:
288 0 240 240 240 240 240 240 240 240 240 240 240 240 240 240 240 240 240 240 240 240 240 240 240 240 240 240 240 240 240 240 240 240 240 240 240 240 240 240 240 240 240 240 240 240 240 240 240 240 240 240 240 240 240 240 240 240 240 240 240 240 240 240 240 240 240 240 240 240 240 240 240 240 240 24...
output:
387297380
result:
ok single line: '387297380'
Test #22:
score: 0
Accepted
time: 289ms
memory: 7756kb
input:
297 0 232 232 232 232 232 232 232 232 232 232 232 232 232 232 232 232 232 232 232 78 232 232 232 232 232 232 232 232 232 232 232 50 232 266 232 232 157 203 232 232 232 232 232 232 232 232 278 232 232 242 232 232 232 232 232 232 232 232 278 232 232 232 232 232 232 232 232 232 232 157 232 232 232 232 ...
output:
394002233
result:
ok single line: '394002233'
Test #23:
score: 0
Accepted
time: 288ms
memory: 7656kb
input:
295 0 76 290 220 165 95 3 290 290 78 200 142 104 165 290 165 104 95 45 220 45 104 158 45 290 165 165 290 95 165 95 290 217 110 104 45 165 100 290 45 95 110 95 104 290 45 95 290 45 290 45 104 95 290 194 290 104 200 45 95 3 220 218 200 220 45 140 3 40 163 95 110 95 165 158 142 290 218 290 95 217 36 29...
output:
768048031
result:
ok single line: '768048031'
Test #24:
score: 0
Accepted
time: 288ms
memory: 7712kb
input:
299 0 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 ...
output:
74210755
result:
ok single line: '74210755'
Test #25:
score: 0
Accepted
time: 297ms
memory: 7764kb
input:
300 0 176 101 262 176 176 176 262 176 101 176 262 176 176 262 176 176 176 262 176 176 176 176 117 262 176 176 101 101 262 101 176 176 176 176 262 101 176 117 176 176 176 262 176 262 176 262 176 262 262 117 262 262 176 176 101 176 101 176 176 101 176 117 262 101 176 262 176 176 176 262 176 176 176 26...
output:
701023481
result:
ok single line: '701023481'
Test #26:
score: 0
Accepted
time: 304ms
memory: 7652kb
input:
299 0 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 291 8 8 8 8 8 8 8 8 8 8 249 8 8 8 8 8 8 8 8 8 8 8 66 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 249 8 8 8 8 8 8 221 8 8 8 8 153 262 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 177 8 8 8 8 8 8 8 8 8 8 8...
output:
328030166
result:
ok single line: '328030166'
Test #27:
score: 0
Accepted
time: 287ms
memory: 7716kb
input:
300 0 202 202 202 202 202 202 202 202 202 202 202 202 202 202 202 202 202 202 202 202 202 202 202 202 202 202 202 202 202 202 202 202 202 202 202 202 202 202 202 202 202 202 202 202 202 202 202 202 202 202 202 202 202 202 202 202 202 202 202 202 202 202 202 202 202 202 202 202 202 202 202 202 202 20...
output:
328214720
result:
ok single line: '328214720'
Test #28:
score: 0
Accepted
time: 291ms
memory: 7772kb
input:
300 0 204 204 204 204 204 204 204 204 204 204 204 204 204 204 204 204 204 204 204 204 204 204 204 204 204 204 204 204 204 204 204 204 204 204 204 204 204 204 204 204 204 204 204 204 204 204 204 204 204 204 204 204 204 204 204 204 204 204 204 204 204 204 204 204 204 204 204 204 204 204 204 204 204 20...
output:
605941905
result:
ok single line: '605941905'
Test #29:
score: 0
Accepted
time: 300ms
memory: 7752kb
input:
297 0 95 197 6 109 230 230 48 48 140 48 48 291 207 48 48 124 57 291 149 289 48 197 83 272 125 48 225 65 48 48 48 48 48 48 149 48 214 48 160 206 281 291 230 48 48 48 125 48 48 149 269 48 58 95 48 203 140 48 234 138 48 149 160 149 69 48 234 132 247 300 48 95 44 197 48 58 192 234 48 48 197 48 48 137 28...
output:
816411611
result:
ok single line: '816411611'
Test #30:
score: 0
Accepted
time: 299ms
memory: 7756kb
input:
300 0 53 258 258 31 262 246 258 258 263 286 49 258 44 53 258 258 258 258 258 258 258 170 90 258 118 214 258 132 258 258 258 271 258 258 258 258 214 258 258 286 258 258 258 258 258 279 258 1 214 258 53 213 258 258 239 258 271 206 258 258 258 258 258 258 22 258 258 258 206 258 258 20 214 213 258 258 2...
output:
613931266
result:
ok single line: '613931266'
Test #31:
score: 0
Accepted
time: 299ms
memory: 7660kb
input:
298 0 243 243 200 40 280 77 243 259 243 160 58 218 61 77 14 243 243 218 243 113 14 160 243 138 262 14 24 14 101 120 243 192 243 26 170 243 243 243 243 243 243 243 77 243 26 227 160 243 14 243 270 243 243 118 24 243 243 243 243 173 174 243 243 243 91 274 243 243 89 89 14 89 243 243 243 243 203 243 24...
output:
937956902
result:
ok single line: '937956902'
Test #32:
score: 0
Accepted
time: 293ms
memory: 7680kb
input:
299 0 166 166 166 166 166 166 166 166 166 166 166 166 166 166 166 166 166 166 166 166 166 166 166 166 166 166 166 166 166 166 166 166 166 166 166 166 166 166 166 166 166 166 166 166 166 166 166 166 166 166 166 166 166 166 166 166 166 166 166 166 166 166 166 166 166 166 166 166 166 166 166 166 166 16...
output:
61767795
result:
ok single line: '61767795'
Test #33:
score: 0
Accepted
time: 287ms
memory: 7620kb
input:
292 0 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 ...
output:
286888018
result:
ok single line: '286888018'
Test #34:
score: 0
Accepted
time: 291ms
memory: 7668kb
input:
300 0 184 184 184 184 184 184 184 184 184 184 184 184 184 184 184 184 184 184 184 184 184 184 184 184 184 184 184 184 184 184 184 184 184 184 184 184 184 184 184 184 184 184 184 184 184 184 184 184 184 184 184 184 184 184 184 184 184 184 184 184 184 184 184 184 184 184 184 184 184 184 184 184 184 18...
output:
606253694
result:
ok single line: '606253694'
Test #35:
score: 0
Accepted
time: 287ms
memory: 7768kb
input:
300 0 162 162 162 162 162 162 162 162 162 162 162 162 162 162 162 162 162 162 162 162 162 162 162 162 162 162 162 162 162 162 162 162 162 162 162 162 162 162 162 162 162 162 162 162 162 162 162 162 162 162 162 162 162 162 162 162 162 162 162 162 162 162 162 162 162 162 162 162 162 162 162 162 162 16...
output:
350268997
result:
ok single line: '350268997'
Test #36:
score: 0
Accepted
time: 250ms
memory: 7628kb
input:
280 0 48 48 64 268 48 107 48 64 243 243 243 48 201 243 243 107 243 243 213 64 243 243 48 48 268 107 243 53 53 107 243 243 48 243 107 243 48 243 243 243 64 48 213 243 243 243 64 48 243 243 48 48 243 243 48 48 243 243 243 48 48 243 48 268 48 48 243 64 64 268 64 243 48 243 243 243 48 48 48 64 213 213 2...
output:
797216242
result:
ok single line: '797216242'
Test #37:
score: 0
Accepted
time: 292ms
memory: 7648kb
input:
298 0 291 291 291 291 291 291 291 291 291 291 291 291 291 291 291 291 291 291 291 291 291 291 291 291 291 291 291 291 291 291 291 291 291 291 291 291 291 291 291 291 291 291 291 291 291 291 291 291 291 291 291 291 291 291 291 291 291 291 291 291 291 291 291 291 291 291 291 291 291 291 291 291 291 29...
output:
288980221
result:
ok single line: '288980221'
Test #38:
score: 0
Accepted
time: 290ms
memory: 7664kb
input:
300 0 117 117 117 117 117 117 117 117 117 117 117 117 117 117 117 117 117 117 117 117 117 117 117 117 117 117 117 117 117 117 117 117 117 117 117 117 117 117 117 117 117 117 117 117 117 117 117 117 117 117 117 117 117 117 117 117 117 117 117 117 117 117 117 117 117 117 117 117 117 117 117 117 117 11...
output:
389446582
result:
ok single line: '389446582'
Test #39:
score: 0
Accepted
time: 260ms
memory: 7648kb
input:
282 0 143 61 94 143 192 143 143 192 143 192 143 61 94 143 143 61 61 113 192 94 143 94 26 61 143 143 94 143 143 61 143 143 143 61 143 192 94 143 143 143 143 143 272 94 143 143 143 94 94 143 143 143 143 143 143 143 192 143 143 143 143 94 113 143 143 113 143 192 94 143 143 143 143 143 143 61 143 143 20...
output:
230538141
result:
ok single line: '230538141'
Test #40:
score: 0
Accepted
time: 248ms
memory: 7608kb
input:
277 0 191 191 215 15 280 118 69 81 215 215 41 41 81 287 292 215 191 81 191 215 215 191 191 69 118 191 191 215 81 15 191 15 215 191 191 191 264 69 191 191 160 191 81 15 280 81 191 215 280 215 15 191 160 215 81 81 215 15 191 81 79 81 280 69 215 15 160 81 191 191 15 191 81 268 81 81 15 215 215 215 191 ...
output:
918281717
result:
ok single line: '918281717'
Test #41:
score: 0
Accepted
time: 290ms
memory: 7736kb
input:
300 0 82 176 176 176 268 176 176 176 268 268 176 268 268 268 268 268 176 268 268 268 268 268 197 176 82 176 268 82 176 268 176 98 176 268 176 82 268 268 176 176 268 268 176 176 176 176 176 268 82 176 176 268 268 197 268 176 176 268 176 176 176 268 176 268 176 176 268 176 268 176 176 176 176 268 176 ...
output:
26534708
result:
ok single line: '26534708'
Test #42:
score: 0
Accepted
time: 299ms
memory: 7772kb
input:
300 0 165 271 97 165 165 271 200 261 165 165 165 165 165 165 253 165 212 165 165 165 200 165 216 165 165 165 165 165 165 261 165 165 165 165 165 165 165 165 165 165 165 130 165 165 271 165 197 165 271 165 165 165 165 165 165 165 165 165 165 165 165 200 29 212 271 165 165 165 165 165 165 165 165 165 ...
output:
586273615
result:
ok single line: '586273615'
Test #43:
score: 0
Accepted
time: 288ms
memory: 7688kb
input:
294 0 161 82 161 161 243 209 138 161 161 161 209 247 209 293 209 209 161 158 161 201 216 161 39 126 209 238 161 161 209 70 206 209 161 209 209 138 161 161 161 149 92 161 244 158 250 138 105 244 256 138 13 43 161 97 161 161 209 70 209 161 158 161 161 209 256 161 104 116 13 161 161 209 117 209 161 209...
output:
534816934
result:
ok single line: '534816934'
Test #44:
score: 0
Accepted
time: 292ms
memory: 7688kb
input:
300 0 115 115 115 115 115 115 115 115 115 115 115 115 115 115 115 115 115 115 115 115 115 115 115 115 115 115 115 115 115 115 115 115 115 115 115 115 115 115 115 115 115 115 115 115 115 115 115 115 115 115 115 115 115 115 115 115 115 115 115 115 115 115 115 115 115 115 115 115 115 115 115 115 115 11...
output:
860758290
result:
ok single line: '860758290'
Test #45:
score: 0
Accepted
time: 284ms
memory: 7668kb
input:
295 0 82 82 298 9 82 298 82 82 82 12 178 82 12 298 87 87 82 82 298 82 82 12 67 298 182 182 174 298 298 87 9 82 101 82 82 82 298 82 12 87 174 9 9 82 251 114 82 82 87 82 9 82 298 82 82 82 298 87 9 146 298 87 146 12 82 82 87 298 82 298 82 82 298 82 82 298 82 82 82 12 9 298 174 9 77 51 82 298 82 82 82 2...
output:
998278320
result:
ok single line: '998278320'
Test #46:
score: 0
Accepted
time: 289ms
memory: 7664kb
input:
298 0 211 211 211 211 211 211 211 211 211 211 211 211 211 72 278 211 211 211 211 211 211 211 211 211 278 72 72 211 211 211 211 72 278 278 211 278 72 211 211 211 211 211 211 211 211 278 211 211 211 211 211 211 211 211 72 211 211 211 211 211 211 278 211 278 211 72 211 211 211 211 211 211 278 211 211 2...
output:
798338349
result:
ok single line: '798338349'
Test #47:
score: 0
Accepted
time: 284ms
memory: 7672kb
input:
298 0 267 35 118 100 35 55 35 35 27 35 35 6 35 99 35 185 139 260 35 185 35 146 94 214 160 35 35 35 185 250 185 27 214 18 276 118 46 111 188 20 39 170 82 35 247 96 35 185 120 177 94 197 98 35 35 185 289 214 260 82 82 35 170 60 35 99 35 185 35 35 170 173 35 35 120 35 35 35 35 35 55 30 35 35 188 214 35...
output:
974473747
result:
ok single line: '974473747'
Test #48:
score: 0
Accepted
time: 289ms
memory: 7772kb
input:
300 0 33 33 33 189 76 76 189 189 33 76 29 33 189 33 189 33 33 189 29 199 76 29 199 76 76 203 199 199 33 33 189 33 33 199 189 189 76 29 189 33 76 76 203 76 76 29 33 189 33 203 189 247 189 189 189 33 189 76 76 33 76 189 189 189 189 76 76 189 33 189 76 199 189 189 189 189 189 33 199 29 33 199 199 33 29...
output:
105198796
result:
ok single line: '105198796'
Test #49:
score: 0
Accepted
time: 302ms
memory: 7700kb
input:
300 0 247 247 247 38 247 247 247 247 276 247 247 243 247 276 247 247 247 247 121 277 271 247 38 243 245 38 237 243 279 247 276 121 247 245 243 247 247 247 247 233 247 181 276 89 213 247 247 289 89 95 247 277 247 247 245 247 233 247 243 181 247 276 271 247 276 247 247 247 247 247 247 247 247 89 247 2...
output:
665594214
result:
ok single line: '665594214'
Test #50:
score: 0
Accepted
time: 231ms
memory: 7484kb
input:
264 0 295 295 295 295 295 295 295 295 295 295 133 175 295 124 66 295 295 295 175 295 295 295 295 168 295 295 295 295 295 175 295 295 295 295 295 295 295 295 295 295 295 175 295 295 195 295 295 295 295 295 295 295 142 295 66 295 295 103 295 295 295 168 295 295 175 295 124 66 295 124 295 295 295 241 2...
output:
39096045
result:
ok single line: '39096045'
Test #51:
score: 0
Accepted
time: 300ms
memory: 7744kb
input:
300 0 37 212 37 37 37 37 37 68 37 212 37 37 212 212 37 37 37 68 37 37 68 37 68 68 37 37 212 37 212 37 37 37 37 37 212 37 37 37 37 37 37 37 212 212 37 68 37 212 68 37 37 37 68 37 37 212 212 212 37 68 37 68 37 68 212 37 37 37 37 37 37 37 37 37 37 37 37 37 212 37 37 212 37 37 37 37 68 37 68 37 37 68 37...
output:
205210439
result:
ok single line: '205210439'
Test #52:
score: 0
Accepted
time: 291ms
memory: 7688kb
input:
299 0 10 77 10 77 10 77 77 77 77 77 77 77 77 10 77 10 10 77 77 77 77 10 10 77 10 77 77 77 10 77 10 77 77 10 77 10 77 77 10 77 77 77 77 10 10 10 10 77 77 77 77 77 77 77 77 10 77 77 77 77 77 77 10 77 77 77 77 77 77 77 10 10 77 77 77 77 10 77 10 10 10 77 10 77 77 77 77 77 77 77 10 77 77 77 77 77 77 77 ...
output:
502954576
result:
ok single line: '502954576'
Test #53:
score: 0
Accepted
time: 248ms
memory: 7652kb
input:
274 0 143 216 143 187 88 143 143 143 240 181 143 143 184 248 248 66 166 189 68 141 143 143 163 143 237 143 96 240 74 143 143 143 237 134 67 143 143 202 143 143 134 104 143 1 143 25 77 242 1 143 203 237 42 112 143 195 252 143 240 143 140 203 242 143 143 96 108 130 143 60 143 143 237 93 66 133 128 256...
output:
94418405
result:
ok single line: '94418405'