QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#798662 | #9582. 俄式简餐 | Lynia | AC ✓ | 11ms | 8744kb | C++23 | 4.6kb | 2024-12-04 15:50:12 | 2024-12-04 15:50:19 |
Judging History
answer
///////////
// // //
// ////////////////////
// // //
//
///////////
//
//
// // // //////// /\ /////////
// // // // // // //
// //////// // // // // //
// // // // // // //
////////// //////// // // // /////////////
#pragma GCC optimize(3,"Ofast","inline")
#include <iostream>
#include <iomanip>
#include <algorithm>
#include <map>
#include <set>
#include <queue>
#include <string>
#include <cstring>
#include <cmath>
#include <list>
#include <stack>
#include <array>
#include <unordered_map>
#include <unordered_set>
#include <bitset>
#include <random>
#include <numeric>
#include <functional>
#include <optional>
//#include <Windows.h>
using namespace std;
#define fa(i,op,n) for (int i = op; i <= n; i++)
#define fb(j,op,n) for (int j = op; j >= n; j--)
#define pb push_back
#define HashMap unordered_map
#define HashSet unordered_set
#define var auto
#define all(i) i.begin(), i.end()
#define all1(i) i.begin() + 1,i.end()
#define endl '\n'
#define px first
#define py second
using VI = vector<int>;
using VL = vector<long long>;
using ll = long long;
using ull = unsigned long long;
using db = double;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
template<class T1, class T2>
ostream& operator<<(ostream& out, const pair<T1, T2>& p) {
out << '(' << p.first << ", " << p.second << ')';
return out;
}
template<typename T>
ostream& operator<<(ostream& out, const vector<T>& ve) {
for (T i : ve)
out << i << ' ';
return out;
}
template<class T1, class T2>
ostream& operator<<(ostream& out, const map<T1, T2>& mp) {
for (auto i : mp)
out << i << '\n';
return out;
}
template<typename ...T>
bool _debug(T... a) {
((cout << a << ' '), ...);
cout << endl;
return -1;
}
const int INF = 0x3f3f3f3f;
const ll LNF = 0x3f3f3f3f3f3f3f3f;
int dx[8] = { 1, -1, 0, 0, 1, -1, 1, -1 };
int dy[8] = { 0, 0, 1, -1, 1, -1, -1, 1 };
//#include "Lynia.h"
namespace MyTools
{
template <typename T>
class Math;
template <const int T>
class ModInt;
}
namespace MT = MyTools;
using Math = MT::Math<ll>;
#define geo MT::Geo
const int mod = 1e9 + 7;
using mint = MT::ModInt<mod>;
const int N = 2e5 + 10;
void solve(int CASE)
{
int n, m; cin >> n >> m;
var ans = vector<vector<int>>(n + 1, vector<int>(m + 1));
int cnt = 1;
var _1_4 = [&](int n, int m)->void {
if (n == 0 or m == 0)return;
if (m % 4 == 0) {
fa(i, 1, n) {
int tmp = 0;
fa(j, 1, m) {
ans[i][j] = cnt;
tmp++;
if (tmp == 4) {
cnt++;
tmp = 0;
}
}
}
}
else {
fa(j, 1, m) {
int tmp = 0;
fa(i, 1, n) {
ans[i][j] = cnt;
tmp++;
if (tmp == 4) {
cnt++;
tmp = 0;
}
}
}
}
};
if (n % 2 != 0 and m % 2 != 0) { // 奇 x 奇
cout << "NO" << endl;
return;
}
else if (n % 2 == 0 and m % 2 == 0) { // 偶 x 偶
if (n % 4 == 0 or m % 4 == 0)_1_4(n, m);
else {
if (n < 6 and m < 6) {
cout << "NO" << endl;
return;
}
if (m > n) {
// j: [m - 5, m]
for (int i = 1; i <= n; i += 2) {
ans[i][m - 5] = cnt;
ans[i + 1][m - 5] = cnt;
ans[i + 1][m - 4] = cnt;
ans[i + 1][m - 3] = cnt;
cnt++;
ans[i][m] = cnt;
ans[i + 1][m] = cnt;
ans[i + 1][m - 1] = cnt;
ans[i + 1][m - 2] = cnt;
cnt++;
ans[i][m - 4] = cnt;
ans[i][m - 3] = cnt;
ans[i][m - 2] = cnt;
ans[i][m - 1] = cnt;
cnt++;
}
_1_4(n, m - 6);
}
else {
// i: [n - 5, n]
for (int j = 1; j <= m; j += 2) {
ans[n - 5][j] = cnt;
ans[n - 5][j + 1] = cnt;
ans[n - 4][j + 1] = cnt;
ans[n - 3][j + 1] = cnt;
cnt++;
ans[n][j] = cnt;
ans[n][j + 1] = cnt;
ans[n - 1][j + 1] = cnt;
ans[n - 2][j + 1] = cnt;
cnt++;
ans[n - 4][j] = cnt;
ans[n - 3][j] = cnt;
ans[n - 2][j] = cnt;
ans[n - 1][j] = cnt;
cnt++;
}
_1_4(n - 6, m);
}
}
}
else { // 奇 x 偶 只能 1 * 4
if (n % 4 != 0 and m % 4 != 0) {
cout << "NO" << endl;
return;
}
else _1_4(n, m);
}
cout << "YES" << endl;
fa(i, 1, n) {
fa(j, 1, m)
cout << ans[i][j] << ' ';
cout << endl;
}
return;
}
int main()
{
//SetConsoleOutputCP(CP_UTF8);
ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
int _ = 1;
cin >> _;
fa(i, 1, _)solve(i);
return 0;
}
这程序好像有点Bug,我给组数据试试?
詳細信息
Test #1:
score: 100
Accepted
time: 0ms
memory: 3644kb
input:
3 2 3 2 4 6 8
output:
NO YES 1 1 1 1 2 2 2 2 YES 1 1 1 1 2 2 2 2 3 3 3 3 4 4 4 4 5 5 5 5 6 6 6 6 7 7 7 7 8 8 8 8 9 9 9 9 10 10 10 10 11 11 11 11 12 12 12 12
result:
ok accepted (3 test cases)
Test #2:
score: 0
Accepted
time: 4ms
memory: 3612kb
input:
784 1 1 1 2 1 3 1 4 1 5 1 6 1 7 1 8 1 9 1 10 1 11 1 12 1 13 1 14 1 15 1 16 1 17 1 18 1 19 1 20 1 21 1 22 1 23 1 24 1 25 1 26 1 27 1 28 2 1 2 2 2 3 2 4 2 5 2 6 2 7 2 8 2 9 2 10 2 11 2 12 2 13 2 14 2 15 2 16 2 17 2 18 2 19 2 20 2 21 2 22 2 23 2 24 2 25 2 26 2 27 2 28 3 1 3 2 3 3 3 4 3 5 3 6 3 7 3 8 3 ...
output:
NO NO NO YES 1 1 1 1 NO NO NO YES 1 1 1 1 2 2 2 2 NO NO NO YES 1 1 1 1 2 2 2 2 3 3 3 3 NO NO NO YES 1 1 1 1 2 2 2 2 3 3 3 3 4 4 4 4 NO NO NO YES 1 1 1 1 2 2 2 2 3 3 3 3 4 4 4 4 5 5 5 5 NO NO NO YES 1 1 1 1 2 2 2 2 3 3 3 3 4 4 4 4 5 5 5 5 6 6 6 6 NO NO NO YES 1 1 1 1 2 2 2 2 3 3 3 3 4 4 4 4 5 5...
result:
ok accepted (784 test cases)
Test #3:
score: 0
Accepted
time: 8ms
memory: 6116kb
input:
2 2 50000 50000 1
output:
YES 1 1 1 1 2 2 2 2 3 3 3 3 4 4 4 4 5 5 5 5 6 6 6 6 7 7 7 7 8 8 8 8 9 9 9 9 10 10 10 10 11 11 11 11 12 12 12 12 13 13 13 13 14 14 14 14 15 15 15 15 16 16 16 16 17 17 17 17 18 18 18 18 19 19 19 19 20 20 20 20 21 21 21 21 22 22 22 22 23 23 23 23 24 24 24 24 25 25 25 25 26 26 26 26 27 27 27 27 28 28 28...
result:
ok accepted (2 test cases)
Test #4:
score: 0
Accepted
time: 6ms
memory: 5944kb
input:
2 2 49998 49998 1
output:
YES 4 4 4 4 5 5 5 5 6 6 6 6 7 7 7 7 8 8 8 8 9 9 9 9 10 10 10 10 11 11 11 11 12 12 12 12 13 13 13 13 14 14 14 14 15 15 15 15 16 16 16 16 17 17 17 17 18 18 18 18 19 19 19 19 20 20 20 20 21 21 21 21 22 22 22 22 23 23 23 23 24 24 24 24 25 25 25 25 26 26 26 26 27 27 27 27 28 28 28 28 29 29 29 29 30 30 30...
result:
ok accepted (2 test cases)
Test #5:
score: 0
Accepted
time: 8ms
memory: 8744kb
input:
2 100000 1 1 100000
output:
YES 1 1 1 1 2 2 2 2 3 3 3 3 4 4 4 4 5 5 5 5 6 6 6 6 7 7 7 7 8 8 8 8 9 9 9 9 10 10 10 10 11 11 11 11 12 12 12 12 13 13 13 13 14 14 14 14 15 15 15 15 16 16 16 16 17 17 17 17 18 18 18 18 19 19 19 19 20 20 20 20 21 21 21 ...
result:
ok accepted (2 test cases)
Test #6:
score: 0
Accepted
time: 2ms
memory: 8668kb
input:
2 99999 1 49999 2
output:
NO NO
result:
ok accepted (2 test cases)
Test #7:
score: 0
Accepted
time: 11ms
memory: 3780kb
input:
100000 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1...
output:
NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO ...
result:
ok accepted (100000 test cases)
Test #8:
score: 0
Accepted
time: 4ms
memory: 3892kb
input:
90 25 15 25 23 3 4 2 43 54 23 58 5 72 71 91 24 61 61 20 80 67 75 12 99 24 82 10 100 68 92 34 79 76 42 66 17 7 95 87 67 61 18 60 99 99 53 90 3 80 1 31 8 83 26 94 45 35 74 29 25 9 54 88 12 10 18 79 71 55 79 7 52 51 47 29 63 92 39 1 15 14 2 93 70 26 47 28 72 100 51 96 32 11 56 40 99 11 12 42 47 82 88 3...
output:
NO NO YES 1 1 1 1 2 2 2 2 3 3 3 3 NO NO NO YES 1 19 37 55 73 91 109 127 145 163 181 199 217 235 253 271 289 307 325 343 361 379 397 415 433 451 469 487 505 523 541 559 577 595 613 631 649 667 685 703 721 739 757 775 793 811 829 847 865 883 901 919 937 955 973 991 1009 1027 1045 1063 1081 1099 111...
result:
ok accepted (90 test cases)
Test #9:
score: 0
Accepted
time: 3ms
memory: 3612kb
input:
81 45 59 71 97 56 73 77 31 9 5 98 44 63 1 2 41 88 15 43 29 16 61 25 78 81 90 31 53 80 58 60 53 67 78 71 25 37 62 36 82 53 41 45 58 91 36 6 47 94 63 41 52 80 47 86 79 22 99 84 30 21 59 31 94 45 75 56 99 46 13 52 42 66 51 4 93 52 22 50 23 60 58 27 85 69 7 100 18 50 74 34 44 22 17 49 1 28 63 76 63 55 6...
output:
NO NO YES 1 15 29 43 57 71 85 99 113 127 141 155 169 183 197 211 225 239 253 267 281 295 309 323 337 351 365 379 393 407 421 435 449 463 477 491 505 519 533 547 561 575 589 603 617 631 645 659 673 687 701 715 729 743 757 771 785 799 813 827 841 855 869 883 897 911 925 939 953 967 981 995 1009 1 15 ...
result:
ok accepted (81 test cases)
Test #10:
score: 0
Accepted
time: 6ms
memory: 3784kb
input:
4 15 16 46 726 166 274 428 184
output:
YES 1 1 1 1 2 2 2 2 3 3 3 3 4 4 4 4 5 5 5 5 6 6 6 6 7 7 7 7 8 8 8 8 9 9 9 9 10 10 10 10 11 11 11 11 12 12 12 12 13 13 13 13 14 14 14 14 15 15 15 15 16 16 16 16 17 17 17 17 18 18 18 18 19 19 19 19 20 20 20 20 21 21 21 21 22 22 22 22 23 23 23 23 24 24 24 24 25 25 25 25 26 26 26 26 27 27 27 27 28...
result:
ok accepted (4 test cases)
Test #11:
score: 0
Accepted
time: 7ms
memory: 3676kb
input:
4 69 612 664 37 72 681 184 323
output:
YES 1 1 1 1 2 2 2 2 3 3 3 3 4 4 4 4 5 5 5 5 6 6 6 6 7 7 7 7 8 8 8 8 9 9 9 9 10 10 10 10 11 11 11 11 12 12 12 12 13 13 13 13 14 14 14 14 15 15 15 15 16 16 16 16 17 17 17 17 18 18 18 18 19 19 19 19 20 20 20 20 21 21 21 21 22 22 22 22 23 23 23 23 24 24 24 24 25 25 25 25 26 26 26 26 27 27 27 27 28 28 28...
result:
ok accepted (4 test cases)
Test #12:
score: 0
Accepted
time: 4ms
memory: 3788kb
input:
4 61 464 623 89 839 25 320 233
output:
YES 1 1 1 1 2 2 2 2 3 3 3 3 4 4 4 4 5 5 5 5 6 6 6 6 7 7 7 7 8 8 8 8 9 9 9 9 10 10 10 10 11 11 11 11 12 12 12 12 13 13 13 13 14 14 14 14 15 15 15 15 16 16 16 16 17 17 17 17 18 18 18 18 19 19 19 19 20 20 20 20 21 21 21 21 22 22 22 22 23 23 23 23 24 24 24 24 25 25 25 25 26 26 26 26 27 27 27 27 28 28 28...
result:
ok accepted (4 test cases)
Test #13:
score: 0
Accepted
time: 2ms
memory: 3756kb
input:
6 485 117 609 92 526 13 13 891 632 63 249 13
output:
NO YES 1 1 1 1 2 2 2 2 3 3 3 3 4 4 4 4 5 5 5 5 6 6 6 6 7 7 7 7 8 8 8 8 9 9 9 9 10 10 10 10 11 11 11 11 12 12 12 12 13 13 13 13 14 14 14 14 15 15 15 15 16 16 16 16 17 17 17 17 18 18 18 18 19 19 19 19 20 20 20 20 21 21 21 21 22 22 22 22 23 23 23 23 24 24 24 24 25 25 25 25 26 26 26 26 27 27 27 27 28 2...
result:
ok accepted (6 test cases)
Test #14:
score: 0
Accepted
time: 4ms
memory: 3684kb
input:
5 998 1 280 332 64 297 46 33 154 141
output:
NO YES 1 1 1 1 2 2 2 2 3 3 3 3 4 4 4 4 5 5 5 5 6 6 6 6 7 7 7 7 8 8 8 8 9 9 9 9 10 10 10 10 11 11 11 11 12 12 12 12 13 13 13 13 14 14 14 14 15 15 15 15 16 16 16 16 17 17 17 17 18 18 18 18 19 19 19 19 20 20 20 20 21 21 21 21 22 22 22 22 23 23 23 23 24 24 24 24 25 25 25 25 26 26 26 26 27 27 27 27 28 28...
result:
ok accepted (5 test cases)
Test #15:
score: 0
Accepted
time: 1ms
memory: 3812kb
input:
3 1337 45 892 14 47 865
output:
NO YES 1 224 447 670 893 1116 1339 1562 1785 2008 2231 2454 2677 2900 1 224 447 670 893 1116 1339 1562 1785 2008 2231 2454 2677 2900 1 224 447 670 893 1116 1339 1562 1785 2008 2231 2454 2677 2900 1 224 447 670 893 1116 1339 1562 1785 2008 2231 2454 2677 2900 2 225 448 671 894 1117 1340 1563 1786...
result:
ok accepted (3 test cases)
Test #16:
score: 0
Accepted
time: 6ms
memory: 4044kb
input:
2 2908 32 436 115
output:
YES 1 1 1 1 2 2 2 2 3 3 3 3 4 4 4 4 5 5 5 5 6 6 6 6 7 7 7 7 8 8 8 8 9 9 9 9 10 10 10 10 11 11 11 11 12 12 12 12 13 13 13 13 14 14 14 14 15 15 15 15 16 16 16 16 17 17 17 17 18 18 18 18 19 19 19 19 20 20 20 20 21 21 21 21 22 22 22 22 23 23 23 23 24 24 24 24 25 25 25 25 26 26 26 26 27 27 27 27 28 28...
result:
ok accepted (2 test cases)
Test #17:
score: 0
Accepted
time: 1ms
memory: 3736kb
input:
2 14 4359 327 199
output:
NO NO
result:
ok accepted (2 test cases)
Test #18:
score: 0
Accepted
time: 4ms
memory: 4028kb
input:
2 192 477 519 189
output:
YES 1 49 97 145 193 241 289 337 385 433 481 529 577 625 673 721 769 817 865 913 961 1009 1057 1105 1153 1201 1249 1297 1345 1393 1441 1489 1537 1585 1633 1681 1729 1777 1825 1873 1921 1969 2017 2065 2113 2161 2209 2257 2305 2353 2401 2449 2497 2545 2593 2641 2689 2737 2785 2833 2881 2929 2977 3025 3...
result:
ok accepted (2 test cases)
Test #19:
score: 0
Accepted
time: 5ms
memory: 3964kb
input:
5 14 6798 5 210 146 216 9 1373 622 47
output:
YES 22 22 22 22 23 23 23 23 24 24 24 24 25 25 25 25 26 26 26 26 27 27 27 27 28 28 28 28 29 29 29 29 30 30 30 30 31 31 31 31 32 32 32 32 33 33 33 33 34 34 34 34 35 35 35 35 36 36 36 36 37 37 37 37 38 38 38 38 39 39 39 39 40 40 40 40 41 41 41 41 42 42 42 42 43 43 43 43 44 44 44 44 45 45 45 45 46 46 46...
result:
ok accepted (5 test cases)
Test #20:
score: 0
Accepted
time: 0ms
memory: 3788kb
input:
3 429 141 3840 23 430 7
output:
NO YES 1 961 1921 2881 3841 4801 5761 6721 7681 8641 9601 10561 11521 12481 13441 14401 15361 16321 17281 18241 19201 20161 21121 1 961 1921 2881 3841 4801 5761 6721 7681 8641 9601 10561 11521 12481 13441 14401 15361 16321 17281 18241 19201 20161 21121 1 961 1921 2881 3841 4801 5761 6721 7681 8641...
result:
ok accepted (3 test cases)
Test #21:
score: 0
Accepted
time: 4ms
memory: 3780kb
input:
3 244 345 101 914 2 1177
output:
YES 1 62 123 184 245 306 367 428 489 550 611 672 733 794 855 916 977 1038 1099 1160 1221 1282 1343 1404 1465 1526 1587 1648 1709 1770 1831 1892 1953 2014 2075 2136 2197 2258 2319 2380 2441 2502 2563 2624 2685 2746 2807 2868 2929 2990 3051 3112 3173 3234 3295 3356 3417 3478 3539 3600 3661 3722 3783 3...
result:
ok accepted (3 test cases)
Test #22:
score: 0
Accepted
time: 7ms
memory: 4128kb
input:
2 17088 5 47 1856
output:
YES 1 4273 8545 12817 17089 1 4273 8545 12817 17089 1 4273 8545 12817 17089 1 4273 8545 12817 17089 2 4274 8546 12818 17090 2 4274 8546 12818 17090 2 4274 8546 12818 17090 2 4274 8546 12818 17090 3 4275 8547 12819 17091 3 4275 8547 12819 17091 3 4275 8547 12819 17091 3 4275 8547 12819 170...
result:
ok accepted (2 test cases)
Test #23:
score: 0
Accepted
time: 3ms
memory: 4240kb
input:
4 510 13 8553 9 9 4560 1 75297
output:
NO NO YES 1 1 1 1 2 2 2 2 3 3 3 3 4 4 4 4 5 5 5 5 6 6 6 6 7 7 7 7 8 8 8 8 9 9 9 9 10 10 10 10 11 11 11 11 12 12 12 12 13 13 13 13 14 14 14 14 15 15 15 15 16 16 16 16 17 17 17 17 18 18 18 18 19 19 19 19 20 20 20 20 21 21 21 21 22 22 22 22 23 23 23 23 24 24 24 24 25 25 25 25 26 26 26 26 27 27 27 27 28...
result:
ok accepted (4 test cases)
Test #24:
score: 0
Accepted
time: 1ms
memory: 4008kb
input:
2 3253 25 2314 31
output:
NO NO
result:
ok accepted (2 test cases)
Test #25:
score: 0
Accepted
time: 0ms
memory: 3720kb
input:
2 30 2723 31 2562
output:
NO NO
result:
ok accepted (2 test cases)
Test #26:
score: 0
Accepted
time: 2ms
memory: 3776kb
input:
2 1056 43 21 4663
output:
YES 1 265 529 793 1057 1321 1585 1849 2113 2377 2641 2905 3169 3433 3697 3961 4225 4489 4753 5017 5281 5545 5809 6073 6337 6601 6865 7129 7393 7657 7921 8185 8449 8713 8977 9241 9505 9769 10033 10297 10561 10825 11089 1 265 529 793 1057 1321 1585 1849 2113 2377 2641 2905 3169 3433 3697 3961 4225 44...
result:
ok accepted (2 test cases)
Test #27:
score: 0
Accepted
time: 3ms
memory: 5360kb
input:
4 644 125 40875 1 1088 12 2535 23
output:
YES 1 162 323 484 645 806 967 1128 1289 1450 1611 1772 1933 2094 2255 2416 2577 2738 2899 3060 3221 3382 3543 3704 3865 4026 4187 4348 4509 4670 4831 4992 5153 5314 5475 5636 5797 5958 6119 6280 6441 6602 6763 6924 7085 7246 7407 7568 7729 7890 8051 8212 8373 8534 8695 8856 9017 9178 9339 9500 9661 ...
result:
ok accepted (4 test cases)
Test #28:
score: 0
Accepted
time: 0ms
memory: 3820kb
input:
3 1 26217 4 9082 89 845
output:
NO YES 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 1...
result:
ok accepted (3 test cases)
Test #29:
score: 0
Accepted
time: 0ms
memory: 4228kb
input:
2 63 1573 17980 3
output:
NO YES 1 4496 8991 1 4496 8991 1 4496 8991 1 4496 8991 2 4497 8992 2 4497 8992 2 4497 8992 2 4497 8992 3 4498 8993 3 4498 8993 3 4498 8993 3 4498 8993 4 4499 8994 4 4499 8994 4 4499 8994 4 4499 8994 5 4500 8995 5 4500 8995 5 4500 8995 5 4500 8995 6 4501 8996 6 4501 8996 6 4501 ...
result:
ok accepted (2 test cases)
Test #30:
score: 0
Accepted
time: 5ms
memory: 3912kb
input:
4 6938 7 184 241 16 4339 729 6
output:
NO YES 1 47 93 139 185 231 277 323 369 415 461 507 553 599 645 691 737 783 829 875 921 967 1013 1059 1105 1151 1197 1243 1289 1335 1381 1427 1473 1519 1565 1611 1657 1703 1749 1795 1841 1887 1933 1979 2025 2071 2117 2163 2209 2255 2301 2347 2393 2439 2485 2531 2577 2623 2669 2715 2761 2807 2853 2899...
result:
ok accepted (4 test cases)
Test #31:
score: 0
Accepted
time: 4ms
memory: 4060kb
input:
2 28 3465 1 52606
output:
YES 1 8 15 22 29 36 43 50 57 64 71 78 85 92 99 106 113 120 127 134 141 148 155 162 169 176 183 190 197 204 211 218 225 232 239 246 253 260 267 274 281 288 295 302 309 316 323 330 337 344 351 358 365 372 379 386 393 400 407 414 421 428 435 442 449 456 463 470 477 484 491 498 505 512 519 526 533 540 5...
result:
ok accepted (2 test cases)
Test #32:
score: 0
Accepted
time: 4ms
memory: 3940kb
input:
1 318 314
output:
YES 472 550 628 706 784 862 940 1018 1096 1174 1252 1330 1408 1486 1564 1642 1720 1798 1876 1954 2032 2110 2188 2266 2344 2422 2500 2578 2656 2734 2812 2890 2968 3046 3124 3202 3280 3358 3436 3514 3592 3670 3748 3826 3904 3982 4060 4138 4216 4294 4372 4450 4528 4606 4684 4762 4840 4918 4996 5074 515...
result:
ok accepted (1 test case)
Extra Test:
score: 0
Extra Test Passed