QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#100285 | #4996. Icy Itinerary | joesmitty | AC ✓ | 595ms | 33944kb | C++20 | 3.8kb | 2023-04-25 14:37:05 | 2023-04-25 14:37:09 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
typedef unsigned int uint;
typedef vector<int> vi;
typedef vector< vector <int> > vvi;
typedef pair<int, int> pii;
typedef pair < pair < int, int >, int > piii;
typedef pair < pair <int, int > , pair <int, int> > piiii;
typedef pair<ll, ll> pll;
typedef vector<bool> vb;
typedef vector<char> vc;
typedef vector<string> vs;
#define FOR(i,a,b) for(int i = a; i < b; i ++)
#define RFOR(i,a,b) for(int i = a-1; i >= b; i --)
#define all(a) a.begin(), a.end()
#define endl '\n';
#define sz(x) (int)(x).size()
#define mp make_pair
#define pb push_back
#define ff first
#define ss second
template <typename T>
void pr(vector<T> &v) {
FOR(i, 0, sz(v)) cout << v[i] << " ";
cout << endl;
}
template <typename T>
void pr(vector<vector<T> > &v) {
FOR(i, 0, sz(v)) { pr(v[i]); }
}
template <typename T>
void re(T &x) {
cin >> x;
}
template <typename T>
void re(vector<T> &a) {
FOR(i, 0, sz(a)) re(a[i]);
}
template <class Arg, class... Args>
void re(Arg &first, Args &... rest) {
re(first);
re(rest...);
}
template <typename T>
void pr(T x) {
cout << x << endl;
}
template <class Arg, class... Args>
void pr(const Arg &first, const Args &... rest) {
cout << first << " ";
pr(rest...);
cout << endl;
}
void ps() { cout << endl; }
template<class T, class... Ts>
void ps(const T& t, const Ts&... ts) {
cout << t; if (sizeof...(ts)) cout << " "; ps(ts...);
}
const ll MOD = 998244353;
#define inf 1e18;
#define INF INT_MAX
long double PI = 4*atan(1);
long double eps = 1e-12;
int nxt[300010] = {};
int pre[300010] = {};
set<pii> conn;
int t(int u, int v) {
return (conn.count({u,v}) ? 1 : 0);
}
int main() {
auto start = chrono::high_resolution_clock::now();
ios_base::sync_with_stdio(0);cin.tie(0);
// ofstream cout("disrupt.out");
// ifstream cin("disrupt.in");
#ifdef DEBUG
freopen("input.txt", "r", stdin);
freopen("output.txt", "w", stdout);
#endif
ll n,m; cin >> n >> m;
FOR(i,0,m) {
int u,v; cin >> u >> v;
conn.insert({v,u});
conn.insert({u,v});
}
nxt[1] = 2;
pre[2] = 1;
int a = 1;
int b = 2;
FOR(i,3,n+1) {
int x = t(a,b);
int t1 = t(a,i);
int t2 = t(b,i);
if(t1 == x && t2 == x) {
nxt[a] = i; pre[i] = a;
nxt[i] = b; pre[b] = i;
a = i;
}
else if(t1 != x && t2 != x) {
nxt[a] = i; pre[i] = a;
nxt[i] = b; pre[b] = i;
if(pre[a] != 0) {
a = pre[a];
b = nxt[a];
} else {
while(nxt[nxt[a]] != 0) {
a = nxt[a];
}
b = nxt[a];
}
} else if(t1 == x && t2 != x) {
nxt[a] = i; pre[i] = a;
nxt[i] = b; pre[b] = i;
b = i;
} else if(t1 != x && t2 == x) {
int c = nxt[b];
if(c == 0) {
nxt[b] = i; pre[i] = b;
a = b;
b = i;
} else {
nxt[b] = i; pre[i] = b;
int t3 = t(c, i);
nxt[i] = c; pre[c] = i;
if(t3 == x) {
a = i; b = c;
} else {
a = b; b = i;
}
}
}
}
int c = 1;
FOR(i,0,n) {
cout << c << " ";
c = nxt[c];
}
cout << endl;
// auto stop = chrono::high_resolution_clock::now();
// auto duration = chrono::duration_cast<chrono::microseconds>(stop - start);
// cout << duration.count() << endl;
//cin.close();
//cout.close();
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 2ms
memory: 3348kb
input:
4 4 1 2 1 3 1 4 3 4
output:
1 4 3 2
result:
ok qwq
Test #2:
score: 0
Accepted
time: 1ms
memory: 3360kb
input:
5 0
output:
1 3 4 5 2
result:
ok qwq
Test #3:
score: 0
Accepted
time: 1ms
memory: 3416kb
input:
10 10 7 8 7 5 5 2 6 1 10 7 4 6 5 8 3 2 10 5 1 10
output:
1 4 5 6 7 3 8 9 10 2
result:
ok qwq
Test #4:
score: 0
Accepted
time: 2ms
memory: 5436kb
input:
2 1 1 2
output:
1 2
result:
ok qwq
Test #5:
score: 0
Accepted
time: 2ms
memory: 3452kb
input:
2 0
output:
1 2
result:
ok qwq
Test #6:
score: 0
Accepted
time: 1ms
memory: 3388kb
input:
3 1 1 3
output:
1 2 3
result:
ok qwq
Test #7:
score: 0
Accepted
time: 2ms
memory: 3468kb
input:
10 40 10 9 4 5 2 7 3 4 4 7 4 9 7 3 5 10 5 9 8 1 1 10 6 7 6 9 9 8 10 7 7 8 8 3 10 3 2 1 1 5 6 1 5 7 2 5 3 9 2 8 1 9 4 1 1 7 4 10 2 10 3 1 4 6 9 7 3 6 2 3 8 4 6 8 3 5 4 2 2 6
output:
1 3 4 5 2 7 8 9 10 6
result:
ok qwq
Test #8:
score: 0
Accepted
time: 2ms
memory: 3356kb
input:
10 45 7 2 6 3 7 10 5 1 1 9 6 8 10 1 2 10 10 8 10 5 6 2 4 3 6 7 10 3 3 2 1 8 10 9 2 5 9 2 4 1 8 3 8 2 5 7 4 8 9 4 1 7 7 3 6 10 4 2 6 4 10 4 3 1 8 5 4 7 1 6 9 5 3 9 6 5 5 4 9 7 2 1 8 9 3 5 6 9 7 8
output:
1 3 4 5 6 7 8 9 10 2
result:
ok qwq
Test #9:
score: 0
Accepted
time: 2ms
memory: 3508kb
input:
15 40 12 11 11 6 5 11 15 14 10 14 15 5 1 11 10 12 4 3 6 4 4 9 2 11 6 12 13 7 7 9 10 9 1 2 9 11 2 6 7 14 2 9 3 13 9 1 2 7 8 11 1 10 13 1 4 15 3 7 2 15 6 5 10 15 4 14 15 6 2 4 3 11 1 14 2 8 1 8 10 7
output:
1 5 3 6 7 8 13 15 14 10 12 11 9 4 2
result:
ok qwq
Test #10:
score: 0
Accepted
time: 2ms
memory: 3396kb
input:
15 1 13 6
output:
1 3 4 5 6 7 8 9 10 11 12 13 14 15 2
result:
ok qwq
Test #11:
score: 0
Accepted
time: 3ms
memory: 5380kb
input:
150 150 110 99 80 122 55 67 24 47 73 68 150 13 94 140 146 59 136 28 94 134 131 2 26 105 65 79 57 37 116 102 84 16 110 78 72 5 34 8 8 43 83 57 49 146 43 112 54 139 95 13 11 95 75 29 29 30 52 14 118 56 4 51 18 146 31 113 56 69 44 14 63 123 44 66 101 122 52 10 16 118 71 93 22 113 28 88 5 108 16 48 84 1...
output:
1 3 4 5 6 7 8 9 10 11 12 13 14 2 16 17 18 19 20 21 22 23 24 25 26 27 28 29 15 31 32 33 34 35 36 37 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 38 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 101 102 103...
result:
ok qwq
Test #12:
score: 0
Accepted
time: 1ms
memory: 3472kb
input:
1500 1500 370 639 1046 375 1191 907 782 923 1369 196 998 194 640 331 309 631 1053 1076 887 1112 650 1437 2 1133 847 302 647 81 22 691 772 14 1112 62 266 1399 865 980 1302 1146 1007 575 1448 261 1489 1189 1134 1009 7 1175 1369 942 709 365 675 514 1021 1250 1415 2 976 746 564 388 431 326 43 147 385 81...
output:
1 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 101 102 10...
result:
ok qwq
Test #13:
score: 0
Accepted
time: 16ms
memory: 4924kb
input:
15000 15000 11602 9990 5492 14226 2633 14599 7956 12544 1258 1198 13788 3283 171 3770 8226 10782 915 6735 7186 14219 12806 1549 8783 5596 3692 9668 370 4654 13811 4032 835 12990 14273 14020 8902 7798 7405 4524 7476 1864 7786 14984 4367 13552 2927 2463 1929 3198 97 5800 14012 5674 6283 827 13860 1139...
output:
1 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 101 102 10...
result:
ok qwq
Test #14:
score: 0
Accepted
time: 12ms
memory: 5804kb
input:
300000 0
output:
1 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 101 102 10...
result:
ok qwq
Test #15:
score: 0
Accepted
time: 12ms
memory: 5696kb
input:
300000 1 80856 110687
output:
1 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 101 102 10...
result:
ok qwq
Test #16:
score: 0
Accepted
time: 32ms
memory: 5688kb
input:
300000 100 254473 70041 278954 218026 54339 23948 90766 35432 145294 42945 10824 168971 162204 196321 137959 274421 274330 8901 113606 229638 136217 161945 232685 214848 91296 146678 8764 206628 297190 163150 140047 161791 188167 261504 261443 160497 262029 233857 112139 37654 43010 192683 3697 1727...
output:
1 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 101 102 10...
result:
ok qwq
Test #17:
score: 0
Accepted
time: 164ms
memory: 15180kb
input:
300000 100000 279619 105099 95580 46691 139476 105331 67098 144910 105689 84242 198438 147050 274697 179922 229381 179041 210820 243557 162433 137909 14644 17464 295783 151723 180167 63360 17314 119555 201506 121519 129982 11913 3312 283798 197026 175391 86210 36036 177182 150502 37900 95301 261630 ...
output:
1 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 101 102 10...
result:
ok qwq
Test #18:
score: 0
Accepted
time: 595ms
memory: 33884kb
input:
300000 300000 297121 280398 49505 181149 186167 88552 250816 195719 113345 180891 103968 274040 148345 167433 283785 32444 281156 62491 76167 222701 181130 69399 291957 220950 21996 17907 98113 270806 247895 36687 122761 248769 235623 41248 274601 174896 296046 235115 57460 64170 286130 15089 91951 ...
output:
1 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 101 102 10...
result:
ok qwq
Test #19:
score: 0
Accepted
time: 401ms
memory: 31552kb
input:
1000 300000 794 378 253 365 792 287 235 482 50 807 795 174 786 980 763 645 615 440 364 542 209 856 925 709 965 709 755 592 242 870 960 978 253 404 164 439 931 998 443 318 663 958 560 445 970 245 192 631 321 621 120 472 402 520 939 454 436 893 840 577 112 961 509 9 815 190 357 128 52 433 554 967 384 ...
output:
1 3 16 19 21 22 26 27 29 30 31 33 34 35 36 32 38 46 47 45 48 50 51 49 52 43 55 56 57 58 59 61 62 63 64 60 65 66 54 70 71 72 73 74 76 77 78 79 75 80 82 87 88 89 91 93 92 94 95 96 97 98 90 99 100 101 102 103 86 104 105 108 106 109 124 141 143 144 145 142 146 149 151 152 153 154 155 150 157 158 159 161...
result:
ok qwq
Test #20:
score: 0
Accepted
time: 406ms
memory: 31596kb
input:
1500 300000 1189 1031 85 1047 1096 1290 1497 193 885 27 603 979 1438 1441 507 1256 1432 803 332 750 536 157 333 1248 1009 943 857 422 849 796 1399 814 911 481 836 36 1360 1175 592 737 277 672 551 331 849 1049 725 343 1312 112 889 544 1154 691 1387 1326 91 481 432 689 1051 248 1069 1499 499 194 748 1...
output:
1 3 4 5 6 7 8 2 9 11 16 14 18 19 17 20 21 15 26 27 25 28 24 34 35 36 31 37 33 38 39 40 41 42 43 44 45 47 48 52 53 54 49 55 51 56 50 57 58 46 59 60 32 61 62 63 65 66 67 64 68 30 69 70 71 72 73 74 75 76 77 78 79 80 85 86 87 84 94 95 96 97 98 93 101 103 104 105 107 108 109 110 111 106 112 113 114 102 1...
result:
ok qwq
Test #21:
score: 0
Accepted
time: 436ms
memory: 31544kb
input:
10000 300000 1236 4556 6003 6937 2217 6717 1150 1520 835 87 6994 6123 4263 8371 6772 4802 7302 3130 6157 4469 9918 3820 1997 5129 9662 7860 5882 9655 4931 8546 4776 1017 3925 6960 8114 6760 7793 3511 2958 3481 7244 3603 8609 4155 1832 2597 1639 6861 6563 8641 7870 3706 3772 4396 7696 6907 8722 1019 ...
output:
1 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 101 102 10...
result:
ok qwq
Test #22:
score: 0
Accepted
time: 2ms
memory: 3332kb
input:
10 40 1 5 2 5 3 5 4 5 6 5 7 5 8 5 9 5 10 5 1 2 3 2 4 2 6 2 7 2 8 2 9 2 10 2 1 4 3 4 6 4 7 4 8 4 9 4 10 4 1 10 3 10 6 10 7 10 8 10 9 10 1 3 6 3 7 3 8 3 9 3 1 8 6 8 7 8 9 8 1 9
output:
1 3 4 5 6 2 8 10 9 7
result:
ok qwq
Test #23:
score: 0
Accepted
time: 2ms
memory: 3436kb
input:
100 198 1 7 2 7 3 7 4 7 5 7 6 7 8 7 9 7 10 7 11 7 12 7 13 7 14 7 15 7 16 7 17 7 18 7 19 7 20 7 21 7 22 7 23 7 24 7 25 7 26 7 27 7 28 7 29 7 30 7 31 7 32 7 33 7 34 7 35 7 36 7 37 7 38 7 39 7 40 7 41 7 42 7 43 7 44 7 45 7 46 7 47 7 48 7 49 7 50 7 51 7 52 7 53 7 54 7 55 7 56 7 57 7 58 7 59 7 60 7 61 7 ...
output:
1 3 4 5 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 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 71 72 6 7 2
result:
ok qwq
Test #24:
score: 0
Accepted
time: 189ms
memory: 31496kb
input:
1000 300000 1 965 2 965 3 965 4 965 5 965 6 965 7 965 8 965 9 965 10 965 11 965 12 965 13 965 14 965 15 965 16 965 17 965 18 965 19 965 20 965 21 965 22 965 23 965 24 965 25 965 26 965 27 965 28 965 29 965 30 965 31 965 32 965 33 965 34 965 35 965 36 965 37 965 38 965 39 965 40 965 41 965 42 965 43 ...
output:
1 3 5 10 11 12 13 15 18 21 22 24 25 27 29 35 36 37 40 44 50 54 56 57 59 63 66 67 71 74 80 81 82 83 84 86 89 92 95 96 97 98 99 100 103 105 107 111 112 113 114 115 117 119 124 127 128 132 133 134 137 139 144 148 152 153 158 159 162 163 167 168 169 173 175 178 185 187 189 191 196 200 201 203 204 206 20...
result:
ok qwq
Test #25:
score: 0
Accepted
time: 156ms
memory: 31556kb
input:
3000 300000 1 395 2 395 3 395 4 395 5 395 6 395 7 395 8 395 9 395 10 395 11 395 12 395 13 395 14 395 15 395 16 395 17 395 18 395 19 395 20 395 21 395 22 395 23 395 24 395 25 395 26 395 27 395 28 395 29 395 30 395 31 395 32 395 33 395 34 395 35 395 36 395 37 395 38 395 39 395 40 395 41 395 42 395 43 ...
output:
1 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 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 67 68 69 70 71 72 73 74 75 76 77 78 81 82 83 84 85 86 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 10...
result:
ok qwq
Test #26:
score: 0
Accepted
time: 155ms
memory: 31552kb
input:
10000 300000 1 9020 2 9020 3 9020 4 9020 5 9020 6 9020 7 9020 8 9020 9 9020 10 9020 11 9020 12 9020 13 9020 14 9020 15 9020 16 9020 17 9020 18 9020 19 9020 20 9020 21 9020 22 9020 23 9020 24 9020 25 9020 26 9020 27 9020 28 9020 29 9020 30 9020 31 9020 32 9020 33 9020 34 9020 35 9020 36 9020 37 9020 ...
output:
1 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 101 102 10...
result:
ok qwq
Test #27:
score: 0
Accepted
time: 178ms
memory: 31840kb
input:
40000 300000 1 8681 2 8681 3 8681 4 8681 5 8681 6 8681 7 8681 8 8681 9 8681 10 8681 11 8681 12 8681 13 8681 14 8681 15 8681 16 8681 17 8681 18 8681 19 8681 20 8681 21 8681 22 8681 23 8681 24 8681 25 8681 26 8681 27 8681 28 8681 29 8681 30 8681 31 8681 32 8681 33 8681 34 8681 35 8681 36 8681 37 8681 ...
output:
1 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 101 102 10...
result:
ok qwq
Test #28:
score: 0
Accepted
time: 200ms
memory: 33944kb
input:
100000 300000 1 97406 2 97406 3 97406 4 97406 5 97406 6 97406 7 97406 8 97406 9 97406 10 97406 11 97406 12 97406 13 97406 14 97406 15 97406 16 97406 17 97406 18 97406 19 97406 20 97406 21 97406 22 97406 23 97406 24 97406 25 97406 26 97406 27 97406 28 97406 29 97406 30 97406 31 97406 32 97406 33 9740...
output:
1 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 101 102 10...
result:
ok qwq
Test #29:
score: 0
Accepted
time: 314ms
memory: 33868kb
input:
300000 300000 1 193103 2 193103 3 193103 4 193103 5 193103 6 193103 7 193103 8 193103 9 193103 10 193103 11 193103 12 193103 13 193103 14 193103 15 193103 16 193103 17 193103 18 193103 19 193103 20 193103 21 193103 22 193103 23 193103 24 193103 25 193103 26 193103 27 193103 28 193103 29 193103 30 19...
output:
1 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 101 102 10...
result:
ok qwq
Test #30:
score: 0
Accepted
time: 220ms
memory: 26764kb
input:
1000 249500 1 702 1 559 1 154 1 284 1 707 1 397 1 281 1 105 1 856 1 712 1 864 1 638 1 640 1 984 1 134 1 819 1 36 1 820 1 146 1 779 1 516 1 420 1 721 1 932 1 426 1 922 1 790 1 167 1 365 1 667 1 690 1 357 1 543 1 778 1 473 1 9 1 239 1 746 1 983 1 141 1 349 1 852 1 826 1 553 1 929 1 628 1 500 1 352 1 6...
output:
1 5 3 4 7 8 10 11 12 13 9 14 6 15 2 16 18 19 22 23 21 24 20 25 17 27 28 29 30 31 32 34 35 33 36 26 37 38 39 40 42 43 44 45 41 46 47 49 50 48 53 54 52 55 57 58 56 59 60 61 68 69 67 70 71 72 66 73 65 74 64 75 76 77 63 78 62 79 80 81 87 88 86 89 91 92 94 95 93 96 90 97 101 102 100 103 106 107 108 109 1...
result:
ok qwq
Test #31:
score: 0
Accepted
time: 184ms
memory: 26412kb
input:
750 245875 1 596 1 476 1 375 1 129 1 650 1 604 1 579 1 302 1 574 1 322 1 351 1 206 1 107 1 535 1 597 1 135 1 516 1 330 1 515 1 151 1 357 1 146 1 4 1 150 1 85 1 15 1 655 1 227 1 549 1 311 1 560 1 705 1 273 1 249 1 307 1 191 1 398 1 691 1 621 1 257 1 268 1 729 1 593 1 61 1 139 1 630 1 172 1 740 1 306 ...
output:
1 3 4 14 15 60 61 84 85 106 107 128 129 134 135 138 139 145 146 149 150 148 151 171 172 190 191 205 206 226 227 248 249 256 257 267 268 272 273 301 302 305 306 304 307 310 311 321 322 329 330 350 351 356 357 374 375 397 398 475 476 514 515 513 516 534 535 548 549 559 560 573 574 578 579 592 593 595 ...
result:
ok qwq
Test #32:
score: 0
Accepted
time: 156ms
memory: 26512kb
input:
750 245875 1 368 1 278 1 71 1 353 1 405 1 149 1 616 1 153 1 622 1 655 1 105 1 682 1 140 1 668 1 352 1 210 1 257 1 677 1 749 1 612 1 234 1 35 1 400 1 604 1 193 1 505 1 230 1 586 1 358 1 737 1 428 1 346 1 279 1 395 1 584 1 691 1 73 1 435 1 639 1 205 1 320 1 496 1 384 1 295 1 522 1 672 1 309 1 250 1 43...
output:
1 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 65 66 67 68 69 70 73 74 75 76 77 78 79 80 81 82 83 84 87 88 89 90 95 96 97 98 99 102 103 104 105 106 107 108 109 110 111 112 113 114 115 ...
result:
ok qwq
Test #33:
score: 0
Accepted
time: 66ms
memory: 12848kb
input:
750 101324 1 411 1 270 1 170 1 697 1 76 1 64 1 744 1 353 1 109 1 115 1 133 1 560 1 453 1 690 1 297 1 733 1 523 1 479 1 62 1 32 1 80 1 578 1 261 1 682 1 506 1 303 1 646 1 229 1 750 1 421 1 322 1 168 1 543 1 568 1 456 1 138 1 57 1 380 1 534 1 131 1 452 1 614 1 174 1 207 1 617 1 123 1 562 1 69 1 567 1 ...
output:
1 3 4 5 6 7 8 9 10 11 12 13 2 18 20 23 29 31 32 37 39 43 44 48 49 57 60 61 62 63 64 65 66 69 71 72 76 77 80 88 89 93 95 96 97 102 104 105 106 109 113 115 117 122 123 125 131 133 138 143 144 146 150 151 153 154 155 158 161 162 163 164 165 168 170 171 174 187 190 191 192 193 194 200 203 204 207 210 21...
result:
ok qwq
Test #34:
score: 0
Accepted
time: 21ms
memory: 7568kb
input:
750 45299 1 415 1 743 1 571 1 531 1 419 1 378 1 188 1 454 1 117 1 344 1 362 1 180 1 461 1 228 1 693 1 115 1 275 1 250 1 501 1 618 1 322 1 217 1 42 1 398 1 129 1 88 1 414 1 740 1 90 1 528 1 437 1 124 1 733 1 241 1 487 1 72 1 295 1 366 1 748 1 143 1 55 1 113 1 534 1 479 1 555 1 712 1 349 1 586 1 212 1...
output:
1 2 4 5 6 7 10 12 15 16 17 21 22 23 24 26 27 28 29 30 31 32 34 36 37 38 40 41 43 44 45 47 50 51 52 56 60 61 62 63 64 65 66 68 69 70 75 76 77 78 79 80 82 86 87 92 93 95 97 98 99 102 103 105 106 107 111 112 116 118 119 120 122 125 130 131 134 138 139 140 141 146 147 148 149 155 156 157 158 160 162 163...
result:
ok qwq
Test #35:
score: 0
Accepted
time: 175ms
memory: 27776kb
input:
750 258869 1 124 1 233 1 740 1 493 1 145 1 749 1 142 1 224 1 308 1 572 1 33 1 660 1 246 1 377 1 690 1 105 1 741 1 692 1 497 1 334 1 481 1 450 1 366 1 307 1 739 1 165 1 730 1 430 1 332 52 349 52 424 52 212 52 555 52 531 52 426 52 379 52 637 52 635 52 434 52 40 52 404 52 261 52 190 52 557 52 225 52 52...
output:
1 32 33 105 124 142 145 165 224 233 246 307 308 332 334 366 377 430 450 481 493 497 572 660 690 692 730 739 740 741 749 750 748 747 746 745 744 743 742 738 737 736 735 734 733 732 731 729 728 727 726 725 724 723 722 721 720 719 718 717 716 715 714 713 712 711 710 709 708 707 706 705 704 703 702 701 ...
result:
ok qwq
Test #36:
score: 0
Accepted
time: 3ms
memory: 3528kb
input:
750 1154 1 433 1 99 1 563 1 370 1 149 1 218 1 477 1 170 1 98 1 299 1 586 1 574 1 51 1 667 1 539 1 659 1 615 1 730 1 12 1 694 1 695 1 662 1 166 1 253 1 84 1 420 1 533 1 231 1 410 433 99 433 563 433 370 433 149 433 218 433 477 433 170 433 98 433 299 433 586 433 574 433 51 433 667 433 539 433 659 433 6...
output:
1 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 2 100 101 102 103...
result:
ok qwq
Test #37:
score: 0
Accepted
time: 3ms
memory: 3604kb
input:
750 1924 1 211 1 576 1 697 1 175 1 675 1 641 1 301 1 227 1 311 1 669 1 637 1 673 1 245 1 548 1 74 1 740 1 134 1 561 1 90 1 185 1 511 1 57 1 478 1 423 1 310 1 741 1 550 1 7 1 712 1 725 1 293 1 361 1 593 1 558 1 414 1 356 1 94 1 120 1 700 1 60 1 434 1 226 1 647 1 453 1 328 1 221 1 28 1 352 1 11 1 654 ...
output:
1 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 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 101 102 10...
result:
ok qwq
Test #38:
score: 0
Accepted
time: 166ms
memory: 28396kb
input:
750 244699 1 235 1 228 1 716 1 27 1 55 1 706 1 313 1 247 1 131 1 120 1 446 1 25 1 615 1 351 1 712 1 606 1 406 1 324 1 356 1 182 1 622 1 230 1 497 1 511 1 163 1 137 1 630 1 434 1 273 1 350 1 297 1 674 1 605 1 109 1 707 1 101 1 78 1 691 1 133 1 705 1 354 1 115 1 735 1 384 1 211 1 364 1 386 1 663 1 54 ...
output:
1 3 4 5 8 9 10 11 12 13 14 15 16 17 18 19 22 23 24 25 26 29 30 31 32 33 34 35 36 37 38 39 40 41 42 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 67 68 69 70 71 72 75 76 77 78 79 80 81 82 83 84 85 90 91 92 93 96 97 98 99 100 101 106 107 108 111 112 113 114 115 116 117 118 119 120 121 12...
result:
ok qwq
Test #39:
score: 0
Accepted
time: 228ms
memory: 29736kb
input:
1500 281624 1 1109 1 1191 1 775 1 218 1 867 1 1135 1 1484 1 72 1 523 1 502 1 1296 1 187 1 1241 1 1178 1 1099 1 305 1 962 1 431 1 813 1 368 1 755 1 722 1 404 1 1092 1 1263 1 999 1 704 1 1096 1 1234 1 645 1 504 1 246 1 365 1 624 1 838 1 1061 1 1458 1 430 1 738 1 1349 1 302 1 691 1 1098 1 1437 1 250 1 ...
output:
1 3 4 5 6 7 8 9 10 11 12 13 14 2 18 19 20 22 27 28 29 30 35 37 38 39 42 44 49 50 53 54 55 56 59 60 61 67 69 70 72 75 76 77 78 79 81 82 83 85 88 89 92 93 97 98 100 102 103 105 108 109 111 112 113 115 118 119 120 122 123 124 127 129 131 133 134 135 138 147 148 150 152 153 154 155 156 159 165 166 169 1...
result:
ok qwq
Test #40:
score: 0
Accepted
time: 231ms
memory: 29808kb
input:
1500 281624 1 359 1 429 1 391 1 904 1 152 1 321 1 1361 1 435 1 1043 1 1059 1 669 1 1437 1 548 1 186 1 278 1 416 1 618 1 1472 1 634 1 806 1 503 1 713 1 1197 1 252 1 960 1 1341 1 366 1 302 1 623 1 226 1 52 1 1034 1 448 1 738 1 430 1 408 1 1366 1 874 1 727 1 18 1 240 1 1294 1 301 1 141 1 1046 1 369 1 9...
output:
1 1279 3 1278 4 1277 1275 1276 27 1274 1272 1273 1256 1271 1269 1270 1267 1268 1257 1266 1264 1265 1262 1263 1260 1261 1258 1259 1254 1255 32 1253 33 1252 42 1251 43 1250 44 1249 1245 1248 1246 1247 235 1244 238 1243 239 1242 1240 1241 1234 1239 1237 1238 1235 1236 1232 1233 1030 1231 1043 1230 1228...
result:
ok qwq
Test #41:
score: 0
Accepted
time: 150ms
memory: 26920kb
input:
1000 250000 1 576 1 827 1 255 1 901 1 254 1 217 1 553 1 531 1 436 1 209 1 339 1 765 1 21 1 610 1 235 1 613 1 495 1 918 1 299 1 512 1 628 1 68 1 4 1 421 1 422 1 858 1 587 1 458 1 154 1 487 1 205 1 687 1 227 1 279 1 394 1 608 1 802 1 656 1 548 1 286 1 752 1 544 1 821 1 328 1 751 1 175 1 801 1 871 1 99...
output:
1 7 5 6 3 4 9 10 12 13 11 14 8 15 17 18 16 19 2 21 22 24 25 23 26 20 27 29 30 36 37 39 40 38 41 43 44 45 46 42 47 35 48 52 53 55 56 57 58 54 59 60 61 64 65 63 66 62 67 68 69 51 70 50 71 72 73 49 74 75 76 77 78 79 80 82 83 84 85 86 87 81 88 89 90 34 91 93 94 92 95 97 98 99 100 96 101 33 102 32 103 31...
result:
ok qwq
Test #42:
score: 0
Accepted
time: 154ms
memory: 25444kb
input:
750 235576 1 584 1 479 1 457 1 589 1 456 1 195 1 284 1 120 1 220 1 340 1 566 1 134 1 661 1 666 1 742 1 702 1 563 1 246 1 370 1 415 1 388 1 159 1 532 1 209 1 121 1 157 1 573 1 272 1 77 1 454 1 487 1 471 1 545 1 600 1 256 1 262 1 612 1 58 1 131 1 607 1 403 1 124 1 691 1 571 1 534 1 740 1 43 1 482 1 19...
output:
1 3 4 5 6 7 2 10 11 13 14 15 16 18 19 22 23 24 25 27 30 33 35 36 38 39 40 43 44 46 48 50 55 56 58 59 62 65 66 67 68 69 70 71 73 75 76 77 78 80 83 84 86 87 89 90 91 93 95 96 98 100 101 103 104 105 107 109 113 114 116 118 119 120 121 123 124 126 127 128 131 132 134 135 137 142 145 146 150 151 152 153 ...
result:
ok qwq
Test #43:
score: 0
Accepted
time: 163ms
memory: 26900kb
input:
1000 250000 1 54 1 332 1 325 1 717 1 164 1 931 1 373 1 578 1 788 1 290 1 900 1 610 1 646 1 531 1 188 1 600 1 448 1 625 1 728 1 320 1 461 1 204 1 558 1 665 1 629 1 869 1 100 1 340 1 268 1 715 1 338 1 608 1 353 1 777 1 264 1 771 1 835 1 169 1 276 1 601 1 895 1 661 1 507 1 611 1 568 1 475 1 863 1 510 1...
output:
1 1000 998 999 994 997 995 996 993 983 992 984 991 989 990 985 988 986 987 982 981 980 978 979 976 977 974 975 973 971 972 969 970 957 968 964 967 965 966 962 963 958 961 959 960 879 956 886 955 887 954 952 953 944 951 945 950 946 949 947 948 888 943 937 942 940 941 938 939 933 936 934 935 915 932 9...
result:
ok qwq
Test #44:
score: 0
Accepted
time: 148ms
memory: 24604kb
input:
700 226506 1 663 1 483 1 532 1 537 1 492 1 641 1 648 1 208 1 472 1 266 1 662 1 91 1 379 1 463 1 297 1 61 1 23 1 530 1 12 1 411 1 322 1 17 1 654 1 451 1 329 1 351 1 162 1 283 1 501 1 643 1 403 1 627 1 386 1 251 1 19 1 92 1 350 1 69 1 55 1 65 1 73 1 528 1 432 1 371 1 597 1 605 1 202 1 498 1 177 1 222 ...
output:
1 3 4 5 6 7 8 9 10 13 14 15 18 19 20 21 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 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 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 ...
result:
ok qwq
Test #45:
score: 0
Accepted
time: 156ms
memory: 26900kb
input:
1000 249494 933 199 933 48 933 238 933 122 933 17 933 573 933 592 933 505 933 784 933 165 933 840 933 809 933 676 933 565 933 353 933 819 933 425 933 423 933 185 933 733 933 580 933 870 933 257 933 735 933 629 933 114 933 200 933 181 933 1000 933 951 933 538 933 658 933 318 933 171 933 841 933 258 9...
output:
1 777 780 869 1000 870 999 871 998 872 997 875 996 994 995 878 993 879 992 880 991 881 990 980 989 983 988 984 987 985 986 981 982 882 979 967 978 972 977 975 976 973 974 968 971 969 970 883 966 964 965 884 963 955 962 956 961 959 960 957 958 953 954 951 952 891 950 892 949 923 948 946 947 944 945 9...
result:
ok qwq
Test #46:
score: 0
Accepted
time: 1ms
memory: 3348kb
input:
5 6 1 2 1 3 4 1 1 5 2 3 4 5
output:
1 5 3 4 2
result:
ok qwq
Test #47:
score: 0
Accepted
time: 257ms
memory: 33156kb
input:
199999 299997 2 1 3 1 1 4 1 5 1 6 7 1 8 1 9 1 1 10 1 11 12 1 13 1 1 14 15 1 1 16 17 1 1 18 19 1 1 20 1 21 1 22 23 1 1 24 1 25 26 1 27 1 1 28 1 29 30 1 1 31 1 32 33 1 1 34 1 35 1 36 37 1 1 38 1 39 40 1 41 1 1 42 1 43 44 1 1 45 46 1 1 47 48 1 49 1 1 50 1 51 52 1 53 1 54 1 1 55 1 56 1 57 1 58 59 1 60 1...
output:
1 199999 199998 199997 199995 199996 199994 199993 199991 199992 199990 199989 199987 199988 199986 199985 199983 199984 199982 199981 199979 199980 199978 199977 199975 199976 199974 199973 199971 199972 199970 199969 199967 199968 199966 199965 199963 199964 199962 199961 199959 199960 199958 1999...
result:
ok qwq
Test #48:
score: 0
Accepted
time: 301ms
memory: 33880kb
input:
300000 300000 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 2 29 2 30 2 31 2 32 2 33 2 34 2 35 2 36 2 37 2 38 2 39 2 40 2 41 2 42 2 43 2 44 2 45 2 46 2 47 2 48 2 49 2 50 2 51 2 52 2 53 2 54 2 55 2 56 2 57 2 58 2 59 2 60 2 61 ...
output:
1 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 101 102 103 ...
result:
ok qwq
Test #49:
score: 0
Accepted
time: 541ms
memory: 32648kb
input:
150000 300000 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 2 29 2 30 2 31 2 32 2 33 2 34 2 35 2 36 2 37 2 38 2 39 2 40 2 41 2 42 2 43 2 44 2 45 2 46 2 47 2 48 2 49 2 50 2 51 2 52 2 53 2 54 2 55 2 56 2 57 2 58 2 59 2 60 2 61 ...
output:
1 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 101 102 103 ...
result:
ok qwq
Test #50:
score: 0
Accepted
time: 445ms
memory: 31944kb
input:
60000 300000 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 2 29 2 30 2 31 2 32 2 33 2 34 2 35 2 36 2 37 2 38 2 39 2 40 2 41 2 42 2 43 2 44 2 45 2 46 2 47 2 48 2 49 2 50 2 51 2 52 2 53 2 54 2 55 2 56 2 57 2 58 2 59 2 60 2 61 2...
output:
1 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 101 102 103 ...
result:
ok qwq
Test #51:
score: 0
Accepted
time: 423ms
memory: 31640kb
input:
15000 300000 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 2 29 2 30 2 31 2 32 2 33 2 34 2 35 2 36 2 37 2 38 2 39 2 40 2 41 2 42 2 43 2 44 2 45 2 46 2 47 2 48 2 49 2 50 2 51 2 52 2 53 2 54 2 55 2 56 2 57 2 58 2 59 2 60 2 61 2...
output:
1 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 101 102 103 ...
result:
ok qwq
Test #52:
score: 0
Accepted
time: 245ms
memory: 33148kb
input:
200000 300000 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 1 29 1 30 1 31 1 32 1 33 1 34 1 35 1 36 1 37 1 38 1 39 1 40 1 41 1 42 1 43 1 44 1 45 1 46 1 47 1 48 1 49 1 50 1 51 1 52 1 53 1 54 1 55 1 56 1 57 1 58 1 59 1 60 1...
output:
1 3 4 5 6 200000 7 199999 8 199998 9 199997 10 199996 11 199995 12 199994 13 199993 14 199992 15 199991 16 199990 17 199989 18 199988 19 199987 20 199986 21 199985 22 199984 23 199983 24 199982 25 199981 26 199980 27 199979 28 199978 29 199977 30 199976 31 199975 32 199974 33 199973 34 199972 35 199...
result:
ok qwq
Test #53:
score: 0
Accepted
time: 259ms
memory: 33108kb
input:
200001 300000 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 1 29 1 30 1 31 1 32 1 33 1 34 1 35 1 36 1 37 1 38 1 39 1 40 1 41 1 42 1 43 1 44 1 45 1 46 1 47 1 48 1 49 1 50 1 51 1 52 1 53 1 54 1 55 1 56 1 57 1 58 1 59 1 60 1...
output:
1 100002 100003 100004 100005 100006 100007 100008 100009 100010 100011 100012 100013 100014 100015 100016 100017 100018 100019 100020 100021 100022 100023 100024 100025 100026 100027 100028 100029 100030 100031 100032 100033 100034 100035 100036 100037 100038 100039 100040 100041 100042 100043 1000...
result:
ok qwq
Test #54:
score: 0
Accepted
time: 291ms
memory: 33884kb
input:
300000 299999 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 1 29 1 30 1 31 1 32 1 33 1 34 1 35 1 36 1 37 1 38 1 39 1 40 1 41 1 42 1 43 1 44 1 45 1 46 1 47 1 48 1 49 1 50 1 51 1 52 1 53 1 54 1 55 1 56 1 57 1 58 1 59 1 60 1 6...
output:
1 2 150003 150004 150005 150006 150007 150008 150009 150010 150011 150012 150013 150014 150015 150016 150017 150018 150019 150020 150021 150022 150023 150024 150025 150026 150027 150028 150029 150030 150031 150032 150033 150034 150035 150036 150037 150038 150039 150040 150041 150042 150043 150044 15...
result:
ok qwq
Test #55:
score: 0
Accepted
time: 510ms
memory: 33712kb
input:
277777 299999 83480 84066 89447 138053 22019 117298 177566 275000 1 102260 1 243393 1 72575 1 158614 242036 131536 16114 153213 1 14416 173641 89066 64085 248261 25577 106882 137668 220979 226900 232508 180916 268690 1 197089 136413 2874 218273 106977 1 28628 1 66331 264247 167205 165667 194678 1 12...
output:
1 2 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 101 102 10...
result:
ok qwq
Test #56:
score: 0
Accepted
time: 372ms
memory: 26776kb
input:
1001 250000 277 821 646 178 815 340 54 841 141 706 257 155 376 969 1001 332 91 196 51 67 737 60 450 656 138 756 494 937 999 428 991 148 648 556 807 776 345 146 639 829 748 617 987 746 21 853 897 84 435 634 789 739 971 995 416 785 499 451 734 530 811 941 398 633 819 855 293 32 435 582 507 32 355 321 ...
output:
1 994 1001 997 1000 998 999 995 996 992 993 960 991 961 990 964 989 965 988 986 987 980 985 981 984 982 983 976 979 977 978 966 975 967 974 972 973 968 971 969 970 962 963 959 957 958 956 928 955 929 954 930 953 951 952 949 950 939 948 940 947 941 946 944 945 942 943 937 938 931 936 934 935 932 933 ...
result:
ok qwq
Test #57:
score: 0
Accepted
time: 338ms
memory: 25344kb
input:
1001 233359 401 540 791 950 167 305 233 735 143 698 614 39 935 923 823 952 864 151 388 360 148 701 962 349 318 698 171 830 127 228 378 521 274 313 544 399 607 221 748 824 250 408 148 316 657 294 608 39 853 39 656 536 951 570 689 558 789 733 723 500 419 320 120 887 348 349 185 212 687 176 154 810 298...
output:
1 5 18 21 36 37 54 55 56 57 60 61 62 63 66 67 68 69 70 71 72 73 76 77 78 79 146 149 150 151 152 155 156 157 158 159 160 161 174 175 176 177 178 189 190 191 194 195 196 197 212 215 220 221 222 223 226 227 228 229 230 231 252 253 254 255 256 257 258 259 266 275 278 279 292 293 296 301 304 305 306 307 ...
result:
ok qwq
Test #58:
score: 0
Accepted
time: 476ms
memory: 31484kb
input:
2333 300000 625 896 1013 677 1737 1495 2126 2006 861 1177 719 967 1453 1465 43 2030 2089 1048 353 2229 844 1617 1471 2027 1126 2277 62 2198 799 397 470 1359 1266 252 2236 412 46 1548 783 1113 2231 1558 968 1599 1721 746 1032 939 2089 2117 1921 967 302 1581 343 1515 1371 1713 1532 464 864 1687 1894 7...
output:
1 3 2 5 6 7 8 9 10 11 4 13 14 15 16 17 12 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 41 42 43 44 45 46 48 49 50 47 51 52 53 54 56 57 58 55 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 39 85 40 86 87 88 90 91 92 93 94 96 97 98 99 100 104 105 106 107 108 109...
result:
ok qwq
Test #59:
score: 0
Accepted
time: 401ms
memory: 30852kb
input:
41337 289303 5168 20449 19925 39393 41187 16784 41187 34827 25451 30122 38242 23752 5168 9331 38242 34141 25451 30641 41187 28920 19925 12908 38242 8286 41187 34195 28038 1113 23216 9730 38242 27780 41187 6968 19925 33368 41187 40415 41187 2367 41187 12706 41187 7031 38242 23805 19925 9172 38242 336...
output:
1 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 101 102 10...
result:
ok qwq
Test #60:
score: 0
Accepted
time: 430ms
memory: 32304kb
input:
99999 299985 26299 90867 51122 17693 81891 51018 26299 98987 26299 66077 81891 54919 51122 65487 51122 27865 26299 23884 81891 36921 51122 22704 26299 3538 26299 82595 81891 70563 26299 63110 81891 58335 51122 67974 81891 94538 51122 30153 26299 11592 51122 99077 26299 38022 51122 21128 81891 19911 ...
output:
1 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 101 102 10...
result:
ok qwq
Test #61:
score: 0
Accepted
time: 491ms
memory: 32424kb
input:
102311 300000 84558 28122 73800 60160 16887 2984 73800 2740 48666 79181 84558 49101 73800 66332 48666 87065 73800 20123 85294 20372 48666 10539 85294 68529 73800 72419 73800 65059 16887 91344 48666 4996 85294 98487 73800 81170 85294 77951 48666 67637 48666 60644 73800 50867 48666 23902 73800 52178 4...
output:
1 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 101 102 10...
result:
ok qwq
Test #62:
score: 0
Accepted
time: 495ms
memory: 32792kb
input:
149999 299992 139174 24744 139174 38713 32325 41832 139174 30995 139174 46952 139174 54496 139174 89954 32325 8291 139174 122154 139174 89004 32325 114391 32325 99295 32325 34620 32325 71999 139174 115054 32325 105559 32325 2277 139174 59806 139174 44962 32325 50155 32325 100720 32325 144804 32325 1...
output:
1 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 101 102 10...
result:
ok qwq
Test #63:
score: 0
Accepted
time: 136ms
memory: 29876kb
input:
753 282376 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 2 29 2 30 2 31 2 32 2 33 2 34 2 35 2 36 2 37 2 38 2 39 2 40 2 41 2 42 2 43 2 44 2 45 2 46 2 47 2 48 2 49 2 50 2 51 2 52 2 53 2 54 2 55 2 56 2 57 2 58 2 59 2 60 2 61 2...
output:
1 753 752 751 750 749 748 747 746 745 744 743 742 741 740 739 738 737 736 735 734 733 732 731 730 729 728 727 726 725 724 723 722 721 720 719 718 717 716 715 714 713 712 711 710 709 708 707 706 705 704 703 702 701 700 699 698 697 696 695 694 693 692 691 690 689 688 687 686 685 684 683 682 681 680 67...
result:
ok qwq