QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#601253 | #8726. Magic Show | xwh_Marvelous | 35 | 0ms | 1936kb | C++14 | 1.3kb | 2024-09-29 21:52:46 | 2024-09-29 21:52:47 |
Judging History
Alice
#include<bits/stdc++.h>
#include"Alice.h"
using namespace std;
//#define int long long
//#define mod 1000000007
#define N 5005
//#define pii pair<int,int>
//#define fi first
//#define se second
//#define rep(i,j,k) for(int i=j;i<=k;i++)
vector<std::pair<int, int>>op;
int a[N],b[N];
vector<int>ls[2];
int n=5000;
mt19937 rd(156168);
void gen(){
for(int i=3;i<=5000;i++)a[i]=rd()%64;
b[1]=0,b[2]=1;
for(int i=3;i<=5000;i++)b[i]=rd()%2;
}
std::vector<std::pair<int, int>> Alice(){
long long x=setN(5000);
gen();
op.push_back({1,2});
ls[0].push_back(1),ls[1].push_back(2);
for(int i=3;i<=n;i++){
op.push_back({ls[(x>>a[i])&1][rd()%ls[(x>>a[i])&1].size()],i});
ls[b[i]].push_back(i);
}
return op;
}
Bob
#include<bits/stdc++.h>
#include"Bob.h"
using namespace std;
// #define int long long
//#define mod 1000000007
#define N 5005
//#define pii pair<int,int>
#define fi first
#define se second
//#define rep(i,j,k) for(int i=j;i<=k;i++)
vector<std::pair<int, int>>op;
int a[N],b[N];
int n=5000;
mt19937 rd(156168);
void gen(){
for(int i=3;i<=5000;i++)a[i]=rd()%64;
b[1]=0,b[2]=1;
for(int i=3;i<=5000;i++)b[i]=rd()%2;
}
long long Bob(std::vector<std::pair<int, int>> V){
gen();
long long ans=0;
for(auto op:V){
int u=op.fi,v=op.se;
if(u>v)swap(u,v);
ans|=(b[u]<<a[v]);
}
return ans;
}
Details
Tip: Click on the bar to expand more detailed information
Subtask #1:
score: 5
Accepted
Test #1:
score: 5
Accepted
time: 0ms = 0ms + 0ms
memory: 1932kb,1848kb
input:
1 4005
output:
a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022 1 5000 1 2 1 3 1 4 1 5 1 6 5 7 1 8 5 9 9 10 10 11 5 12 12 13 9 14 11 15 1 16 13 17 5 18 6 19 19 20 3 21 16 22 21 23 5 24 6 25 13 26 6 27 10 28 14 29 9 30 20 31 9 32 5 33 1...
input:
a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022 1 5000 1 2 1 3 1 4 1 5 1 6 5 7 1 8 5 9 9 10 10 11 5 12 12 13 9 14 11 15 1 16 13 17 5 18 6 19 19 20 3 21 16 22 21 23 5 24 6 25 13 26 6 27 10 28 14 29 9 30 20 31 9 32 5 33 1...
output:
2 5000 2699 1 3 1 8 1 47 1 2706 2 364 2 375 4 75 5 9 5 33 5 35 5 72 5 102 5 137 5 424 5 1309 6 25 6 136 6 152 6 233 9 10 9 30 9 54 9 263 9 952 9 1404 9 4727 10 28 10 41 10 61 10 347 10 1080 11 15 11 328 12 13 12 164 12 453 12 801 12 4590 13 17 13 26 13 48 13 2197 14 29 15 331 17 4893 18 288 19 20 19...
input:
2 5000 2699 1 3 1 8 1 47 1 2706 2 364 2 375 4 75 5 9 5 33 5 35 5 72 5 102 5 137 5 424 5 1309 6 25 6 136 6 152 6 233 9 10 9 30 9 54 9 263 9 952 9 1404 9 4727 10 28 10 41 10 61 10 347 10 1080 11 15 11 328 12 13 12 164 12 453 12 801 12 4590 13 17 13 26 13 48 13 2197 14 29 15 331 17 4893 18 288 19 20 19...
output:
08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e 4005
Test #2:
score: 5
Accepted
time: 0ms = 0ms + 0ms
memory: 1932kb,1848kb
input:
1 459
output:
a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022 1 5000 1 2 1 3 1 4 1 5 1 6 5 7 1 8 5 9 9 10 10 11 3 12 12 13 9 14 11 15 1 16 13 17 5 18 6 19 19 20 5 21 19 22 21 23 5 24 6 25 13 26 6 27 10 28 14 29 9 30 20 31 9 32 5 33 1...
input:
a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022 1 5000 1 2 1 3 1 4 1 5 1 6 5 7 1 8 5 9 9 10 10 11 3 12 12 13 9 14 11 15 1 16 13 17 5 18 6 19 19 20 5 21 19 22 21 23 5 24 6 25 13 26 6 27 10 28 14 29 9 30 20 31 9 32 5 33 1...
output:
2 5000 2699 1 3 1 8 1 47 1 369 1 2706 2 364 2 375 5 9 5 33 5 102 5 137 5 424 5 1309 6 25 6 136 6 152 6 233 7 35 7 36 9 10 9 30 9 263 9 952 9 1404 9 4727 10 28 10 41 10 61 10 347 10 1080 11 15 11 89 11 328 12 13 12 164 12 246 12 453 12 801 12 4590 13 17 13 26 13 48 13 2197 14 29 14 54 18 72 19 20 19 ...
input:
2 5000 2699 1 3 1 8 1 47 1 369 1 2706 2 364 2 375 5 9 5 33 5 102 5 137 5 424 5 1309 6 25 6 136 6 152 6 233 7 35 7 36 9 10 9 30 9 263 9 952 9 1404 9 4727 10 28 10 41 10 61 10 347 10 1080 11 15 11 89 11 328 12 13 12 164 12 246 12 453 12 801 12 4590 13 17 13 26 13 48 13 2197 14 29 14 54 18 72 19 20 19 ...
output:
08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e 459
Test #3:
score: 5
Accepted
time: 0ms = 0ms + 0ms
memory: 1928kb,1848kb
input:
1 2495
output:
a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022 1 5000 1 2 1 3 1 4 1 5 1 6 5 7 1 8 5 9 9 10 10 11 5 12 12 13 9 14 11 15 1 16 13 17 5 18 15 19 19 20 3 21 16 22 21 23 5 24 6 25 13 26 6 27 10 28 14 29 9 30 20 31 9 32 5 33 ...
input:
a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022 1 5000 1 2 1 3 1 4 1 5 1 6 5 7 1 8 5 9 9 10 10 11 5 12 12 13 9 14 11 15 1 16 13 17 5 18 15 19 19 20 3 21 16 22 21 23 5 24 6 25 13 26 6 27 10 28 14 29 9 30 20 31 9 32 5 33 ...
output:
2 5000 2699 1 3 1 8 1 47 1 2706 2 364 2 375 4 75 5 9 5 33 5 72 5 102 5 137 5 424 5 1309 6 25 6 136 6 233 7 35 9 10 9 30 9 54 9 263 9 952 9 1404 9 4727 10 28 10 41 10 61 10 347 10 1080 11 15 11 89 11 328 12 13 12 164 12 453 12 4590 13 17 13 26 13 48 13 2197 14 29 15 331 18 152 18 288 19 20 19 70 19 3...
input:
2 5000 2699 1 3 1 8 1 47 1 2706 2 364 2 375 4 75 5 9 5 33 5 72 5 102 5 137 5 424 5 1309 6 25 6 136 6 233 7 35 9 10 9 30 9 54 9 263 9 952 9 1404 9 4727 10 28 10 41 10 61 10 347 10 1080 11 15 11 89 11 328 12 13 12 164 12 453 12 4590 13 17 13 26 13 48 13 2197 14 29 15 331 18 152 18 288 19 20 19 70 19 3...
output:
08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e 2495
Test #4:
score: 5
Accepted
time: 0ms = 0ms + 0ms
memory: 1928kb,1844kb
input:
3 1560
output:
a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022 3 5000 1 2 1 3 1 4 1 5 1 6 5 7 1 8 5 9 9 10 10 11 5 12 12 13 9 14 11 15 1 16 13 17 5 18 15 19 19 20 5 21 19 22 21 23 5 24 6 25 13 26 6 27 10 28 11 29 9 30 20 31 9 32 5 33 ...
input:
a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022 3 5000 1 2 1 3 1 4 1 5 1 6 5 7 1 8 5 9 9 10 10 11 5 12 12 13 9 14 11 15 1 16 13 17 5 18 15 19 19 20 5 21 19 22 21 23 5 24 6 25 13 26 6 27 10 28 11 29 9 30 20 31 9 32 5 33 ...
output:
4 5000 2500 1 2 1 3 1 4 1 5 1 6 1 8 1 16 1 47 1 53 1 60 1 96 1 101 1 227 1 369 1 375 1 430 1 455 1 1644 1 2706 1 4898 14 168 17 4893 29 4165 37 545 42 142 42 2517 44 887 50 193 57 391 57 1272 64 214 74 2580 81 184 81 4299 84 234 84 2091 85 228 91 1804 94 3656 99 4682 100 135 111 320 113 120 113 2207...
input:
4 5000 2500 1 2 1 3 1 4 1 5 1 6 1 8 1 16 1 47 1 53 1 60 1 96 1 101 1 227 1 369 1 375 1 430 1 455 1 1644 1 2706 1 4898 14 168 17 4893 29 4165 37 545 42 142 42 2517 44 887 50 193 57 391 57 1272 64 214 74 2580 81 184 81 4299 84 234 84 2091 85 228 91 1804 94 3656 99 4682 100 135 111 320 113 120 113 2207...
output:
08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e 1560
Test #5:
score: 5
Accepted
time: 0ms = 0ms + 0ms
memory: 1928kb,1848kb
input:
3 3594
output:
a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022 3 5000 1 2 1 3 1 4 1 5 1 6 5 7 1 8 5 9 9 10 10 11 5 12 12 13 9 14 11 15 1 16 13 17 5 18 6 19 19 20 5 21 19 22 21 23 5 24 6 25 13 26 6 27 10 28 11 29 9 30 20 31 9 32 5 33 1...
input:
a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022 3 5000 1 2 1 3 1 4 1 5 1 6 5 7 1 8 5 9 9 10 10 11 5 12 12 13 9 14 11 15 1 16 13 17 5 18 6 19 19 20 5 21 19 22 21 23 5 24 6 25 13 26 6 27 10 28 11 29 9 30 20 31 9 32 5 33 1...
output:
4 5000 2500 1 2 1 3 1 4 1 5 1 6 1 8 1 16 1 47 1 53 1 60 1 96 1 101 1 227 1 369 1 375 1 430 1 455 1 1644 1 2706 1 4898 14 168 17 719 17 4893 25 1600 36 94 38 40 39 43 41 92 42 100 42 142 42 2517 44 887 44 1285 50 193 50 437 57 391 57 1272 62 2098 64 214 70 145 74 2580 81 184 81 4299 82 2708 84 2091 8...
input:
4 5000 2500 1 2 1 3 1 4 1 5 1 6 1 8 1 16 1 47 1 53 1 60 1 96 1 101 1 227 1 369 1 375 1 430 1 455 1 1644 1 2706 1 4898 14 168 17 719 17 4893 25 1600 36 94 38 40 39 43 41 92 42 100 42 142 42 2517 44 887 44 1285 50 193 50 437 57 391 57 1272 62 2098 64 214 70 145 74 2580 81 184 81 4299 82 2708 84 2091 8...
output:
08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e 3594
Test #6:
score: 5
Accepted
time: 0ms = 0ms + 0ms
memory: 1932kb,1844kb
input:
3 1750
output:
a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022 3 5000 1 2 1 3 1 4 1 5 1 6 5 7 1 8 5 9 9 10 10 11 3 12 12 13 9 14 11 15 1 16 13 17 5 18 15 19 19 20 5 21 19 22 21 23 5 24 6 25 13 26 6 27 10 28 11 29 9 30 20 31 9 32 5 33 ...
input:
a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022 3 5000 1 2 1 3 1 4 1 5 1 6 5 7 1 8 5 9 9 10 10 11 3 12 12 13 9 14 11 15 1 16 13 17 5 18 15 19 19 20 5 21 19 22 21 23 5 24 6 25 13 26 6 27 10 28 11 29 9 30 20 31 9 32 5 33 ...
output:
4 5000 2500 1 2 1 3 1 4 1 5 1 6 1 8 1 16 1 47 1 53 1 60 1 101 1 227 1 369 1 375 1 430 1 455 1 1644 1 2706 1 4898 2 736 4 75 4 155 7 36 14 54 14 150 14 202 15 1888 17 4893 29 395 29 4165 31 74 32 84 36 94 37 545 41 92 42 2517 43 96 43 1227 45 2779 50 437 57 98 57 391 57 1272 62 2098 64 214 64 443 64 ...
input:
4 5000 2500 1 2 1 3 1 4 1 5 1 6 1 8 1 16 1 47 1 53 1 60 1 101 1 227 1 369 1 375 1 430 1 455 1 1644 1 2706 1 4898 2 736 4 75 4 155 7 36 14 54 14 150 14 202 15 1888 17 4893 29 395 29 4165 31 74 32 84 36 94 37 545 41 92 42 2517 43 96 43 1227 45 2779 50 437 57 98 57 391 57 1272 62 2098 64 214 64 443 64 ...
output:
08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e 1750
Test #7:
score: 5
Accepted
time: 0ms = 0ms + 0ms
memory: 1932kb,1844kb
input:
5 4878
output:
a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022 5 5000 1 2 1 3 1 4 1 5 1 6 5 7 1 8 5 9 9 10 10 11 5 12 12 13 9 14 11 15 1 16 13 17 5 18 6 19 19 20 5 21 19 22 21 23 5 24 6 25 13 26 6 27 10 28 11 29 9 30 20 31 9 32 5 33 1...
input:
a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022 5 5000 1 2 1 3 1 4 1 5 1 6 5 7 1 8 5 9 9 10 10 11 5 12 12 13 9 14 11 15 1 16 13 17 5 18 6 19 19 20 5 21 19 22 21 23 5 24 6 25 13 26 6 27 10 28 11 29 9 30 20 31 9 32 5 33 1...
output:
6 5000 2532 1 2 1 3 1 4 1 5 1 6 1 16 1 47 1 53 1 60 1 101 1 227 1 369 1 375 1 430 1 455 1 1644 1 2706 7 35 9 10 9 14 9 30 9 32 9 54 9 108 9 263 9 440 9 952 9 1404 9 2253 9 3531 9 4727 11 15 11 29 11 89 11 236 11 291 11 328 11 589 12 13 12 91 12 164 12 746 12 801 12 1379 12 1861 12 4590 17 4893 18 28...
input:
6 5000 2532 1 2 1 3 1 4 1 5 1 6 1 16 1 47 1 53 1 60 1 101 1 227 1 369 1 375 1 430 1 455 1 1644 1 2706 7 35 9 10 9 14 9 30 9 32 9 54 9 108 9 263 9 440 9 952 9 1404 9 2253 9 3531 9 4727 11 15 11 29 11 89 11 236 11 291 11 328 11 589 12 13 12 91 12 164 12 746 12 801 12 1379 12 1861 12 4590 17 4893 18 28...
output:
08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e 4878
Test #8:
score: 5
Accepted
time: 0ms = 0ms + 0ms
memory: 1928kb,1852kb
input:
5 1223
output:
a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022 5 5000 1 2 1 3 1 4 1 5 1 6 5 7 1 8 5 9 9 10 10 11 3 12 12 13 9 14 11 15 1 16 13 17 5 18 6 19 19 20 5 21 19 22 21 23 5 24 6 25 13 26 6 27 10 28 14 29 9 30 20 31 9 32 5 33 1...
input:
a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022 5 5000 1 2 1 3 1 4 1 5 1 6 5 7 1 8 5 9 9 10 10 11 3 12 12 13 9 14 11 15 1 16 13 17 5 18 6 19 19 20 5 21 19 22 21 23 5 24 6 25 13 26 6 27 10 28 14 29 9 30 20 31 9 32 5 33 1...
output:
6 5000 2513 1 8 2 364 2 375 2 736 3 12 4 75 4 155 5 7 5 9 5 18 5 21 5 24 5 33 5 82 5 102 5 137 5 249 5 424 5 1309 5 2449 5 2863 5 4859 6 19 6 25 6 27 6 136 6 152 6 233 6 409 6 1099 6 1186 6 1705 6 2305 10 11 10 28 10 41 10 61 10 143 10 347 10 843 10 897 10 1080 10 3575 13 17 13 26 13 42 13 48 13 68 ...
input:
6 5000 2513 1 8 2 364 2 375 2 736 3 12 4 75 4 155 5 7 5 9 5 18 5 21 5 24 5 33 5 82 5 102 5 137 5 249 5 424 5 1309 5 2449 5 2863 5 4859 6 19 6 25 6 27 6 136 6 152 6 233 6 409 6 1099 6 1186 6 1705 6 2305 10 11 10 28 10 41 10 61 10 143 10 347 10 843 10 897 10 1080 10 3575 13 17 13 26 13 42 13 48 13 68 ...
output:
08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e 1223
Test #9:
score: 5
Accepted
time: 0ms = 0ms + 0ms
memory: 1928kb,1848kb
input:
5 648
output:
a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022 5 5000 1 2 1 3 1 4 1 5 1 6 5 7 1 8 5 9 9 10 10 11 5 12 12 13 9 14 11 15 1 16 13 17 5 18 6 19 19 20 5 21 19 22 21 23 5 24 6 25 13 26 6 27 10 28 11 29 9 30 20 31 9 32 5 33 1...
input:
a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022 5 5000 1 2 1 3 1 4 1 5 1 6 5 7 1 8 5 9 9 10 10 11 5 12 12 13 9 14 11 15 1 16 13 17 5 18 6 19 19 20 5 21 19 22 21 23 5 24 6 25 13 26 6 27 10 28 11 29 9 30 20 31 9 32 5 33 1...
output:
6 5000 2504 1 2 1 4 1 5 1 6 1 8 1 16 1 47 1 53 1 60 1 96 1 101 1 227 1 369 1 375 1 430 1 455 1 1644 1 2706 1 4898 9 10 9 14 9 30 9 32 9 54 9 108 9 263 9 440 9 952 9 1404 9 2253 9 3531 9 4727 11 15 11 29 11 89 11 236 11 291 11 328 11 589 12 13 12 91 12 164 12 246 12 453 12 746 12 801 12 1379 12 1861 ...
input:
6 5000 2504 1 2 1 4 1 5 1 6 1 8 1 16 1 47 1 53 1 60 1 96 1 101 1 227 1 369 1 375 1 430 1 455 1 1644 1 2706 1 4898 9 10 9 14 9 30 9 32 9 54 9 108 9 263 9 440 9 952 9 1404 9 2253 9 3531 9 4727 11 15 11 29 11 89 11 236 11 291 11 328 11 589 12 13 12 91 12 164 12 246 12 453 12 746 12 801 12 1379 12 1861 ...
output:
08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e 648
Test #10:
score: 5
Accepted
time: 0ms = 0ms + 0ms
memory: 1928kb,1848kb
input:
7 4475
output:
a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022 7 5000 1 2 1 3 1 4 1 5 1 6 5 7 1 8 5 9 9 10 10 11 3 12 12 13 9 14 11 15 1 16 13 17 5 18 15 19 19 20 3 21 16 22 21 23 5 24 6 25 13 26 6 27 10 28 14 29 9 30 20 31 9 32 5 33 ...
input:
a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022 7 5000 1 2 1 3 1 4 1 5 1 6 5 7 1 8 5 9 9 10 10 11 3 12 12 13 9 14 11 15 1 16 13 17 5 18 15 19 19 20 3 21 16 22 21 23 5 24 6 25 13 26 6 27 10 28 14 29 9 30 20 31 9 32 5 33 ...
output:
8 5000 2500 2 247 3 270 14 54 15 3999 16 22 29 4165 30 208 36 94 37 882 41 92 41 852 42 1846 44 1131 45 2779 61 3555 62 2098 68 2269 69 86 69 99 69 2761 71 119 72 2030 73 155 73 587 74 2580 81 4299 82 138 82 2708 83 2546 84 234 84 1526 87 1084 87 3792 89 201 90 186 91 1804 100 369 105 211 105 661 11...
input:
8 5000 2500 2 247 3 270 14 54 15 3999 16 22 29 4165 30 208 36 94 37 882 41 92 41 852 42 1846 44 1131 45 2779 61 3555 62 2098 68 2269 69 86 69 99 69 2761 71 119 72 2030 73 155 73 587 74 2580 81 4299 82 138 82 2708 83 2546 84 234 84 1526 87 1084 87 3792 89 201 90 186 91 1804 100 369 105 211 105 661 11...
output:
08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e 4475
Test #11:
score: 5
Accepted
time: 0ms = 0ms + 0ms
memory: 1932kb,1848kb
input:
7 4240
output:
a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022 7 5000 1 2 1 3 1 4 1 5 1 6 5 7 1 8 5 9 9 10 10 11 5 12 12 13 9 14 11 15 1 16 13 17 5 18 15 19 19 20 5 21 19 22 21 23 5 24 6 25 13 26 6 27 10 28 11 29 9 30 20 31 9 32 5 33 ...
input:
a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022 7 5000 1 2 1 3 1 4 1 5 1 6 5 7 1 8 5 9 9 10 10 11 5 12 12 13 9 14 11 15 1 16 13 17 5 18 15 19 19 20 5 21 19 22 21 23 5 24 6 25 13 26 6 27 10 28 11 29 9 30 20 31 9 32 5 33 ...
output:
8 5000 2500 2 247 3 270 15 1888 29 395 29 4165 31 74 44 1131 56 209 56 1168 56 1463 56 2375 56 3122 69 99 69 2223 73 155 73 587 79 988 81 4299 83 2546 84 234 89 116 93 2530 98 1188 105 211 105 661 110 617 110 1399 110 1960 113 4320 118 613 120 292 128 608 128 876 128 2480 129 139 129 1556 132 599 13...
input:
8 5000 2500 2 247 3 270 15 1888 29 395 29 4165 31 74 44 1131 56 209 56 1168 56 1463 56 2375 56 3122 69 99 69 2223 73 155 73 587 79 988 81 4299 83 2546 84 234 89 116 93 2530 98 1188 105 211 105 661 110 617 110 1399 110 1960 113 4320 118 613 120 292 128 608 128 876 128 2480 129 139 129 1556 132 599 13...
output:
08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e 4240
Test #12:
score: 5
Accepted
time: 0ms = 0ms + 0ms
memory: 1928kb,1848kb
input:
7 1291
output:
a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022 7 5000 1 2 1 3 1 4 1 5 1 6 5 7 1 8 5 9 9 10 10 11 5 12 12 13 9 14 11 15 1 16 13 17 5 18 6 19 19 20 5 21 19 22 21 23 5 24 6 25 13 26 6 27 10 28 14 29 9 30 20 31 9 32 5 33 1...
input:
a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022 7 5000 1 2 1 3 1 4 1 5 1 6 5 7 1 8 5 9 9 10 10 11 5 12 12 13 9 14 11 15 1 16 13 17 5 18 6 19 19 20 5 21 19 22 21 23 5 24 6 25 13 26 6 27 10 28 14 29 9 30 20 31 9 32 5 33 1...
output:
8 5000 2500 2 364 11 236 11 291 11 328 14 29 15 3999 36 94 37 882 41 92 41 852 42 1846 50 193 56 209 56 1463 56 3122 57 1272 59 438 59 3925 59 4734 62 2098 69 99 69 2223 69 2761 71 119 73 155 74 2580 79 850 80 695 80 2001 81 4299 82 2708 84 1526 85 228 87 100 87 1084 87 3792 90 177 90 186 93 1193 93...
input:
8 5000 2500 2 364 11 236 11 291 11 328 14 29 15 3999 36 94 37 882 41 92 41 852 42 1846 50 193 56 209 56 1463 56 3122 57 1272 59 438 59 3925 59 4734 62 2098 69 99 69 2223 69 2761 71 119 73 155 74 2580 79 850 80 695 80 2001 81 4299 82 2708 84 1526 85 228 87 100 87 1084 87 3792 90 177 90 186 93 1193 93...
output:
08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e 1291
Subtask #2:
score: 30
Accepted
Test #13:
score: 30
Accepted
time: 0ms = 0ms + 0ms
memory: 1932kb,1856kb
input:
1 17476204
output:
a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022 1 5000 1 2 1 3 1 4 1 5 1 6 5 7 1 8 5 9 9 10 10 11 3 12 12 13 9 14 11 15 1 16 16 17 5 18 6 19 19 20 3 21 16 22 21 23 5 24 6 25 13 26 6 27 10 28 11 29 9 30 20 31 9 32 5 33 1...
input:
a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022 1 5000 1 2 1 3 1 4 1 5 1 6 5 7 1 8 5 9 9 10 10 11 3 12 12 13 9 14 11 15 1 16 16 17 5 18 6 19 19 20 3 21 16 22 21 23 5 24 6 25 13 26 6 27 10 28 11 29 9 30 20 31 9 32 5 33 1...
output:
2 5000 2699 1 3 1 8 1 47 1 375 1 2706 2 526 3 164 3 3624 4 75 5 9 5 33 5 35 5 102 5 137 5 424 5 1309 6 25 6 136 6 152 6 233 7 36 9 10 9 30 9 263 9 952 9 1404 9 4727 10 28 10 41 10 61 10 347 10 1080 11 15 11 29 11 89 12 13 12 453 12 801 12 4590 13 26 13 48 13 2197 14 54 15 331 16 17 16 492 16 974 17 ...
input:
2 5000 2699 1 3 1 8 1 47 1 375 1 2706 2 526 3 164 3 3624 4 75 5 9 5 33 5 35 5 102 5 137 5 424 5 1309 6 25 6 136 6 152 6 233 7 36 9 10 9 30 9 263 9 952 9 1404 9 4727 10 28 10 41 10 61 10 347 10 1080 11 15 11 29 11 89 12 13 12 453 12 801 12 4590 13 26 13 48 13 2197 14 54 15 331 16 17 16 492 16 974 17 ...
output:
08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e 17476204
Test #14:
score: 30
Accepted
time: 0ms = 0ms + 0ms
memory: 1932kb,1852kb
input:
1 11926600
output:
a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022 1 5000 1 2 1 3 1 4 1 5 1 6 5 7 1 8 5 9 9 10 10 11 3 12 12 13 9 14 11 15 1 16 13 17 5 18 6 19 19 20 5 21 19 22 21 23 5 24 6 25 13 26 6 27 10 28 11 29 9 30 20 31 9 32 5 33 1...
input:
a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022 1 5000 1 2 1 3 1 4 1 5 1 6 5 7 1 8 5 9 9 10 10 11 3 12 12 13 9 14 11 15 1 16 13 17 5 18 6 19 19 20 5 21 19 22 21 23 5 24 6 25 13 26 6 27 10 28 11 29 9 30 20 31 9 32 5 33 1...
output:
2 5000 2699 1 3 1 8 1 47 1 369 1 375 1 2706 2 247 3 270 5 9 5 33 5 35 5 102 5 137 5 424 5 1309 6 25 6 136 6 152 6 233 7 36 9 10 9 30 9 263 9 952 9 1404 9 4727 10 28 10 41 10 61 10 347 11 15 11 29 11 328 12 13 12 164 12 246 12 801 12 4590 13 17 13 26 13 2197 14 54 14 4785 15 453 17 464 17 1858 18 71 ...
input:
2 5000 2699 1 3 1 8 1 47 1 369 1 375 1 2706 2 247 3 270 5 9 5 33 5 35 5 102 5 137 5 424 5 1309 6 25 6 136 6 152 6 233 7 36 9 10 9 30 9 263 9 952 9 1404 9 4727 10 28 10 41 10 61 10 347 11 15 11 29 11 328 12 13 12 164 12 246 12 801 12 4590 13 17 13 26 13 2197 14 54 14 4785 15 453 17 464 17 1858 18 71 ...
output:
08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e 11926600
Test #15:
score: 30
Accepted
time: 0ms = 0ms + 0ms
memory: 1928kb,1848kb
input:
1 16602378
output:
a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022 1 5000 1 2 1 3 1 4 1 5 1 6 5 7 1 8 5 9 9 10 10 11 5 12 12 13 9 14 11 15 1 16 13 17 5 18 6 19 19 20 5 21 19 22 21 23 5 24 6 25 13 26 6 27 10 28 11 29 9 30 20 31 9 32 5 33 1...
input:
a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022 1 5000 1 2 1 3 1 4 1 5 1 6 5 7 1 8 5 9 9 10 10 11 5 12 12 13 9 14 11 15 1 16 13 17 5 18 6 19 19 20 5 21 19 22 21 23 5 24 6 25 13 26 6 27 10 28 11 29 9 30 20 31 9 32 5 33 1...
output:
2 5000 2699 1 3 1 8 1 47 1 369 1 375 1 2706 2 247 3 270 3 1318 5 9 5 33 5 72 5 102 5 137 5 424 5 1309 6 25 6 136 6 152 6 233 7 35 9 10 9 30 9 54 9 263 9 952 9 1404 9 4727 10 28 10 41 10 61 10 347 11 15 11 29 12 13 12 164 12 246 12 801 12 4590 13 17 13 26 13 2197 14 4785 15 453 16 492 17 1858 19 20 1...
input:
2 5000 2699 1 3 1 8 1 47 1 369 1 375 1 2706 2 247 3 270 3 1318 5 9 5 33 5 72 5 102 5 137 5 424 5 1309 6 25 6 136 6 152 6 233 7 35 9 10 9 30 9 54 9 263 9 952 9 1404 9 4727 10 28 10 41 10 61 10 347 11 15 11 29 12 13 12 164 12 246 12 801 12 4590 13 17 13 26 13 2197 14 4785 15 453 16 492 17 1858 19 20 1...
output:
08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e 16602378
Test #16:
score: 30
Accepted
time: 0ms = 0ms + 0ms
memory: 1932kb,1848kb
input:
3 13129243
output:
a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022 3 5000 1 2 1 3 1 4 1 5 1 6 5 7 1 8 5 9 9 10 10 11 5 12 12 13 9 14 11 15 1 16 13 17 5 18 15 19 19 20 5 21 19 22 21 23 5 24 6 25 13 26 6 27 10 28 14 29 9 30 20 31 9 32 5 33 ...
input:
a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022 3 5000 1 2 1 3 1 4 1 5 1 6 5 7 1 8 5 9 9 10 10 11 5 12 12 13 9 14 11 15 1 16 13 17 5 18 15 19 19 20 5 21 19 22 21 23 5 24 6 25 13 26 6 27 10 28 14 29 9 30 20 31 9 32 5 33 ...
output:
4 5000 2500 1 5 3 270 3 1318 4 636 5 7 5 9 5 12 5 18 5 21 5 24 5 33 5 72 5 82 5 102 5 137 5 249 5 424 5 1309 5 2863 5 4859 8 824 14 29 14 168 16 492 23 858 25 416 29 4165 31 2207 32 321 37 545 39 2133 41 92 41 852 50 193 51 1384 54 998 62 471 62 2098 66 3511 70 4738 82 2708 83 516 83 2546 85 228 90 ...
input:
4 5000 2500 1 5 3 270 3 1318 4 636 5 7 5 9 5 12 5 18 5 21 5 24 5 33 5 72 5 82 5 102 5 137 5 249 5 424 5 1309 5 2863 5 4859 8 824 14 29 14 168 16 492 23 858 25 416 29 4165 31 2207 32 321 37 545 39 2133 41 92 41 852 50 193 51 1384 54 998 62 471 62 2098 66 3511 70 4738 82 2708 83 516 83 2546 85 228 90 ...
output:
08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e 13129243
Test #17:
score: 30
Accepted
time: 0ms = 0ms + 0ms
memory: 1932kb,1844kb
input:
3 7892141
output:
a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022 3 5000 1 2 1 3 1 4 1 5 1 6 5 7 1 8 5 9 9 10 10 11 5 12 12 13 9 14 11 15 1 16 13 17 5 18 6 19 19 20 3 21 16 22 21 23 5 24 6 25 13 26 6 27 10 28 14 29 9 30 20 31 9 32 5 33 1...
input:
a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022 3 5000 1 2 1 3 1 4 1 5 1 6 5 7 1 8 5 9 9 10 10 11 5 12 12 13 9 14 11 15 1 16 13 17 5 18 6 19 19 20 3 21 16 22 21 23 5 24 6 25 13 26 6 27 10 28 14 29 9 30 20 31 9 32 5 33 1...
output:
4 5000 2500 1 5 3 1318 5 7 5 9 5 12 5 18 5 24 5 33 5 35 5 72 5 82 5 102 5 137 5 249 5 424 5 1309 5 2449 5 4859 15 331 15 1888 16 22 22 78 29 395 30 208 31 2207 32 321 38 40 39 43 39 2133 41 852 43 96 45 4467 50 193 51 1384 51 4007 52 2268 54 1383 57 1272 62 471 70 4738 78 322 81 572 82 138 82 367 83...
input:
4 5000 2500 1 5 3 1318 5 7 5 9 5 12 5 18 5 24 5 33 5 35 5 72 5 82 5 102 5 137 5 249 5 424 5 1309 5 2449 5 4859 15 331 15 1888 16 22 22 78 29 395 30 208 31 2207 32 321 38 40 39 43 39 2133 41 852 43 96 45 4467 50 193 51 1384 51 4007 52 2268 54 1383 57 1272 62 471 70 4738 78 322 81 572 82 138 82 367 83...
output:
08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e 7892141
Test #18:
score: 30
Accepted
time: 0ms = 0ms + 0ms
memory: 1928kb,1844kb
input:
3 21314775
output:
a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022 3 5000 1 2 1 3 1 4 1 5 1 6 5 7 1 8 5 9 9 10 10 11 3 12 12 13 9 14 11 15 1 16 13 17 5 18 15 19 19 20 5 21 19 22 21 23 5 24 6 25 13 26 6 27 10 28 14 29 9 30 20 31 9 32 5 33 ...
input:
a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022 3 5000 1 2 1 3 1 4 1 5 1 6 5 7 1 8 5 9 9 10 10 11 3 12 12 13 9 14 11 15 1 16 13 17 5 18 15 19 19 20 5 21 19 22 21 23 5 24 6 25 13 26 6 27 10 28 14 29 9 30 20 31 9 32 5 33 ...
output:
4 5000 2500 1 2 1 3 1 4 1 5 1 6 1 8 1 16 1 47 1 53 1 60 1 227 1 369 1 430 1 1644 1 2706 7 36 16 2005 17 464 17 719 22 78 25 416 25 1600 28 1420 29 395 29 4165 31 74 31 231 36 94 39 2133 46 1738 54 1259 55 130 58 756 62 2098 75 2882 82 2708 83 2546 85 3325 86 4043 91 975 94 3656 99 947 99 3519 111 37...
input:
4 5000 2500 1 2 1 3 1 4 1 5 1 6 1 8 1 16 1 47 1 53 1 60 1 227 1 369 1 430 1 1644 1 2706 7 36 16 2005 17 464 17 719 22 78 25 416 25 1600 28 1420 29 395 29 4165 31 74 31 231 36 94 39 2133 46 1738 54 1259 55 130 58 756 62 2098 75 2882 82 2708 83 2546 85 3325 86 4043 91 975 94 3656 99 947 99 3519 111 37...
output:
08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e 21314775
Test #19:
score: 30
Accepted
time: 0ms = 0ms + 0ms
memory: 1928kb,1848kb
input:
5 5559540
output:
a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022 5 5000 1 2 1 3 1 4 1 5 1 6 5 7 1 8 5 9 9 10 10 11 3 12 12 13 9 14 11 15 1 16 13 17 5 18 15 19 19 20 3 21 16 22 21 23 5 24 6 25 13 26 6 27 10 28 11 29 9 30 20 31 9 32 5 33 ...
input:
a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022 5 5000 1 2 1 3 1 4 1 5 1 6 5 7 1 8 5 9 9 10 10 11 3 12 12 13 9 14 11 15 1 16 13 17 5 18 15 19 19 20 3 21 16 22 21 23 5 24 6 25 13 26 6 27 10 28 11 29 9 30 20 31 9 32 5 33 ...
output:
6 5000 2519 1 3 2 247 2 736 2 1699 3 12 3 270 3 1318 4 75 4 155 4 636 5 7 5 9 5 18 5 24 5 33 5 35 5 82 5 102 5 137 5 249 5 424 5 1309 5 4859 6 25 6 27 6 136 6 233 6 409 6 1099 6 1186 6 1705 6 2305 8 80 10 11 10 28 10 41 10 61 10 143 10 347 10 843 10 3575 13 17 13 26 13 42 13 68 13 293 13 403 13 2197...
input:
6 5000 2519 1 3 2 247 2 736 2 1699 3 12 3 270 3 1318 4 75 4 155 4 636 5 7 5 9 5 18 5 24 5 33 5 35 5 82 5 102 5 137 5 249 5 424 5 1309 5 4859 6 25 6 27 6 136 6 233 6 409 6 1099 6 1186 6 1705 6 2305 8 80 10 11 10 28 10 41 10 61 10 143 10 347 10 843 10 3575 13 17 13 26 13 42 13 68 13 293 13 403 13 2197...
output:
08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e 5559540
Test #20:
score: 30
Accepted
time: 0ms = 0ms + 0ms
memory: 1932kb,1844kb
input:
5 9424319
output:
a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022 5 5000 1 2 1 3 1 4 1 5 1 6 5 7 1 8 5 9 9 10 10 11 5 12 12 13 9 14 11 15 1 16 16 17 5 18 15 19 19 20 3 21 16 22 21 23 5 24 6 25 13 26 6 27 10 28 14 29 9 30 20 31 9 32 5 33 ...
input:
a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022 5 5000 1 2 1 3 1 4 1 5 1 6 5 7 1 8 5 9 9 10 10 11 5 12 12 13 9 14 11 15 1 16 16 17 5 18 15 19 19 20 3 21 16 22 21 23 5 24 6 25 13 26 6 27 10 28 14 29 9 30 20 31 9 32 5 33 ...
output:
6 5000 2510 1 6 2 364 2 375 2 736 3 21 3 3624 4 75 4 155 4 636 4 1351 5 7 5 9 5 12 5 18 5 24 5 33 5 72 5 82 5 102 5 137 5 249 5 424 5 1309 5 2449 5 4859 6 25 6 136 6 233 6 409 6 1099 6 1186 6 1705 6 2305 8 824 10 11 10 28 10 41 10 61 10 143 10 347 10 843 10 3575 13 26 13 42 13 48 13 68 13 260 13 403...
input:
6 5000 2510 1 6 2 364 2 375 2 736 3 21 3 3624 4 75 4 155 4 636 4 1351 5 7 5 9 5 12 5 18 5 24 5 33 5 72 5 82 5 102 5 137 5 249 5 424 5 1309 5 2449 5 4859 6 25 6 136 6 233 6 409 6 1099 6 1186 6 1705 6 2305 8 824 10 11 10 28 10 41 10 61 10 143 10 347 10 843 10 3575 13 26 13 42 13 48 13 68 13 260 13 403...
output:
08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e 9424319
Test #21:
score: 30
Accepted
time: 0ms = 0ms + 0ms
memory: 1936kb,1848kb
input:
5 10955780
output:
a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022 5 5000 1 2 1 3 1 4 1 5 1 6 5 7 1 8 5 9 9 10 10 11 5 12 12 13 9 14 11 15 1 16 16 17 5 18 6 19 19 20 5 21 19 22 21 23 5 24 6 25 13 26 6 27 10 28 11 29 9 30 20 31 9 32 5 33 1...
input:
a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022 5 5000 1 2 1 3 1 4 1 5 1 6 5 7 1 8 5 9 9 10 10 11 5 12 12 13 9 14 11 15 1 16 16 17 5 18 6 19 19 20 5 21 19 22 21 23 5 24 6 25 13 26 6 27 10 28 11 29 9 30 20 31 9 32 5 33 1...
output:
6 5000 2511 1 2 3 3624 4 75 4 155 4 1351 4 1705 5 7 5 9 5 12 5 18 5 21 5 24 5 33 5 35 5 72 5 82 5 102 5 137 5 249 5 424 5 1309 5 2449 5 2863 5 4859 6 19 6 25 6 27 6 136 6 150 6 152 6 233 6 409 6 1099 6 1186 6 2305 8 824 10 11 10 28 10 41 10 61 10 143 10 347 10 843 10 897 10 1080 10 3575 13 26 13 42 ...
input:
6 5000 2511 1 2 3 3624 4 75 4 155 4 1351 4 1705 5 7 5 9 5 12 5 18 5 21 5 24 5 33 5 35 5 72 5 82 5 102 5 137 5 249 5 424 5 1309 5 2449 5 2863 5 4859 6 19 6 25 6 27 6 136 6 150 6 152 6 233 6 409 6 1099 6 1186 6 2305 8 824 10 11 10 28 10 41 10 61 10 143 10 347 10 843 10 897 10 1080 10 3575 13 26 13 42 ...
output:
08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e 10955780
Test #22:
score: 30
Accepted
time: 0ms = 0ms + 0ms
memory: 1932kb,1848kb
input:
7 19938721
output:
a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022 7 5000 1 2 1 3 1 4 1 5 1 6 5 7 1 8 5 9 9 10 10 11 5 12 12 13 9 14 11 15 1 16 13 17 5 18 6 19 19 20 3 21 16 22 21 23 5 24 6 25 13 26 6 27 10 28 14 29 9 30 20 31 9 32 5 33 1...
input:
a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022 7 5000 1 2 1 3 1 4 1 5 1 6 5 7 1 8 5 9 9 10 10 11 5 12 12 13 9 14 11 15 1 16 13 17 5 18 6 19 19 20 3 21 16 22 21 23 5 24 6 25 13 26 6 27 10 28 14 29 9 30 20 31 9 32 5 33 1...
output:
8 5000 2500 3 270 14 29 14 150 15 1888 15 3999 17 464 17 719 25 416 25 1600 29 395 30 208 31 74 36 230 36 2657 36 3701 38 40 44 553 44 1131 45 4467 51 4007 56 209 56 1168 56 1463 56 3122 57 1272 66 1968 68 4049 69 99 69 2761 82 138 82 367 83 2546 84 1526 85 3325 86 4043 87 92 87 1084 89 1492 90 177 ...
input:
8 5000 2500 3 270 14 29 14 150 15 1888 15 3999 17 464 17 719 25 416 25 1600 29 395 30 208 31 74 36 230 36 2657 36 3701 38 40 44 553 44 1131 45 4467 51 4007 56 209 56 1168 56 1463 56 3122 57 1272 66 1968 68 4049 69 99 69 2761 82 138 82 367 83 2546 84 1526 85 3325 86 4043 87 92 87 1084 89 1492 90 177 ...
output:
08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e 19938721
Test #23:
score: 30
Accepted
time: 0ms = 0ms + 0ms
memory: 1932kb,1848kb
input:
7 5129508
output:
a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022 7 5000 1 2 1 3 1 4 1 5 1 6 5 7 1 8 5 9 9 10 10 11 5 12 12 13 9 14 11 15 1 16 16 17 5 18 6 19 19 20 3 21 16 22 21 23 5 24 6 25 13 26 6 27 10 28 11 29 9 30 20 31 9 32 5 33 1...
input:
a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022 7 5000 1 2 1 3 1 4 1 5 1 6 5 7 1 8 5 9 9 10 10 11 5 12 12 13 9 14 11 15 1 16 16 17 5 18 6 19 19 20 3 21 16 22 21 23 5 24 6 25 13 26 6 27 10 28 11 29 9 30 20 31 9 32 5 33 1...
output:
8 5000 2500 3 1318 3 3624 4 155 4 636 4 1351 15 331 15 3999 16 22 16 974 16 2005 17 3631 18 227 30 208 31 4771 32 321 39 2133 42 317 42 1846 44 4325 44 4744 57 1272 59 1656 59 3925 59 4734 68 312 69 86 70 4738 74 1084 75 2882 78 322 79 988 79 2218 80 1052 81 4299 82 138 83 516 84 3441 90 931 96 284 ...
input:
8 5000 2500 3 1318 3 3624 4 155 4 636 4 1351 15 331 15 3999 16 22 16 974 16 2005 17 3631 18 227 30 208 31 4771 32 321 39 2133 42 317 42 1846 44 4325 44 4744 57 1272 59 1656 59 3925 59 4734 68 312 69 86 70 4738 74 1084 75 2882 78 322 79 988 79 2218 80 1052 81 4299 82 138 83 516 84 3441 90 931 96 284 ...
output:
08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e 5129508
Test #24:
score: 30
Accepted
time: 0ms = 0ms + 0ms
memory: 1932kb,1844kb
input:
7 15332941
output:
a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022 7 5000 1 2 1 3 1 4 1 5 1 6 5 7 1 8 5 9 9 10 10 11 3 12 12 13 9 14 11 15 1 16 13 17 5 18 6 19 19 20 5 21 19 22 21 23 5 24 6 25 13 26 6 27 10 28 14 29 9 30 20 31 9 32 5 33 1...
input:
a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022 7 5000 1 2 1 3 1 4 1 5 1 6 5 7 1 8 5 9 9 10 10 11 3 12 12 13 9 14 11 15 1 16 13 17 5 18 6 19 19 20 5 21 19 22 21 23 5 24 6 25 13 26 6 27 10 28 14 29 9 30 20 31 9 32 5 33 1...
output:
8 5000 2500 2 364 3 270 3 1318 4 155 4 636 11 291 22 55 22 78 31 2207 36 230 36 2657 38 3268 39 2133 44 1131 46 1738 50 193 56 3122 62 471 68 312 68 4049 70 4738 74 1084 74 2580 74 3286 78 2113 79 988 83 516 83 2546 84 1526 84 2091 84 3441 85 228 85 3325 86 4043 91 975 93 1193 96 284 98 118 99 3519 ...
input:
8 5000 2500 2 364 3 270 3 1318 4 155 4 636 11 291 22 55 22 78 31 2207 36 230 36 2657 38 3268 39 2133 44 1131 46 1738 50 193 56 3122 62 471 68 312 68 4049 70 4738 74 1084 74 2580 74 3286 78 2113 79 988 83 516 83 2546 84 1526 84 2091 84 3441 85 228 85 3325 86 4043 91 975 93 1193 96 284 98 118 99 3519 ...
output:
08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e 15332941
Subtask #3:
score: 0
Wrong Answer
Test #25:
score: 0
Wrong Answer
time: 0ms = 0ms + 0ms
memory: 1932kb,1848kb
input:
1 355365355024496523
output:
a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022 1 5000 1 2 2 3 2 4 3 5 4 6 3 7 3 8 8 9 7 10 10 11 5 12 3 13 9 14 11 15 2 16 16 17 8 18 6 19 19 20 5 21 19 22 21 23 5 24 6 25 16 26 4 27 8 28 14 29 14 30 28 31 9 32 5 33 19...
input:
a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022 1 5000 1 2 2 3 2 4 3 5 4 6 3 7 3 8 8 9 7 10 10 11 5 12 3 13 9 14 11 15 2 16 16 17 8 18 6 19 19 20 5 21 19 22 21 23 5 24 6 25 16 26 4 27 8 28 14 29 14 30 28 31 9 32 5 33 19...
output:
2 5000 2699 1 369 1 2706 2 3 2 66 2 219 2 247 2 364 2 375 2 526 2 1291 3 8 3 13 3 164 3 270 3 412 3 3624 3 3802 5 33 5 72 5 102 5 137 6 25 6 136 6 152 6 233 7 10 7 35 7 212 8 9 8 28 8 61 8 3246 9 54 9 263 9 1404 9 4727 10 41 10 347 10 1080 11 15 11 328 12 246 12 801 12 4590 14 29 14 30 14 510 14 478...
input:
2 5000 2699 1 369 1 2706 2 3 2 66 2 219 2 247 2 364 2 375 2 526 2 1291 3 8 3 13 3 164 3 270 3 412 3 3624 3 3802 5 33 5 72 5 102 5 137 6 25 6 136 6 152 6 233 7 10 7 35 7 212 8 9 8 28 8 61 8 3246 9 54 9 263 9 1404 9 4727 10 41 10 347 10 1080 11 15 11 328 12 246 12 801 12 4590 14 29 14 30 14 510 14 478...
output:
08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e 1476376555