QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#424080 | #8360. distance | Clonoth | 100 ✓ | 69ms | 5828kb | C++20 | 2.1kb | 2024-05-28 21:37:43 | 2024-05-28 21:37:44 |
Judging History
answer
#include<stdio.h>
#include<bits/stdc++.h>
#define fir first
#define sec second
#define all(x) begin(x),end(x)
using namespace std;
typedef long long ll;
typedef unsigned uint;
typedef unsigned long long ull;
typedef double db;
typedef long double ldb;
typedef __int128 int128;
typedef __uint128_t uint128;
typedef pair<int,int> pii;
template<typename type>
inline void chmin(type &x,const type &y)
{
if(y<x)
x=y;
}
template<typename type>
inline void chmax(type &x,const type &y)
{
if(x<y)
x=y;
}
constexpr int Max=510;
constexpr ll inf=1e18;
ll lx[Max],ly[Max],slack[Max];
int px[Max],py[Max];
int pre[Max];
bool visx[Max],visy[Max];
ll e[Max][Max];
int n,m;
queue<int>q;
bool check(int v)
{
visy[v]=true;
if(py[v])
{
q.push(py[v]);
visx[py[v]]=true;
return false;
}
while(v)
{
py[v]=pre[v];
swap(v,px[pre[v]]);
}
return true;
}
void bfs(int o)
{
while(!q.empty())
q.pop();
q.push(o);
visx[o]=true;
while(true)
{
while(!q.empty())
{
int u=q.front();
q.pop();
for(int v=1;v<=n;++v)
if(!visy[v])
{
ll delta=lx[u]+ly[v]-e[u][v];
if(slack[v]>=delta)
{
pre[v]=u;
if(delta)
slack[v]=delta;
else
if(check(v))
return;
}
}
}
ll a=inf;
for(int i=1;i<=n;++i)
if(!visy[i])
chmin(a,slack[i]);
for(int i=1;i<=n;++i)
{
if(visx[i])
lx[i]-=a;
if(visy[i])
ly[i]+=a;
else
slack[i]-=a;
}
for(int i=1;i<=n;++i)
if(!visy[i]&&!slack[i]&&check(i))
return;
}
}
ll a[Max],b[Max],c[Max],d[Max];
signed main()
{
ios::sync_with_stdio(false);
cin.tie(nullptr),cout.tie(nullptr);
cin>>n;
for(int i=1;i<=n;++i)
cin>>a[i]>>b[i];
for(int i=1;i<=n;++i)
cin>>c[i]>>d[i];
for(int i=1;i<=n;++i)
for(int j=1;j<=n;++j)
e[i][j]=a[i]*c[j]+b[i]*d[j];
for(int i=1;i<=n;++i)
{
lx[i]=-inf;
for(int j=1;j<=n;++j)
chmax(lx[i],e[i][j]);
}
for(int o=1;o<=n;++o)
{
for(int i=1;i<=n;++i)
slack[i]=inf,visx[i]=visy[i]=false;
bfs(o);
}
cout<<"Yes\n";
for(int i=1;i<=n;++i)
cout<<px[i]<<" \n"[i==n];
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Subtask #1:
score: 20
Accepted
Test #1:
score: 20
Accepted
time: 1ms
memory: 3948kb
input:
10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
output:
Yes 1 2 3 4 5 6 7 8 9 10
result:
ok stO djq_cpp Orz
Test #2:
score: 20
Accepted
time: 1ms
memory: 3720kb
input:
10 427 -110 -151 65 -44 -11 -211 -489 -291 404 -287 511 -423 -404 240 30 110 -334 431 217 -45 -80 -355 -218 -339 430 -277 -279 501 -7 -250 -225 509 -380 279 290 -1 -340 203 432
output:
Yes 7 6 1 4 3 10 2 5 9 8
result:
ok stO djq_cpp Orz
Test #3:
score: 20
Accepted
time: 0ms
memory: 3660kb
input:
10 700 -65 -356 -402 948 555 301 -304 380 -821 -522 438 687 -7 557 973 784 -240 -658 564 -249 -764 331 90 -84 -551 -889 -436 63 664 182 819 -54 865 225 176 -604 513 409 -646
output:
Yes 2 4 5 3 1 7 8 6 10 9
result:
ok stO djq_cpp Orz
Test #4:
score: 20
Accepted
time: 1ms
memory: 3652kb
input:
10 1005 -881 63 299 -324 1120 1288 2004 -19 1586 -1209 1966 1133 1481 -842 -71 1593 -1225 -741 928 244 209 623 -363 -485 -1626 -1834 -1483 1222 -163 -1056 1473 661 278 -486 -1677 1431 692 427 -1139
output:
Yes 8 2 1 9 7 6 5 3 10 4
result:
ok stO djq_cpp Orz
Test #5:
score: 20
Accepted
time: 1ms
memory: 3644kb
input:
10 -494 -2816 -64 4032 1006 -1146 2882 756 -1256 -3557 -1174 1195 2307 -1079 3970 3361 2322 -2937 -3504 238 -2276 1926 -1610 -4069 1780 -615 3287 1746 -3063 -3267 -2561 2490 -16 -2822 -557 -2393 1091 -727 814 177
output:
Yes 8 6 9 10 2 1 3 4 7 5
result:
ok stO djq_cpp Orz
Test #6:
score: 20
Accepted
time: 0ms
memory: 3660kb
input:
10 7786 7964 3410 1245 -7041 591 6782 320 -3502 1950 8035 6672 -7217 -4338 -5057 -4702 -8059 708 6852 7699 2226 3753 -5652 1841 7965 5958 872 1785 -7253 5047 -4515 3015 -7594 -7531 7771 5995 3880 584 8052 -7206
output:
Yes 8 9 6 10 4 3 7 2 5 1
result:
ok stO djq_cpp Orz
Test #7:
score: 20
Accepted
time: 0ms
memory: 3704kb
input:
10 -9892 2453 9936 7734 -5703 5907 -4697 -6578 3481 6237 -2560 -6480 -3687 -9536 2422 8198 -6225 4572 -5512 9114 8240 2538 4471 -3694 8326 -9697 -9412 197 54 648 4172 4796 -3700 6089 -2092 969 5494 -2757 6776 7083
output:
Yes 4 1 5 2 6 9 3 10 8 7
result:
ok stO djq_cpp Orz
Test #8:
score: 20
Accepted
time: 0ms
memory: 3724kb
input:
10 -1 1 -1 1 -1 1 0 -1 1 -1 0 1 1 -1 1 1 1 -1 0 -1 0 -1 1 0 -1 -1 1 1 1 -1 0 1 1 1 -1 0 -1 -1 1 0
output:
Yes 6 3 8 1 2 4 5 7 10 9
result:
ok stO djq_cpp Orz
Test #9:
score: 20
Accepted
time: 1ms
memory: 3708kb
input:
10 2 -1 -3 1 1 1 0 -2 0 -2 0 -1 0 2 0 1 -1 1 1 -2 1 -3 -2 -2 -2 0 1 2 0 -3 -1 0 0 -2 -3 -3 -1 2 1 2
output:
Yes 1 3 4 8 7 2 10 6 9 5
result:
ok stO djq_cpp Orz
Test #10:
score: 20
Accepted
time: 1ms
memory: 3648kb
input:
10 7 -6 0 3 -3 6 6 -1 -5 5 -2 5 -3 -4 -3 1 -2 4 -1 -1 4 -4 0 5 -3 -7 0 3 -2 0 -7 1 7 -3 -4 7 -5 6 2 -1
output:
Yes 1 4 8 7 6 9 3 5 2 10
result:
ok stO djq_cpp Orz
Test #11:
score: 20
Accepted
time: 1ms
memory: 3912kb
input:
10 13 -9 2 15 6 10 10 3 7 -11 5 -13 8 15 -7 -5 2 3 -3 -6 -15 -6 -9 -2 5 9 4 13 -12 -11 -2 -3 5 -3 -9 12 13 -14 -10 11
output:
Yes 9 8 3 7 6 5 4 1 10 2
result:
ok stO djq_cpp Orz
Test #12:
score: 20
Accepted
time: 0ms
memory: 3708kb
input:
10 -13 0 -23 22 -5 -17 24 4 -31 26 -16 -22 12 1 -20 -24 -5 -4 -19 -5 15 7 -5 15 22 -8 28 11 10 -2 -12 -2 11 9 -23 3 -4 0 11 16
output:
Yes 10 2 3 4 8 5 1 6 7 9
result:
ok stO djq_cpp Orz
Test #13:
score: 20
Accepted
time: 1ms
memory: 3684kb
input:
10 -19 -53 -18 15 35 -2 63 -44 53 59 -21 -58 51 -52 38 -36 -59 -38 29 -18 32 28 -50 -60 41 -40 25 -12 48 -53 29 56 39 5 -16 -42 53 39 -34 -40
output:
Yes 8 6 1 3 9 10 5 4 2 7
result:
ok stO djq_cpp Orz
Test #14:
score: 20
Accepted
time: 0ms
memory: 3680kb
input:
10 29 81 -78 -109 88 64 91 -59 -25 6 -110 -53 -125 49 7 49 -34 83 -30 44 -16 103 -78 102 77 -115 74 -11 84 -31 33 -63 -25 29 -3 81 -33 -4 -20 120
output:
Yes 1 6 5 3 7 9 2 4 10 8
result:
ok stO djq_cpp Orz
Test #15:
score: 20
Accepted
time: 1ms
memory: 3652kb
input:
10 28 -233 -227 31 6 113 179 -53 -108 -29 153 -225 217 -36 -60 169 54 -118 201 -211 -51 231 -24 29 81 -125 155 99 72 -45 193 90 49 -200 228 89 227 -47 -45 82
output:
Yes 7 10 4 6 2 3 8 1 5 9
result:
ok stO djq_cpp Orz
Subtask #2:
score: 10
Accepted
Test #16:
score: 10
Accepted
time: 1ms
memory: 3980kb
input:
19 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
output:
Yes 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
result:
ok stO djq_cpp Orz
Test #17:
score: 10
Accepted
time: 0ms
memory: 3988kb
input:
20 272 165 394 -22 -285 305 -265 -168 282 -364 144 508 489 485 -13 113 138 497 -154 -17 214 -341 -159 352 31 -92 137 11 176 -249 370 -169 375 183 -100 -63 51 22 -75 -487 -102 364 -6 106 -359 -218 -153 498 -141 5 -164 -393 168 -72 -104 -280 -262 -25 263 377 -242 -304 499 -403 -297 394 -12 204 253 -19...
output:
Yes 20 17 16 3 12 4 10 14 1 9 6 13 5 7 8 15 19 11 2 18
result:
ok stO djq_cpp Orz
Test #18:
score: 10
Accepted
time: 1ms
memory: 3692kb
input:
19 560 -576 885 941 -40 124 -824 -404 -1 873 -607 1 -506 622 -316 729 -524 -831 277 -661 411 933 728 136 540 76 -338 -678 -25 109 436 299 -874 -996 251 -950 514 -214 -900 -867 -4 430 -443 -396 693 599 744 -911 626 903 291 7 -72 915 609 -61 956 -133 -617 -660 812 -626 -910 -516 757 -917 922 -99 -68 2...
output:
Yes 17 4 7 13 8 16 18 2 11 5 6 10 15 3 19 9 1 14 12
result:
ok stO djq_cpp Orz
Test #19:
score: 10
Accepted
time: 1ms
memory: 3688kb
input:
20 -579 -170 112 1013 107 1275 118 118 -749 -455 -688 394 -1748 1700 1535 1406 -211 -1484 63 -805 -745 -658 -1667 -823 1415 -123 -1930 -48 1884 1500 1457 299 831 1344 -1938 -680 1485 -630 -424 1030 -787 997 -997 474 -18 1920 -1519 -574 -1268 630 -1113 2022 15 744 -1132 790 -437 968 -1072 1676 -1973 ...
output:
Yes 8 1 10 9 5 13 6 3 15 18 2 4 12 16 17 20 7 11 14 19
result:
ok stO djq_cpp Orz
Test #20:
score: 10
Accepted
time: 1ms
memory: 3748kb
input:
20 3514 -1521 1871 -2438 -2995 1292 3700 1302 2953 1495 613 2998 -3358 969 -3035 -2946 -939 2284 -1931 1513 -3127 -1409 -3085 1916 2256 -1484 2592 3090 -2126 687 2251 -479 -3919 391 2699 -42 2226 -1172 -3703 -3453 756 -593 -2743 -2326 -3631 1139 929 121 -1970 -2002 3475 -1786 856 -3298 3314 -564 103...
output:
Yes 6 7 3 20 12 14 5 2 4 15 16 11 9 13 19 1 18 8 10 17
result:
ok stO djq_cpp Orz
Test #21:
score: 10
Accepted
time: 1ms
memory: 3984kb
input:
19 -3871 4141 -5941 -5135 4208 -5873 -100 -57 -5944 6092 2122 -3366 5690 7029 7613 -247 -926 -2286 -7246 -4945 -804 -5971 -6517 4378 7080 2726 5483 -2817 -644 8028 1713 8062 5902 -4696 -3988 -6259 6823 -1219 -2812 -5201 3259 2547 -3154 -5434 6674 5903 7234 -3004 2828 2866 -7562 -4912 -3608 -3106 320...
output:
Yes 14 3 10 16 18 17 4 2 8 7 1 15 6 5 9 11 19 13 12
result:
ok stO djq_cpp Orz
Test #22:
score: 10
Accepted
time: 1ms
memory: 3692kb
input:
20 9642 6905 3882 -8182 -5398 -7111 5173 -5589 66 -2454 6836 8030 5391 -3812 -1161 -2298 3229 -7318 -4853 -44 -1017 -651 -8204 -1847 -1973 1959 -6931 9316 -2472 9884 1871 6115 -1456 -3038 9365 1784 -8007 3022 2249 2035 5439 -1472 5194 133 -6514 -8641 7529 5420 5473 2637 -3645 -4090 -4832 2897 7738 2...
output:
Yes 4 12 3 10 2 11 1 18 15 17 5 9 14 16 19 20 6 8 7 13
result:
ok stO djq_cpp Orz
Test #23:
score: 10
Accepted
time: 1ms
memory: 3952kb
input:
19 -1 -1 1 0 -1 0 0 1 -1 -1 1 1 -1 0 1 0 -1 1 1 -1 1 1 1 1 1 0 0 -1 0 0 -1 0 1 0 0 1 -1 1 0 0 -1 0 1 1 -1 0 -1 0 0 -1 0 -1 0 0 -1 0 0 0 0 0 1 -1 0 0 -1 1 1 0 0 -1 0 1 1 -1 -1 1
output:
Yes 16 1 4 11 5 17 9 12 19 18 3 15 6 7 8 2 10 13 14
result:
ok stO djq_cpp Orz
Test #24:
score: 10
Accepted
time: 1ms
memory: 3984kb
input:
19 1 -1 1 0 3 0 2 3 3 2 -3 -2 1 2 -1 3 -2 0 1 2 -2 0 3 -1 2 -1 3 -1 2 2 0 -1 3 2 -1 2 -3 2 -1 2 1 0 2 3 1 1 1 0 2 -2 -1 2 -1 -3 -1 3 1 -1 1 -1 0 1 -3 -1 -1 -1 -1 2 2 -3 -1 -1 -1 -3 -3 -2
output:
Yes 8 17 10 3 4 19 1 9 13 12 14 16 11 6 5 18 2 15 7
result:
ok stO djq_cpp Orz
Test #25:
score: 10
Accepted
time: 1ms
memory: 3724kb
input:
19 0 -5 -6 0 -4 -4 2 2 -4 -6 -4 -3 2 -6 5 -2 2 -3 5 0 1 4 -5 6 -2 -5 -7 -7 3 1 2 1 -7 -6 2 -4 6 -7 -7 -3 -1 -3 4 4 1 -1 5 7 -3 2 -1 7 1 -1 0 2 -7 -2 -4 7 6 4 5 7 4 -1 3 2 -1 6 -4 3 6 6 6 6
output:
Yes 8 16 6 5 2 17 4 12 3 18 7 11 9 1 19 13 10 15 14
result:
ok stO djq_cpp Orz
Test #26:
score: 10
Accepted
time: 1ms
memory: 3692kb
input:
19 -8 6 -2 11 9 -4 -2 -2 -10 -7 3 15 -11 8 2 8 -14 -14 6 -7 3 9 11 -6 9 -10 -5 13 8 7 1 -7 -15 9 7 14 9 -9 5 3 -2 -8 14 12 9 -8 -11 -1 7 15 -4 -11 -8 -4 0 0 9 12 3 -9 -6 13 -13 0 8 4 12 11 7 -5 -5 3 -14 3 -10 -14
output:
Yes 5 17 14 9 8 6 13 1 19 2 10 16 11 12 15 7 18 3 4
result:
ok stO djq_cpp Orz
Test #27:
score: 10
Accepted
time: 1ms
memory: 3684kb
input:
20 27 5 -26 -28 -3 18 28 27 -18 28 -1 8 13 12 -21 10 -14 23 -24 27 30 1 28 10 3 29 -12 -18 -24 -19 -4 7 -24 -5 14 14 -15 -12 -31 -11 28 -4 -20 -10 14 -8 -14 -2 17 -22 -10 -10 -29 -8 -6 29 19 2 -18 -20 -20 13 -3 -17 19 -9 -13 -8 19 16 28 -15 -21 -19 22 -11 23 -12 10 -23
output:
Yes 19 10 3 9 8 5 18 14 4 11 16 1 15 20 17 6 2 13 12 7
result:
ok stO djq_cpp Orz
Test #28:
score: 10
Accepted
time: 1ms
memory: 3696kb
input:
19 -9 -17 -45 -28 -39 -2 59 55 13 35 -42 -8 4 -39 41 24 -28 -39 20 -11 -30 49 27 -48 -3 -40 -39 -2 -1 -37 39 -63 -1 34 22 42 -16 -33 -39 -31 36 -42 -55 5 -18 1 -35 -26 23 10 40 49 4 -55 41 58 -32 28 -33 -18 -42 19 -61 35 45 16 42 30 21 -20 -12 21 -52 19 21 37
output:
Yes 4 3 10 9 19 18 8 15 1 14 13 16 5 12 6 2 17 7 11
result:
ok stO djq_cpp Orz
Test #29:
score: 10
Accepted
time: 0ms
memory: 3784kb
input:
20 47 124 -32 92 118 12 9 75 49 110 91 -3 20 111 -17 -43 53 -74 44 84 -28 45 38 33 -53 92 30 24 -92 101 -59 102 61 0 55 -105 90 -57 71 -72 -74 15 52 -117 -94 62 119 1 -57 -31 -79 -32 64 -15 88 116 10 -109 103 -49 83 110 -48 124 -25 27 77 -29 84 103 -92 -88 -7 72 25 -123 -99 125 -9 39
output:
Yes 8 12 4 20 11 14 17 16 9 15 6 13 1 5 19 3 7 18 10 2
result:
ok stO djq_cpp Orz
Test #30:
score: 10
Accepted
time: 1ms
memory: 3720kb
input:
20 149 184 -244 -119 -62 129 -99 158 -50 17 136 -128 205 178 -72 117 -132 -203 -136 24 3 53 -34 64 -239 -51 21 187 208 196 -122 -243 84 221 -16 23 66 50 -30 -247 72 57 -255 4 -250 -63 197 -198 69 -77 156 198 -99 -51 192 44 192 211 -129 55 -91 -9 160 88 -22 94 -189 -101 231 -87 153 -212 228 156 121 3...
output:
Yes 12 3 13 19 11 15 17 10 14 7 18 1 2 20 9 16 6 5 8 4
result:
ok stO djq_cpp Orz
Subtask #3:
score: 20
Accepted
Test #31:
score: 20
Accepted
time: 1ms
memory: 3876kb
input:
49 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0...
output:
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
result:
ok stO djq_cpp Orz
Test #32:
score: 20
Accepted
time: 0ms
memory: 3868kb
input:
48 401 -420 -435 503 414 162 34 -84 63 -408 -50 -237 -423 53 -299 164 -336 477 323 -411 -282 -356 444 96 95 -7 216 288 -52 -370 51 151 459 231 -281 37 -58 264 465 -272 -497 -51 -58 27 301 171 -482 -163 -82 123 226 210 -386 34 -54 -137 495 475 -125 506 128 71 293 -158 -62 -436 -356 393 -5 -237 125 -4...
output:
Yes 9 41 31 20 6 13 15 48 39 5 11 44 21 12 47 25 36 10 27 30 4 22 18 34 32 3 16 37 14 43 19 40 24 46 26 28 8 1 35 23 45 42 7 29 38 17 2 33
result:
ok stO djq_cpp Orz
Test #33:
score: 20
Accepted
time: 1ms
memory: 4028kb
input:
48 460 327 -659 -339 200 -222 908 -673 -513 -864 -51 -811 -612 634 -87 652 897 197 115 231 897 -435 -601 433 91 -427 -48 288 -823 -749 18 589 -129 -881 -324 -274 -324 -135 -76 -773 708 631 58 576 423 -823 -27 654 287 -6 -567 180 -225 332 -73 -579 -421 -835 -967 -933 884 4 177 -4 440 -238 157 307 709...
output:
Yes 18 20 11 22 28 17 42 12 23 35 8 29 26 2 15 40 41 4 13 6 1 37 39 7 3 44 45 16 5 38 34 47 25 46 32 36 9 48 33 31 21 10 43 27 14 30 19 24
result:
ok stO djq_cpp Orz
Test #34:
score: 20
Accepted
time: 1ms
memory: 3868kb
input:
49 175 1344 -1816 464 -1109 436 -855 268 -125 -1529 -486 -131 1859 961 1350 387 589 -82 169 -494 1836 -1302 195 -1487 2014 1219 -948 489 456 284 -1301 -1160 1405 -915 -1800 1942 -1033 541 1212 -154 -420 1733 -1849 -107 899 -1436 -1547 560 -1083 888 -284 486 -1046 -1011 272 872 871 -837 -254 -400 -51...
output:
Yes 43 20 25 10 46 37 41 9 16 19 11 28 5 34 40 49 27 36 42 3 21 6 22 8 23 17 12 48 13 32 45 2 24 33 15 4 39 26 29 14 31 30 7 47 1 35 18 44 38
result:
ok stO djq_cpp Orz
Test #35:
score: 20
Accepted
time: 1ms
memory: 4072kb
input:
50 1434 -496 1665 -1882 98 1185 -611 3812 922 3885 1130 2807 -466 -1159 2172 4016 2152 2359 -1139 1521 2731 296 -3804 2641 -570 1014 3413 3 2602 -727 -4033 2819 -765 -2720 -304 -2257 1257 745 -4050 3565 -2123 1345 -3490 -3973 -5 -1058 2723 3843 1939 -754 -2381 -2518 -1866 -1864 -2349 -96 -1952 -1800...
output:
Yes 15 36 29 34 18 17 8 40 3 7 31 16 22 47 38 43 10 35 6 44 32 39 14 12 24 48 20 21 11 41 25 26 45 30 37 19 50 49 27 28 2 4 42 33 5 46 1 9 23 13
result:
ok stO djq_cpp Orz
Test #36:
score: 20
Accepted
time: 0ms
memory: 3872kb
input:
50 3076 -4362 2277 -5858 -3631 5799 -5939 765 2601 508 -8073 -1608 -6043 4575 7783 1893 82 5969 -7653 -6618 3093 7328 5539 7339 3293 -6045 5804 261 -2146 -4538 -7199 -6964 6922 -1381 1368 682 -7478 2534 1687 -8048 3246 688 4782 6742 2518 -7368 -7948 3588 5634 -3977 7574 4853 -1765 6306 -1061 3813 13...
output:
Yes 8 31 2 45 12 50 44 23 14 17 32 19 10 6 13 35 25 3 29 47 43 11 26 22 30 1 40 37 15 39 48 9 42 21 34 27 41 20 16 33 36 46 49 5 28 24 18 7 38 4
result:
ok stO djq_cpp Orz
Test #37:
score: 20
Accepted
time: 1ms
memory: 3884kb
input:
50 3109 9629 -4029 -2194 -2660 -4442 8916 -4285 -6117 145 253 -8627 1496 -3212 4800 -8946 6549 -2819 -8417 -259 -5744 3732 509 2573 9301 1271 1676 -7753 5112 3119 -8963 7241 -5172 -4293 6017 -8151 3876 -374 7460 8919 -8133 -9951 2585 -6809 -6146 -6830 3317 -2207 8934 -3326 6152 -1964 -7220 8314 6418...
output:
Yes 11 44 47 26 28 25 50 9 20 18 49 36 45 48 38 37 3 33 32 10 13 39 29 27 8 12 46 16 35 43 23 15 41 30 14 31 4 19 17 7 6 40 22 24 34 42 21 1 5 2
result:
ok stO djq_cpp Orz
Test #38:
score: 20
Accepted
time: 1ms
memory: 3800kb
input:
49 0 0 0 1 0 1 0 -1 0 0 1 1 0 -1 0 0 -1 1 0 -1 -1 1 1 -1 0 0 1 1 -1 0 0 -1 0 -1 0 1 -1 0 1 1 0 -1 1 1 1 0 1 -1 -1 0 0 -1 0 0 0 -1 -1 0 -1 -1 -1 0 -1 0 1 -1 1 -1 -1 0 1 -1 -1 -1 0 0 0 1 1 0 0 0 1 1 -1 0 0 1 1 1 0 1 -1 1 0 -1 -1 0 -1 1 -1 -1 1 0 -1 0 -1 1 -1 -1 0 0 0 -1 0 0 -1 1 1 -1 1 -1 -1 -1 0 -1 1...
output:
Yes 31 5 10 2 22 19 6 40 26 39 28 11 7 24 33 37 14 42 18 25 34 47 3 12 20 38 9 35 21 45 44 4 49 48 32 8 13 23 36 16 27 17 41 1 15 29 30 43 46
result:
ok stO djq_cpp Orz
Test #39:
score: 20
Accepted
time: 1ms
memory: 3876kb
input:
50 3 2 -2 3 1 2 2 -1 2 -2 1 0 1 3 0 1 1 -1 -1 2 0 3 0 1 3 2 2 -3 -2 2 -1 1 0 3 3 2 -1 0 -1 1 0 0 1 -1 3 -3 0 3 2 0 -1 -1 -2 0 -2 3 0 3 -2 0 1 -2 -3 -3 0 -3 1 0 -3 0 1 3 2 -1 -2 3 -2 -2 3 -2 1 1 2 1 2 1 1 -3 -2 0 0 -2 -3 2 3 0 -1 -2 0 2 -3 -1 2 2 1 -3 -3 1 1 1 -3 0 0 -3 1 1 -2 -2 1 0 -2 1 -3 1 -1 0 -...
output:
Yes 20 49 5 43 25 29 2 39 41 48 8 22 27 7 12 6 16 40 23 13 9 50 3 18 10 19 26 17 32 38 15 44 24 47 1 42 37 46 28 30 21 45 34 14 33 31 4 36 35 11
result:
ok stO djq_cpp Orz
Test #40:
score: 20
Accepted
time: 1ms
memory: 3752kb
input:
49 -4 5 7 7 0 -5 3 -3 5 3 1 -4 -3 -3 -5 3 -4 0 2 3 0 -5 -7 -3 3 -6 2 -6 -3 -3 -7 5 0 2 -4 -7 3 1 2 1 0 2 3 7 2 -1 -1 -2 -4 -3 4 -3 4 -7 -4 -5 1 7 -1 -4 2 5 -5 2 7 6 -7 5 4 1 -1 -1 5 -3 -7 -4 0 7 -7 1 0 -1 2 6 0 4 2 -7 1 2 -5 0 -3 6 5 2 -6 3 5 -5 6 3 5 3 -4 -1 -7 6 6 4 -5 6 -4 5 3 -1 -4 -2 0 -5 -3 -7...
output:
Yes 8 6 11 21 2 17 10 29 43 34 42 25 23 1 30 5 40 12 45 9 31 44 39 35 13 15 36 16 27 18 32 4 19 48 38 41 33 37 20 28 26 3 47 14 46 49 7 24 22
result:
ok stO djq_cpp Orz
Test #41:
score: 20
Accepted
time: 1ms
memory: 3804kb
input:
49 13 -2 -13 1 6 11 -9 15 13 -12 13 7 4 3 -13 -7 -2 7 0 12 9 -6 1 8 14 5 10 6 1 13 1 1 11 15 2 -13 11 -8 7 -4 -1 -2 0 9 11 -11 -12 0 -2 -12 9 -14 1 -8 0 11 -9 -10 0 -14 8 -11 11 -3 3 -5 -10 8 7 0 -10 -5 2 15 7 -13 5 6 -2 0 12 11 9 -9 2 7 9 -3 -13 3 15 -5 -12 -4 -4 -13 9 -11 -13 2 4 -12 10 4 -2 -7 4 ...
output:
Yes 45 10 29 49 21 11 35 40 8 48 18 33 30 3 37 42 27 44 20 17 7 19 2 46 28 25 4 32 13 38 12 47 16 15 31 22 36 26 43 14 23 9 6 34 1 24 41 39 5
result:
ok stO djq_cpp Orz
Test #42:
score: 20
Accepted
time: 0ms
memory: 3804kb
input:
48 -27 25 24 4 22 13 19 -23 -4 0 -3 0 -5 -21 15 17 26 25 7 7 -17 2 11 2 -25 -9 -13 -8 -18 19 -22 29 17 6 7 15 13 14 -23 -7 11 -22 -22 -6 6 4 1 21 27 -13 15 25 -20 4 17 -31 4 14 -23 -18 -6 20 19 -17 -24 1 -8 -13 4 31 4 4 20 31 -10 -7 4 15 -3 -1 29 -15 -17 -3 27 14 28 31 20 14 -13 -21 -13 -12 -17 30 -...
output:
Yes 20 8 10 15 26 40 23 3 24 11 45 43 21 22 44 18 48 39 41 4 7 6 29 36 17 38 35 32 1 30 12 37 16 34 5 13 33 25 28 19 27 31 47 14 42 46 9 2
result:
ok stO djq_cpp Orz
Test #43:
score: 20
Accepted
time: 1ms
memory: 3808kb
input:
48 30 26 -40 16 -37 55 23 -22 53 29 -54 20 -62 29 -9 -38 -33 -25 -27 -12 39 -31 59 28 -62 -24 41 -25 62 31 59 -21 6 24 -3 17 -37 -37 -38 -56 -37 10 7 -28 -47 10 -13 -19 -8 11 -2 21 12 -3 -59 14 3 -14 30 22 -60 14 47 9 20 14 -31 17 43 -14 -46 51 24 -20 8 12 27 11 47 -15 -2 15 62 22 -11 16 31 22 -37 -...
output:
Yes 21 35 33 5 17 6 8 43 46 13 19 45 10 3 4 44 9 14 38 20 18 37 41 26 40 16 29 34 23 48 24 39 22 42 32 25 7 12 2 1 28 30 31 36 27 47 11 15
result:
ok stO djq_cpp Orz
Test #44:
score: 20
Accepted
time: 1ms
memory: 4112kb
input:
50 89 96 9 68 9 19 -6 -77 -47 -11 33 116 111 -12 82 -32 1 -62 -44 4 18 -55 114 60 -49 49 88 -77 -42 64 -93 -89 -48 127 -111 91 -57 86 46 17 1 -109 34 113 -72 112 103 -111 -29 -68 -12 83 -25 67 -48 118 -89 98 6 -114 105 -26 18 -51 117 42 -121 47 26 -2 55 53 70 -15 -56 -34 -21 106 111 78 -115 64 72 -7...
output:
Yes 43 22 25 33 50 3 41 1 15 11 40 17 20 7 44 4 46 35 48 19 31 24 42 12 5 49 32 18 13 29 9 2 26 23 38 45 10 36 28 16 6 37 34 39 27 8 47 21 30 14
result:
ok stO djq_cpp Orz
Test #45:
score: 20
Accepted
time: 1ms
memory: 3884kb
input:
50 -60 -252 89 79 63 -145 168 -247 -214 195 -42 175 -199 133 -192 -25 -125 -103 72 248 -122 -187 195 -39 197 -153 -200 -177 15 142 -48 -221 -128 -3 172 215 -247 -218 -74 133 11 125 197 207 -28 -243 42 183 -15 -120 246 119 86 -91 -56 -32 -244 88 -176 -99 246 -185 24 190 86 7 -91 114 172 106 36 189 -8...
output:
Yes 50 35 7 27 12 45 25 39 10 11 20 21 17 6 16 30 26 19 49 40 33 28 9 23 3 43 46 15 29 42 24 2 37 31 4 44 18 5 48 34 13 36 22 14 38 1 32 41 47 8
result:
ok stO djq_cpp Orz
Subtask #4:
score: 34
Accepted
Test #46:
score: 34
Accepted
time: 1ms
memory: 4200kb
input:
148 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...
output:
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 101 ...
result:
ok stO djq_cpp Orz
Test #47:
score: 34
Accepted
time: 0ms
memory: 4456kb
input:
147 -237 -4 159 371 459 371 -128 -341 202 -66 -397 -279 -55 -267 -404 31 -73 305 332 -49 296 61 122 288 387 -404 -511 -132 -396 22 286 -19 465 489 -222 59 325 181 -458 242 368 17 420 -337 160 238 -238 367 -58 439 -97 339 229 -288 -31 114 217 -106 238 252 -230 180 507 185 -155 -278 -183 103 -282 428 ...
output:
Yes 137 40 79 58 22 90 120 121 24 146 35 13 29 21 142 92 114 44 31 14 73 12 27 124 60 63 86 43 62 45 53 138 106 96 129 71 16 102 101 19 38 72 37 51 132 140 28 85 80 49 103 48 95 77 97 113 84 117 123 8 75 145 47 52 65 130 118 36 68 105 141 87 76 82 66 135 126 23 83 111 144 18 125 115 133 15 7 34 41 7...
result:
ok stO djq_cpp Orz
Test #48:
score: 34
Accepted
time: 0ms
memory: 4488kb
input:
145 -949 -243 -594 606 -635 200 400 -119 375 -943 -821 -487 83 973 -671 731 -377 -253 428 439 441 871 382 983 -285 -119 -242 652 -389 -901 -861 303 -583 -106 -750 585 21 243 -274 407 -650 -604 788 716 783 757 197 484 896 -995 -186 369 141 -156 -478 675 -772 940 315 -968 -585 443 731 556 -787 -933 39...
output:
Yes 57 95 18 39 131 1 74 124 127 92 37 11 116 103 19 25 89 99 84 143 58 68 93 129 21 10 123 3 31 26 72 100 98 63 102 88 17 104 81 119 44 40 108 12 27 114 14 52 33 145 16 142 56 90 61 4 107 46 49 97 141 62 78 7 117 137 83 80 86 91 29 34 144 136 2 32 94 76 59 47 138 9 48 113 6 45 77 135 73 87 85 54 11...
result:
ok stO djq_cpp Orz
Test #49:
score: 34
Accepted
time: 3ms
memory: 4432kb
input:
149 967 -1348 -1610 -868 -175 -1877 1535 738 -1030 -2042 382 -219 -728 455 823 -186 932 -1231 -1387 -1137 1097 -1565 -215 81 -1528 -810 -1601 -174 -1565 1912 23 -1135 -2030 1394 -1469 -648 1360 -693 1136 987 950 1712 -1482 -1620 645 -1168 -1000 449 -1050 -1203 1027 732 20 -91 -1752 -376 955 1242 -19...
output:
Yes 31 112 115 11 3 74 64 130 35 57 91 20 110 51 75 26 33 92 146 141 113 140 88 121 111 120 106 69 46 72 137 149 126 28 17 116 122 19 9 129 101 66 32 1 90 131 52 104 60 78 82 118 96 12 147 144 79 6 119 117 25 133 44 56 50 23 136 36 97 139 109 29 134 63 98 67 68 58 99 76 84 2 124 143 18 37 93 81 21 2...
result:
ok stO djq_cpp Orz
Test #50:
score: 34
Accepted
time: 3ms
memory: 4460kb
input:
146 -629 2791 -3640 -4087 -3619 4007 2828 828 -1053 -748 -2918 -3944 -1107 -108 -1853 1066 2688 -1249 -1057 1501 -1486 2293 -602 -1757 1970 1195 -1478 -3026 -3474 3089 -3242 1141 784 697 -2528 -1275 -408 -372 1504 2626 1245 2699 1288 -3140 -794 -1216 -2826 -3143 378 63 2136 3114 3650 -2396 -1413 368...
output:
Yes 50 36 41 31 124 76 28 68 92 126 138 140 2 106 22 29 107 54 46 72 141 134 108 75 17 115 18 20 65 128 47 146 139 64 53 96 59 25 80 37 130 133 44 112 71 103 89 7 95 99 77 109 137 78 122 136 11 87 48 58 88 74 3 93 34 26 35 21 111 104 129 84 110 116 8 67 132 9 23 16 97 123 118 73 42 5 145 4 85 30 38 ...
result:
ok stO djq_cpp Orz
Test #51:
score: 34
Accepted
time: 3ms
memory: 4224kb
input:
144 1958 4736 648 6543 -6549 -3396 6730 -8111 832 1334 5915 2828 -3434 -7776 5937 -4671 -1762 4713 -6246 -1899 -3356 -3349 6238 2706 -2239 -4022 1377 4554 -7667 -5268 7410 -513 1735 -6514 2070 -3169 -5079 447 -1979 4358 -7011 259 696 -822 -7411 282 4094 6046 5772 4481 1834 -7732 -717 -3737 -3398 -11...
output:
Yes 140 49 41 20 94 108 104 80 130 87 29 112 88 45 33 84 83 113 136 1 90 75 132 38 138 79 19 114 5 142 3 91 111 73 59 99 72 22 105 110 7 12 107 117 61 4 134 141 42 82 96 30 119 109 124 54 92 85 48 57 133 97 9 25 127 32 36 64 2 13 8 6 55 50 15 93 35 116 17 144 63 69 120 46 40 31 118 76 78 18 81 23 13...
result:
ok stO djq_cpp Orz
Test #52:
score: 34
Accepted
time: 3ms
memory: 4192kb
input:
147 424 1560 -8525 882 -9049 4121 -4183 9147 4182 6002 2584 2721 320 -9098 416 8714 -5220 2965 -780 -8589 -4581 4260 -5630 3994 -8043 -8048 -2791 1770 2650 4309 -3058 -9904 3624 -4955 1912 278 4363 -9587 6472 -8191 -1525 9687 -7438 1731 -6785 -6718 3296 5653 -3997 -5727 1776 4308 -3594 5654 -6480 -1...
output:
Yes 58 96 39 129 21 90 4 97 133 111 49 35 57 18 127 105 26 24 110 100 72 88 42 6 74 139 8 67 107 101 51 34 104 98 86 117 94 141 53 78 130 64 14 30 134 82 56 113 116 91 114 99 124 41 122 76 65 36 77 28 109 55 137 73 146 47 20 32 93 5 89 1 120 123 87 66 135 68 54 48 121 131 119 71 44 79 84 63 126 143 ...
result:
ok stO djq_cpp Orz
Test #53:
score: 34
Accepted
time: 0ms
memory: 4276kb
input:
148 0 -1 1 0 0 0 1 1 -1 0 1 0 0 -1 0 -1 -1 -1 1 0 0 1 1 -1 -1 1 -1 -1 -1 -1 -1 0 0 -1 0 1 0 1 1 0 0 1 0 0 0 1 1 -1 -1 1 1 0 1 0 0 1 0 1 0 0 -1 0 1 -1 1 0 1 1 0 -1 -1 1 1 1 0 1 1 1 1 1 -1 1 -1 0 -1 0 0 0 1 0 0 1 1 1 -1 0 -1 -1 0 -1 -1 0 -1 1 -1 -1 -1 -1 0 0 0 -1 -1 0 1 -1 -1 -1 -1 0 1 0 0 0 1 1 -1 -1...
output:
Yes 131 141 98 8 146 6 3 5 16 75 124 29 20 17 28 12 7 109 22 18 24 11 31 33 41 35 135 42 49 121 19 51 45 72 25 54 88 57 89 90 59 26 27 21 53 65 94 30 32 143 34 74 40 43 23 44 37 60 50 52 58 36 102 55 69 63 46 105 70 84 108 47 56 68 48 80 61 113 82 62 145 85 116 93 64 66 67 71 86 95 73 99 9 87 110 10...
result:
ok stO djq_cpp Orz
Test #54:
score: 34
Accepted
time: 1ms
memory: 4256kb
input:
147 0 -1 0 -3 0 0 -3 1 -1 -2 0 3 0 3 2 -3 3 -3 -2 -1 1 -1 2 -3 1 2 3 2 1 -2 0 3 -2 -1 -3 2 -1 0 0 0 -2 0 -2 2 2 0 -3 -1 1 3 2 0 3 0 3 -3 -1 1 0 -2 1 3 2 -1 1 3 3 -1 -3 2 3 -1 -3 1 -2 1 0 -2 -2 1 0 2 -2 -2 -2 -3 -3 -2 -1 0 2 1 -3 1 0 2 3 2 -2 -1 -1 1 0 -3 3 0 -3 2 1 -1 1 -2 -3 3 -3 -1 1 1 0 1 -1 3 3 ...
output:
Yes 48 3 45 127 75 98 97 67 15 28 29 115 62 10 77 91 18 72 99 93 51 43 64 76 46 52 38 55 132 81 79 134 102 110 86 111 140 114 13 7 119 73 96 83 118 14 104 121 27 123 120 147 56 11 138 63 125 54 30 124 36 6 82 103 112 141 42 44 106 131 25 89 20 17 9 2 68 22 57 21 133 70 19 23 24 87 71 41 136 37 129 5...
result:
ok stO djq_cpp Orz
Test #55:
score: 34
Accepted
time: 3ms
memory: 4240kb
input:
144 -4 1 4 4 3 -2 1 -2 5 -4 7 3 -5 -5 3 0 6 -2 -4 4 4 4 -4 4 6 3 -3 -6 -3 -7 -4 -3 -5 0 -1 -7 3 -2 -6 0 1 3 4 6 5 0 -3 -3 -6 1 5 3 -5 -1 1 -3 5 -2 3 -5 1 5 -1 -1 7 1 -3 -4 4 -1 -3 -6 7 -4 2 -5 -6 -4 6 2 -3 -5 1 -3 -1 6 -7 7 -4 -6 2 -2 0 3 -3 7 3 1 -2 1 5 -4 5 3 4 2 3 6 -1 7 7 4 3 -7 7 3 7 3 7 2 2 6 ...
output:
Yes 31 125 18 53 111 72 104 97 1 93 59 56 107 27 132 61 144 131 126 49 41 23 140 63 43 3 19 105 13 127 106 78 64 60 75 141 36 42 138 114 136 89 101 92 109 71 68 142 57 83 5 73 55 96 82 51 46 120 17 16 134 4 50 26 65 76 25 11 33 30 69 38 130 58 28 12 54 40 8 81 10 98 137 52 129 90 118 37 44 143 67 70...
result:
ok stO djq_cpp Orz
Test #56:
score: 34
Accepted
time: 3ms
memory: 4208kb
input:
149 -15 4 -6 15 1 1 1 -14 5 -2 -9 13 -4 -11 -8 -1 6 -2 -2 -3 -7 14 -5 2 13 7 -9 6 15 13 -13 1 6 6 -2 -9 -1 10 0 1 11 15 14 9 -15 7 7 -13 -6 -12 7 -4 7 4 -9 -9 -15 14 -8 -14 -9 -10 15 8 7 -4 -10 -9 -10 4 11 6 10 -9 1 -10 -14 -10 15 1 -4 12 -2 -2 -10 -5 -5 -7 -1 -1 -1 1 6 -5 -9 -13 -9 -5 10 13 8 5 -3 ...
output:
Yes 3 24 105 93 48 53 11 40 73 100 110 148 117 115 65 137 138 10 121 34 144 33 76 122 104 62 56 16 6 113 131 30 43 2 57 39 51 124 140 118 146 108 92 60 42 78 135 130 25 147 142 27 38 81 74 66 63 45 72 15 71 47 102 106 82 19 50 96 26 32 132 68 70 4 23 77 123 64 87 28 69 12 90 107 91 119 120 18 139 85...
result:
ok stO djq_cpp Orz
Test #57:
score: 34
Accepted
time: 3ms
memory: 4248kb
input:
144 -8 16 26 6 20 30 -31 -19 12 2 -2 -8 -4 -28 0 -12 -29 -12 15 -22 7 -26 -10 20 -28 28 -4 -26 -9 -22 0 -17 -14 -20 -9 -25 21 14 28 1 -7 19 -13 16 -6 8 -26 -20 -11 -4 -27 6 -24 30 -10 22 29 18 20 31 24 -8 -10 8 9 -11 5 -5 -1 24 22 13 -10 29 -20 -27 18 29 16 14 -25 -9 29 -31 6 15 30 7 24 -25 -18 25 2...
output:
Yes 103 67 10 33 40 52 36 17 138 116 111 3 77 13 115 49 46 119 58 69 87 78 47 91 23 123 60 66 44 127 32 71 29 120 139 42 74 117 72 92 54 96 98 26 9 27 137 114 126 48 25 18 38 59 130 100 75 45 43 80 14 94 112 144 50 79 82 124 121 68 12 125 122 113 24 1 86 106 55 142 35 73 51 5 85 90 105 110 57 135 4 ...
result:
ok stO djq_cpp Orz
Test #58:
score: 34
Accepted
time: 0ms
memory: 4192kb
input:
143 16 -4 -12 25 -51 -5 7 57 -54 55 29 -31 -56 32 -23 -9 61 1 16 -44 57 -7 -17 60 -60 -34 -56 34 -23 1 -19 45 26 2 -16 -36 23 16 -13 19 59 14 -57 35 -48 -56 -35 -56 -24 50 -40 19 -1 -14 14 3 -33 -22 -5 -1 22 -7 21 -15 -47 63 -22 -25 16 59 -26 -51 54 21 57 32 -48 59 -29 -2 -41 -38 53 3 -46 -21 -37 11...
output:
Yes 132 11 41 67 72 58 81 20 43 49 57 100 84 124 87 8 6 64 128 70 21 59 94 9 18 65 38 15 24 106 91 60 86 4 125 138 35 74 14 13 68 54 120 126 45 129 22 133 121 88 140 23 102 116 12 71 131 31 92 103 61 79 107 139 97 26 3 7 40 1 5 73 16 113 47 17 114 93 137 110 52 29 95 51 82 109 80 104 10 105 33 108 1...
result:
ok stO djq_cpp Orz
Test #59:
score: 34
Accepted
time: 0ms
memory: 4192kb
input:
149 -60 -85 76 -88 -103 67 27 -33 -93 95 59 108 -45 120 94 -36 -67 -1 7 -19 103 -121 -20 -51 -89 107 8 -81 -126 -36 -16 82 40 -97 72 -41 -11 -49 -74 3 -111 42 -27 57 77 -74 2 -82 31 -71 -46 -127 84 -98 70 -13 -110 8 -119 -91 91 85 31 -112 -75 -109 -84 -109 -98 117 35 -115 -93 -126 86 -80 -99 88 57 4...
output:
Yes 134 130 71 21 53 144 26 64 118 110 41 119 54 5 76 140 17 59 47 149 105 98 97 3 42 78 4 129 30 135 55 107 28 7 91 39 67 121 101 11 46 96 89 48 69 24 66 65 23 139 131 112 49 43 27 133 93 68 124 125 56 61 32 44 52 19 132 12 145 94 13 138 127 58 95 99 18 51 16 45 79 2 77 109 33 73 120 72 40 143 6 74...
result:
ok stO djq_cpp Orz
Test #60:
score: 34
Accepted
time: 3ms
memory: 4424kb
input:
147 -232 -205 25 -99 -49 213 54 -42 231 -190 -224 -137 -241 195 -221 55 -247 -239 -215 -167 -113 -72 -179 145 -80 -111 1 -114 156 -31 197 -163 63 -86 237 -235 -104 164 126 -254 -228 102 -83 -108 72 161 -205 209 -5 -60 113 27 101 -124 -85 145 -152 -240 -173 234 182 252 177 -205 -136 197 199 77 35 60 ...
output:
Yes 11 141 135 137 68 83 144 4 91 129 55 41 9 50 64 59 98 110 89 8 104 24 76 65 12 42 34 106 35 78 37 97 13 133 23 114 119 39 51 27 105 56 146 136 93 122 128 70 109 143 21 63 131 48 134 99 115 87 88 73 60 103 28 19 108 15 79 145 20 54 126 85 49 67 31 47 52 44 140 86 75 116 17 38 95 81 36 147 96 127 ...
result:
ok stO djq_cpp Orz
Subtask #5:
score: 16
Accepted
Test #61:
score: 16
Accepted
time: 2ms
memory: 5568kb
input:
488 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...
output:
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 101 ...
result:
ok stO djq_cpp Orz
Test #62:
score: 16
Accepted
time: 62ms
memory: 5604kb
input:
490 147 123 -96 -66 -233 66 343 35 -230 501 -395 127 204 -378 -251 467 -275 -305 -80 132 -164 -377 355 224 469 -122 -201 405 -272 -511 -103 505 266 -153 209 -384 21 -186 278 401 -224 98 -342 -287 310 -297 -206 -291 115 -328 106 -488 505 281 58 46 134 317 -72 239 318 -392 21 -120 -372 10 79 272 -90 4...
output:
Yes 432 366 407 203 232 371 417 489 119 7 469 490 49 168 271 198 412 201 18 348 415 243 481 58 17 422 176 2 392 239 264 169 102 433 116 378 162 130 258 332 444 56 458 1 405 364 178 298 297 446 164 209 431 155 362 212 179 274 143 254 48 121 108 372 214 103 285 66 383 310 387 436 382 421 327 72 113 55...
result:
ok stO djq_cpp Orz
Test #63:
score: 16
Accepted
time: 60ms
memory: 5528kb
input:
482 406 304 596 -775 -37 -61 -919 544 -500 -760 281 299 -713 458 -456 -117 -62 52 -72 523 920 -892 -183 -977 -386 669 73 -135 -733 924 -139 800 -945 -626 -982 889 -812 178 928 -414 -112 -550 683 430 -303 -31 63 -163 -960 159 762 979 -686 -679 -433 36 64 712 418 828 930 320 129 -907 -164 552 591 -43 ...
output:
Yes 253 201 329 60 356 373 476 335 290 378 78 100 319 43 318 184 177 32 75 364 313 145 273 429 415 21 286 140 396 267 126 478 142 57 222 403 125 132 215 394 200 466 89 406 282 202 353 360 370 73 387 343 280 463 243 190 88 56 53 80 13 392 40 186 161 272 163 85 103 117 208 158 425 479 278 379 168 405 ...
result:
ok stO djq_cpp Orz
Test #64:
score: 16
Accepted
time: 62ms
memory: 5564kb
input:
489 1313 -1587 1929 -604 -1040 282 1404 -615 887 -210 -118 -1097 -351 -489 1530 -548 -502 -1117 1098 -321 -155 -1064 578 1956 1000 -1306 245 -46 -144 -1779 654 -540 853 354 321 -1833 311 -621 423 -1348 881 -1999 1014 1959 844 556 1830 1007 -976 708 -1133 -463 -1116 -968 1706 -657 -1306 193 -1968 -38...
output:
Yes 429 111 285 457 27 241 437 449 228 472 9 229 238 463 271 20 289 68 46 286 430 310 484 296 334 300 415 481 259 257 354 366 426 97 116 4 377 221 48 92 80 398 203 10 67 365 327 311 76 65 79 381 280 363 380 272 351 69 323 349 340 17 442 170 166 301 266 325 107 273 94 179 397 435 250 151 172 95 15 53...
result:
ok stO djq_cpp Orz
Test #65:
score: 16
Accepted
time: 66ms
memory: 5620kb
input:
494 -3987 2098 -516 732 -2324 2122 2725 -258 -391 724 2040 -488 -306 4022 -4062 -1583 -1058 -85 -2280 1107 3566 3216 845 -2036 1316 3578 2283 -71 -2660 -2784 -3446 2771 -2454 -3550 -2303 2212 3084 137 1301 3313 3554 -882 2099 -153 1117 -3559 1713 2504 -3153 2417 2153 3989 3505 1537 3131 3622 -2497 3...
output:
Yes 34 169 441 91 429 159 336 218 139 310 474 196 279 176 450 56 14 2 184 320 62 231 354 373 89 95 356 479 374 16 428 399 20 181 4 282 269 225 164 436 202 158 92 333 163 76 203 12 67 10 291 156 375 305 420 63 298 98 323 424 240 113 318 221 71 467 268 64 301 36 116 453 167 447 47 161 24 287 179 363 4...
result:
ok stO djq_cpp Orz
Test #66:
score: 16
Accepted
time: 69ms
memory: 5656kb
input:
495 2790 -4480 6448 1808 2610 4300 940 -2617 327 8072 -6317 -2577 -6203 -789 -7772 -5761 2240 -3937 -67 4159 2464 -476 4184 5906 6504 -3627 -2708 5721 -3441 -2726 6384 307 -5821 -1789 4849 -6565 -3798 4086 1372 4470 -7679 3989 -737 909 -5812 -6708 -1060 6381 3481 -7521 2714 3344 5720 1891 -7117 3602...
output:
Yes 392 330 469 287 321 4 322 129 265 450 368 300 145 220 113 86 468 266 222 201 157 331 68 393 302 419 190 51 40 391 312 61 63 66 285 109 412 315 50 191 385 449 16 324 110 422 33 262 371 395 5 333 29 194 231 184 95 192 382 162 105 243 120 146 421 432 80 89 417 455 168 119 227 326 413 304 200 273 17...
result:
ok stO djq_cpp Orz
Test #67:
score: 16
Accepted
time: 67ms
memory: 5632kb
input:
490 7956 -286 6549 7290 -7104 -2807 2754 -286 -3123 -985 5564 -3984 -624 2693 -7229 6974 -7698 4023 7882 5369 -2595 9065 1335 1320 492 -9400 -8503 -8002 -5792 -6347 -9492 7338 7325 -9375 -6111 4861 -5399 8963 1321 -7630 1748 4564 -8617 1924 6367 2581 -4635 -7367 8263 7072 -5589 9387 2169 -331 -3986 ...
output:
Yes 462 393 425 112 296 468 404 469 99 155 34 174 367 441 43 235 430 228 445 125 433 165 399 163 133 384 434 132 201 265 358 387 196 148 472 290 124 383 488 332 28 286 210 289 244 191 19 180 167 447 233 128 80 197 421 258 100 470 477 385 160 198 74 152 161 2 184 249 173 299 337 413 84 416 32 77 10 4...
result:
ok stO djq_cpp Orz
Test #68:
score: 16
Accepted
time: 3ms
memory: 5628kb
input:
478 0 0 0 -1 0 0 1 0 1 -1 0 0 -1 -1 -1 -1 1 0 1 1 -1 1 0 0 -1 -1 -1 1 -1 1 1 0 1 1 0 0 1 0 1 -1 0 1 -1 0 -1 1 1 1 1 0 1 0 -1 0 -1 1 1 -1 0 1 1 1 0 0 1 1 0 -1 1 0 1 1 0 0 0 1 -1 -1 1 -1 0 0 1 1 1 0 -1 -1 -1 1 1 0 0 1 -1 1 0 0 -1 -1 0 -1 1 0 0 0 -1 -1 -1 0 1 1 0 0 -1 0 0 -1 0 1 -1 -1 1 0 1 1 1 1 1 1 0...
output:
Yes 283 313 468 4 18 336 22 34 472 19 10 5 56 11 25 15 40 352 384 23 14 17 27 47 388 31 20 46 36 24 51 8 58 16 37 77 12 28 62 66 13 89 39 73 60 41 30 64 371 78 32 45 33 81 50 91 35 55 38 48 83 53 119 127 130 52 42 68 140 44 84 59 142 70 146 65 43 86 49 69 57 71 80 99 102 112 113 88 72 54 63 93 155 9...
result:
ok stO djq_cpp Orz
Test #69:
score: 16
Accepted
time: 9ms
memory: 5648kb
input:
484 -2 2 -3 2 -2 1 3 -3 -3 -2 1 0 -3 0 0 -3 1 3 -3 -2 -1 -1 -3 2 -2 0 0 -3 0 1 0 2 -2 3 0 1 3 0 0 2 0 1 -1 2 -2 -3 1 -2 3 -2 1 -2 2 1 -2 3 -3 0 2 3 1 -1 -3 -3 2 3 -1 3 2 -2 -1 2 3 1 -2 3 0 1 -3 -2 -2 1 -2 2 1 -3 2 1 0 -2 3 2 0 -3 -1 -1 -3 1 1 1 -3 -2 1 2 -1 -3 -3 1 3 1 1 2 0 1 -3 2 -1 2 2 -3 0 2 -3 ...
output:
Yes 23 344 387 7 194 37 43 440 272 428 311 264 402 412 452 107 351 392 368 150 261 95 340 366 354 399 46 138 164 255 190 455 403 246 438 444 144 161 38 96 380 67 154 457 208 329 418 294 177 238 247 413 135 188 300 432 314 411 321 446 318 191 119 458 442 276 414 253 249 197 66 1 53 183 430 211 473 10...
result:
ok stO djq_cpp Orz
Test #70:
score: 16
Accepted
time: 24ms
memory: 5680kb
input:
498 -6 5 4 4 -2 0 7 -1 1 1 6 -6 -1 -7 0 3 -7 1 1 2 -4 2 -2 6 0 3 -3 -3 -7 -7 7 -1 0 -6 5 -5 -1 -6 -5 -6 6 7 7 -7 -7 -4 -5 -4 2 -4 6 -4 3 -3 6 -7 3 -6 3 -1 6 -6 2 -3 -6 6 1 6 0 0 2 4 -2 -4 -1 6 5 -5 7 5 2 5 -2 3 -6 -4 1 3 -7 5 -5 6 0 -3 -3 -5 -5 5 5 -2 2 6 5 2 4 -5 -6 1 6 5 0 6 6 4 -5 0 -5 -2 -6 6 -3...
output:
Yes 427 443 468 166 73 213 145 127 38 125 463 383 309 458 96 157 168 78 487 248 454 398 230 126 286 297 479 94 142 465 374 143 367 216 433 341 247 477 420 54 35 485 36 362 294 481 267 410 478 265 214 358 228 64 208 482 240 264 187 261 103 249 191 246 322 492 97 14 348 285 311 65 222 178 389 353 283 ...
result:
ok stO djq_cpp Orz
Test #71:
score: 16
Accepted
time: 39ms
memory: 5556kb
input:
499 -5 -2 5 11 12 9 10 -5 11 -15 -10 -1 1 -8 2 -15 1 13 -12 6 4 10 7 1 -13 11 -14 -5 7 -9 -14 6 12 9 5 8 6 2 -5 -8 1 13 6 7 -2 -10 -11 -13 -14 -7 -15 -13 -7 -7 -10 -13 -3 -1 -9 10 5 8 15 7 11 -10 6 14 0 9 13 7 6 -10 8 4 2 1 -6 -8 -9 -8 -6 -1 13 -12 9 13 14 -11 4 12 10 8 10 -12 -9 -11 4 6 13 -6 -7 5 ...
output:
Yes 378 268 76 61 487 192 459 139 442 197 17 383 173 180 337 211 349 386 149 150 9 166 352 59 103 191 477 485 387 389 498 272 175 435 469 102 233 393 345 127 336 471 119 273 279 317 138 343 251 269 153 382 164 490 497 445 293 315 265 358 243 86 3 23 448 28 66 368 147 406 13 426 451 20 271 311 339 32...
result:
ok stO djq_cpp Orz
Test #72:
score: 16
Accepted
time: 47ms
memory: 5828kb
input:
481 -26 -28 -24 27 -12 -3 7 29 -1 -19 -20 9 0 26 -10 -8 -13 -13 23 -22 7 2 27 7 4 25 3 -12 0 22 -23 15 1 9 -28 -16 21 -3 17 -17 -3 18 -12 -19 13 4 27 -16 -26 -24 9 19 27 12 25 -23 -19 -24 6 21 -10 -29 -14 2 -22 -31 27 -24 14 -12 14 28 20 -20 -6 -10 -17 9 13 4 27 0 2 -7 -16 -8 4 -3 -1 -9 21 15 6 12 -...
output:
Yes 224 67 309 386 378 398 285 401 474 129 338 182 237 205 132 394 449 301 146 48 44 290 61 207 82 210 43 450 291 161 94 149 252 157 1 452 462 465 139 46 2 260 115 114 191 47 422 295 179 199 249 233 181 406 300 346 292 201 240 418 26 183 177 86 408 362 420 370 354 344 456 214 293 342 126 104 273 38 ...
result:
ok stO djq_cpp Orz
Test #73:
score: 16
Accepted
time: 59ms
memory: 5612kb
input:
492 7 -41 24 -45 -43 27 8 30 60 -43 -45 -38 -63 -52 13 -9 21 47 -33 -42 -38 35 -63 -59 -31 -16 30 -5 -25 -4 18 32 -19 11 18 26 -46 -16 28 50 16 -17 61 -48 18 -41 40 47 -3 61 27 33 -19 -4 -40 1 58 -40 -1 11 -6 63 1 -8 28 -56 -23 23 -29 44 15 -3 -49 -33 -18 34 -16 -51 -40 -12 -23 48 11 27 7 25 25 57 5...
output:
Yes 405 377 286 2 365 334 16 215 224 414 218 190 83 448 139 44 138 208 210 198 363 287 63 212 316 360 433 340 62 323 277 95 378 147 167 246 482 158 427 387 367 146 136 134 52 331 156 276 31 306 439 195 290 205 351 86 258 420 105 318 164 114 384 152 206 312 196 233 142 366 335 438 10 409 151 77 182 7...
result:
ok stO djq_cpp Orz
Test #74:
score: 16
Accepted
time: 65ms
memory: 5560kb
input:
499 -80 -71 -14 53 -54 49 -90 125 99 -47 -55 111 -1 40 10 100 -122 77 -56 78 -93 12 -55 59 -31 7 95 106 -58 -49 -25 -1 -99 -81 44 99 98 54 98 49 -120 -83 9 121 58 -71 -127 -93 -29 -18 -23 -127 -16 -82 55 -88 -1 123 12 13 -55 67 64 53 2 -13 103 61 51 58 -7 43 -27 -89 -69 51 103 0 82 -10 106 -100 16 -...
output:
Yes 184 163 219 481 96 321 116 63 334 383 159 417 344 75 103 214 392 138 284 122 226 129 217 46 243 39 485 407 52 338 395 35 293 455 490 126 4 47 11 38 228 168 396 281 457 366 282 343 427 253 352 149 438 307 363 377 310 182 365 218 34 95 174 432 315 209 151 409 263 425 301 194 215 346 195 125 422 13...
result:
ok stO djq_cpp Orz
Test #75:
score: 16
Accepted
time: 59ms
memory: 5804kb
input:
491 54 -142 90 108 98 -57 104 111 -231 -54 -212 -155 -219 -165 107 -233 -179 112 143 108 16 72 -204 -87 -44 -168 244 -197 -99 107 -150 -144 -85 -246 249 137 -23 134 -98 11 213 -248 190 -15 182 -49 107 -135 124 20 -199 -3 -111 -163 -19 54 20 -56 185 -164 -29 -21 -136 -82 192 108 -245 95 -115 16 241 -...
output:
Yes 408 256 301 427 469 253 107 167 399 56 20 82 355 101 415 303 436 193 97 459 267 266 114 203 317 61 433 67 50 434 269 359 249 376 22 315 345 63 71 191 374 377 59 183 454 48 455 296 365 309 344 229 157 392 141 213 338 25 242 209 406 104 53 34 423 15 10 431 197 293 372 66 282 108 151 85 477 55 19 1...
result:
ok stO djq_cpp Orz