QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#290131 | #6546. Greedy Bipartite Matching | Crysfly# | TL | 6521ms | 37744kb | C++14 | 3.1kb | 2023-12-24 14:05:16 | 2023-12-24 14:05:16 |
Judging History
answer
// what is matter? never mind.
#pragma GCC optimize("Ofast")
#pragma GCC optimize("unroll-loops")
//#pragma GCC target("sse,sse2,sse3,sse4,popcnt,abm,mmx,avx,avx2")
#include<bits/stdc++.h>
#define For(i,a,b) for(int i=(a);i<=(b);++i)
#define Rep(i,a,b) for(int i=(a);i>=(b);--i)
#define ll long long
#define ull unsigned long long
//#define int long long
using namespace std;
inline int read()
{
char c=getchar();int x=0;bool f=0;
for(;!isdigit(c);c=getchar())f^=!(c^45);
for(;isdigit(c);c=getchar())x=(x<<1)+(x<<3)+(c^48);
if(f)x=-x;return x;
}
#define fi first
#define se second
#define pb push_back
#define mkp make_pair
typedef pair<int,int>pii;
typedef vector<int>vi;
#define maxn 200005
#define inf 0x3f3f3f3f
int n,m,res[maxn];
bool del1[maxn],del[maxn];
int s,t;
namespace F{
int n,s,t,maxflow;
int dep[maxn],cur[maxn];
int tot=1,head[maxn];
bool no[maxn];
struct edge{
int to,nxt,w,pre;
}e[maxn*8];
void adde(int u,int v,int w){
e[++tot]=(edge){v,head[u],w,0};
e[head[u]].pre=tot;
head[u]=tot;
}
void add(int u,int v,int w){
adde(u,v,w);
adde(v,u,0);
}
void del(int u,int i){
if(no[i]) return;
no[i]=1;
e[i].w=e[i^1].w=0;
return;
if(i==head[u]) head[u]=e[i].nxt;
else {
int j=e[i].pre;
e[j].nxt=e[i].nxt,e[e[i].nxt].pre=j;
}
}
int q[maxn],hd,tl;
bool bfs(int s,int t,int ret=1)
{
For(i,0,n)cur[i]=head[i],dep[i]=inf;
dep[s]=0,q[hd=tl=1]=s;
while(hd<=tl)
{
int u=q[hd++];
for(int i=head[u];i;i=e[i].nxt)
{
int v=e[i].to;
if(dep[v]==inf&&e[i].w){
dep[v]=dep[u]+1;
if(v==t && ret)return 1;
q[++tl]=v;
}
}
}return dep[t]<inf;
}
int dfs(int u,int t,int minn)
{
if(!minn||u==t)return minn;
int res=0;
for(int i=cur[u];i;i=e[i].nxt)
{
int v=e[i].to;
cur[u]=i;
if(dep[v]!=dep[u]+1)continue;
int flow=dfs(v,t,min(minn,e[i].w));
if(!flow)continue;
res+=flow,minn-=flow;
e[i].w-=flow,e[i^1].w+=flow;
if(!minn)break;
}
if(!res) dep[u]=0;
return res;
}
inline int dinic(int s,int t)
{
int maxflow=0,flow=0;
while(bfs(s,t))while(flow=dfs(s,t,inf))maxflow+=flow;
return maxflow;
}
inline void init(int N,int S,int T){
n=N,s=S,t=T,tot=1,maxflow=0;
For(i,0,n)head[i]=0;
}
}
using F::add;
int qwq;
int solve(int O)
{
int res=F::dinic(s,t);
F::bfs(s,t,0);
For(i,n+1,n+n)
if(F::dep[i]<inf) del[i]=1;
For(i,1,n){
if(F::dep[i]<inf) ;
else {
del[i]=1;
for(int j=F::head[i];j;j=F::e[j].nxt)
if(F::e[j].to>n && F::e[j].to<=n+n && del[F::e[j].to]) F::del(i,j);
}
}
// For(i,1,n+m) if(del1[i]) del[i]=0;
For(i,1,n+n) del1[i]|=del[i],del[i]=0;
return res;
}
signed main()
{
n=read(),m=read();
s=0,t=n*2+1;
F::init(t,s,t);
For(i,1,n)F::add(s,i,1),F::add(i+n,t,1);
For(i,1,m){
int c=read();
while(c--){
int u=read(),v=read();
if(!del1[u] && !del1[v+n]) F::add(u,n+v,1);
}
qwq=res[i-1];
res[i]=res[i-1]+solve(i);
}
For(i,1,m)cout<<res[i]<<" ";
return 0;
}
/*
*/
详细
Test #1:
score: 100
Accepted
time: 1ms
memory: 7760kb
input:
3 4 2 1 1 1 2 2 1 1 2 2 2 1 3 3 2 1 3 3
output:
1 2 2 3
result:
ok 4 number(s): "1 2 2 3"
Test #2:
score: 0
Accepted
time: 1ms
memory: 5700kb
input:
0 0
output:
result:
ok 0 number(s): ""
Test #3:
score: 0
Accepted
time: 0ms
memory: 7792kb
input:
2 2 0 2 1 2 1 2
output:
0 1
result:
ok 2 number(s): "0 1"
Test #4:
score: 0
Accepted
time: 1336ms
memory: 24168kb
input:
100000 1 200000 78475 45796 32145 46393 92550 13904 73461 34145 96461 92851 56319 77067 77530 84437 76343 51543 77507 99269 76411 89382 1779 61393 43608 96136 84269 74828 14858 35967 32085 94909 19877 175 1482 94391 12424 55020 64369 92588 81296 7903 25433 46033 36294 61129 73556 84837 8419 10215 12...
output:
100000
result:
ok 1 number(s): "100000"
Test #5:
score: 0
Accepted
time: 1342ms
memory: 21588kb
input:
100000 1 200000 56816 52517 2577 76202 40378 1758 50464 66497 15834 50880 9829 16331 80693 9963 51096 17591 15871 35192 91302 65510 90775 57493 11891 8967 44787 41896 3387 35479 93471 47453 84804 93636 90746 34877 18202 38718 7473 34258 36581 19533 13249 27525 6442 69870 8822 61871 94537 67714 41396...
output:
100000
result:
ok 1 number(s): "100000"
Test #6:
score: 0
Accepted
time: 1ms
memory: 7800kb
input:
4 1 7 2 2 3 3 1 1 4 2 2 3 3 1 4 3
output:
3
result:
ok 1 number(s): "3"
Test #7:
score: 0
Accepted
time: 32ms
memory: 35712kb
input:
100000 1 199999 25371 25371 85965 85964 416 416 16797 16797 12438 12438 45410 45409 63006 63005 22156 22156 87829 87828 84014 84014 37308 37308 72325 72325 83704 83704 55391 55390 6781 6780 78091 78091 9376 9376 82193 82193 74695 74695 49842 49842 15799 15799 69856 69855 82949 82948 97390 97389 205 ...
output:
100000
result:
ok 1 number(s): "100000"
Test #8:
score: 0
Accepted
time: 28ms
memory: 37744kb
input:
100000 1 199999 59470 59470 76774 76773 89517 89517 87041 87041 90185 90185 83076 83076 61455 61455 33616 33616 85795 85794 92073 92072 49726 49726 63843 63842 99248 99248 24122 24122 29553 29552 73534 73534 75846 75846 27030 27029 84419 84419 26637 26637 10101 10100 75014 75013 67342 67342 75647 75...
output:
100000
result:
ok 1 number(s): "100000"
Test #9:
score: 0
Accepted
time: 1336ms
memory: 23772kb
input:
100000 1 199999 22285 45796 32145 44931 58735 13904 57137 34145 7549 92851 56319 11875 77530 85279 27040 51543 77507 94258 69266 89382 67074 61393 86160 96136 83228 74828 14858 19501 32085 73640 86885 175 27269 94391 20021 55020 45358 92588 17834 7903 55802 46033 36294 46558 73556 13747 8419 88394 1...
output:
100000
result:
ok 1 number(s): "100000"
Test #10:
score: 0
Accepted
time: 1315ms
memory: 30820kb
input:
100000 1 199999 4851 52517 2577 29251 69017 1758 85855 66497 48301 50880 83742 16331 98932 9963 38731 17591 15871 13961 91302 97596 81693 57493 11891 59333 5077 41896 23575 35479 93471 65246 61977 93636 96141 34877 18202 35367 64058 34258 25589 19533 13249 91004 6442 83449 99192 61871 94537 16903 73...
output:
100000
result:
ok 1 number(s): "100000"
Test #11:
score: 0
Accepted
time: 959ms
memory: 22528kb
input:
100000 1 199997 4415 9894 97824 23182 2551 30097 24322 27913 64552 31862 23073 68076 28494 14953 11400 33367 14514 13085 40869 51446 63170 88054 76550 23848 22657 57759 9479 56985 96440 59224 69954 84962 55443 22220 96520 87619 31746 72821 8800 6061 36912 77572 8970 95816 32991 68335 29931 84159 333...
output:
63398
result:
ok 1 number(s): "63398"
Test #12:
score: 0
Accepted
time: 670ms
memory: 22556kb
input:
100000 1 199998 88398 83466 84749 59029 89875 66158 13827 70123 42158 89836 17150 69739 94515 36029 65168 64957 20523 82579 767 6540 23367 32863 61341 51172 41325 62479 6019 38350 61266 36740 88694 66965 87199 74377 27532 67626 72836 38103 66474 43665 94014 82684 22393 7656 65428 88846 1268 82978 82...
output:
63828
result:
ok 1 number(s): "63828"
Test #13:
score: 0
Accepted
time: 906ms
memory: 19956kb
input:
100000 1 199999 19916 73760 33590 54291 86580 62788 16261 85328 54723 79797 99874 80572 54928 54473 89925 95257 69135 85704 7329 82391 40585 16916 72524 22756 18765 12473 44987 15352 30916 89510 35447 10869 89920 87243 50945 57679 67164 34842 72434 217 33280 11229 79543 42189 39850 20240 97438 7964 ...
output:
63525
result:
ok 1 number(s): "63525"
Test #14:
score: 0
Accepted
time: 79ms
memory: 19616kb
input:
61379 1 199943 14004 13750 24505 24348 30372 30220 27662 27462 33248 33398 38347 38158 17301 16945 50477 50644 56489 56552 46691 46950 21356 21289 3900 3660 24331 24166 8807 8306 40958 40995 15090 14814 20398 20390 30865 30801 33636 33756 20901 20809 55448 55500 4336 4041 36727 36552 16497 16096 367...
output:
37154
result:
ok 1 number(s): "37154"
Test #15:
score: 0
Accepted
time: 67ms
memory: 20280kb
input:
61352 1 199960 2271 2420 38843 39328 48789 48844 2494 2636 40184 40660 59755 59011 48981 48994 52509 52277 12893 13196 33812 34566 40261 40701 2117 2290 11743 12134 29440 29943 4257 4393 51423 51264 44696 44995 21601 22166 21667 22209 26473 26786 49980 50039 12100 12516 10540 10817 32737 33402 30808...
output:
37442
result:
ok 1 number(s): "37442"
Test #16:
score: 0
Accepted
time: 147ms
memory: 20108kb
input:
100000 1 199998 1 13806 1 33642 2 9260 2 62739 2 70692 2 78119 3 41149 4 15766 4 50060 5 96645 6 91522 7 32563 9 2551 9 11397 9 48346 10 14640 10 51058 10 79294 10 92375 11 64734 11 67021 12 7765 12 46823 12 60303 13 8750 13 27870 13 69570 13 71511 14 35685 14 42580 14 82024 15 34779 16 1976 16 6932...
output:
78404
result:
ok 1 number(s): "78404"
Test #17:
score: 0
Accepted
time: 157ms
memory: 22092kb
input:
100000 1 199998 1 28390 1 41334 1 66667 2 5985 2 15913 4 63754 4 77736 5 25016 5 30451 5 90213 6 66979 6 98910 7 63466 7 78228 7 78951 7 85423 8 1744 8 1869 8 55172 9 37583 10 26492 10 82985 11 29230 11 29812 11 33064 12 10610 12 48602 12 73299 12 95659 13 29065 13 50262 13 63187 13 68617 14 86838 1...
output:
78497
result:
ok 1 number(s): "78497"
Test #18:
score: 0
Accepted
time: 153ms
memory: 20036kb
input:
100000 1 199997 1 4358 1 35526 1 51858 2 57469 2 94928 2 96005 4 75469 5 20203 5 37103 6 32208 7 8678 7 16776 7 46814 7 75641 8 30807 9 4100 9 26455 9 49377 9 55540 9 67033 10 82363 11 11388 11 33779 11 35353 11 50534 11 54707 12 44869 12 59105 15 80529 15 90601 15 99753 16 10955 16 80520 16 87341 1...
output:
78379
result:
ok 1 number(s): "78379"
Test #19:
score: 0
Accepted
time: 4ms
memory: 13248kb
input:
77101 1 11866 5 29612 5 62771 5 65606 6 22178 6 57725 15 59633 15 68650 18 9623 19 9222 19 43356 30 19613 31 44429 33 51278 35 53197 36 20940 38 68143 39 34664 39 36433 40 71933 41 62218 42 40292 44 53543 45 22019 45 60540 48 56820 48 76082 50 18327 51 52877 51 58007 52 64710 52 66012 53 26752 53 45...
output:
8453
result:
ok 1 number(s): "8453"
Test #20:
score: 0
Accepted
time: 31ms
memory: 17556kb
input:
69830 1 148749 1 8566 1 12094 1 12609 3 778 3 8772 4 6107 4 7527 4 10597 4 12200 4 14675 4 17677 5 4644 5 15017 5 17195 7 6949 8 1744 8 7751 9 2306 9 4815 10 4469 10 12247 10 16764 10 17449 11 296 11 12044 11 13972 12 169 12 4448 12 7763 12 15834 12 15994 13 1915 13 3081 13 5650 15 30 16 1676 16 464...
output:
19684
result:
ok 1 number(s): "19684"
Test #21:
score: 0
Accepted
time: 44ms
memory: 16376kb
input:
61958 1 92222 1 23731 1 34076 1 35526 2 30469 2 61016 4 24510 4 36309 5 8062 5 45186 5 54436 6 32531 6 59289 7 10105 7 56658 11 2204 11 3107 11 33779 12 29822 12 59105 13 27898 15 18851 16 13473 16 14984 16 37132 16 40141 16 49347 16 59902 17 12877 17 32646 19 26572 22 60371 23 39981 23 41045 23 611...
output:
40194
result:
ok 1 number(s): "40194"
Test #22:
score: 0
Accepted
time: 57ms
memory: 15280kb
input:
36033 1 130375 1 1578 1 16726 1 22302 1 24559 2 5978 2 6739 2 9340 2 25295 3 763 3 6993 3 10208 3 14609 4 4 4 3003 4 25048 5 12403 5 13816 5 15863 6 4728 7 6681 7 8346 7 10058 7 13353 7 17085 8 9879 8 17894 8 21629 8 23893 9 2602 9 13005 9 19100 9 23029 10 2308 10 13012 10 15777 10 22643 12 7389 12 ...
output:
25668
result:
ok 1 number(s): "25668"
Test #23:
score: 0
Accepted
time: 13ms
memory: 16240kb
input:
99117 1 25214 1 19547 1 37952 2 13805 2 18264 2 38542 2 49320 2 64694 2 81666 2 91778 3 2160 3 8897 5 38135 6 3465 6 52632 7 85972 7 92675 8 5531 8 12992 8 35466 9 12078 9 71947 10 57521 12 75487 12 95228 13 83002 14 83430 14 85533 16 32389 16 49235 16 87160 17 70734 17 95798 18 45028 19 51285 21 38...
output:
12003
result:
ok 1 number(s): "12003"
Test #24:
score: 0
Accepted
time: 16ms
memory: 15076kb
input:
53098 1 57924 1 263 1 3337 1 7252 3 2977 4 4878 5 3404 5 8280 6 4743 7 2962 7 8902 9 5980 9 8809 10 7823 11 416 13 970 14 1059 16 3593 18 5760 19 7129 20 4462 20 9344 21 5012 21 8943 22 8415 23 5218 23 5267 23 5456 24 5699 24 8698 25 5856 26 1212 26 2831 29 3686 30 1867 30 8646 33 6956 33 7046 34 24...
output:
9415
result:
ok 1 number(s): "9415"
Test #25:
score: 0
Accepted
time: 161ms
memory: 18472kb
input:
62612 1 153201 1 1820 2 26258 2 34655 2 41967 3 9610 4 19008 4 31307 4 36055 5 36682 5 42044 5 46886 5 54124 6 35273 6 48536 7 9178 7 44478 8 11190 8 17567 8 41427 8 53725 9 13816 9 36016 9 48167 11 1145 11 2929 11 21149 11 21678 11 46646 13 39908 13 53276 14 52580 15 21090 16 39808 17 46514 18 2478...
output:
53671
result:
ok 1 number(s): "53671"
Test #26:
score: 0
Accepted
time: 13ms
memory: 16216kb
input:
95835 1 31126 8 7490 11 1814 18 1853 19 9254 22 3000 26 1650 29 7089 34 4069 34 6120 35 5652 40 10351 42 5704 44 7513 52 3935 53 4247 56 4276 56 6550 65 8186 67 10081 68 10333 74 6344 74 6433 81 8845 87 1765 88 5647 93 400 96 510 96 9565 103 10599 108 583 122 5614 123 5867 124 7064 126 4181 126 6966...
output:
10716
result:
ok 1 number(s): "10716"
Test #27:
score: 0
Accepted
time: 7ms
memory: 18376kb
input:
49455 1 192460 1 452 1 2960 1 4381 1 4903 1 9093 1 9319 1 10190 1 11110 1 13731 1 15873 1 17605 1 18558 1 19328 1 19872 1 21172 1 24113 1 26986 1 28369 1 28475 1 29570 1 30904 1 31862 1 35961 1 36792 1 38655 1 40351 1 46165 1 46922 1 47527 1 48227 1 48324 1 48593 1 49187 2 2867 2 8430 2 9732 2 9880 ...
output:
5824
result:
ok 1 number(s): "5824"
Test #28:
score: 0
Accepted
time: 36ms
memory: 17224kb
input:
64506 1 150593 1 4769 1 10543 1 14843 1 20603 2 1267 2 12254 3 472 3 13146 3 14024 3 15191 3 18273 3 22690 5 8150 5 9070 7 358 7 10398 7 10870 7 16798 8 5498 8 19180 9 3469 9 6449 9 11474 9 12456 9 13156 10 752 11 11246 12 10587 12 13267 12 17149 12 20207 12 22536 13 5516 14 375 14 19048 15 11868 15...
output:
23290
result:
ok 1 number(s): "23290"
Test #29:
score: 0
Accepted
time: 6319ms
memory: 19700kb
input:
100000 1000 33 78475 45796 32145 46393 92550 13904 73461 34145 96461 92851 56319 77067 77530 84437 76343 51543 77507 99269 76411 89382 1779 61393 43608 96136 84269 74828 14858 35967 32085 94909 19877 175 1482 94391 12424 55020 64369 92588 81296 7903 25433 46033 36294 61129 73556 84837 8419 10215 120...
output:
33 197 311 340 497 500 644 778 1331 2256 2430 2515 2536 2758 3521 3741 3830 3858 4049 4231 4424 4818 4897 4990 5026 5161 5239 5308 5379 5492 5493 5558 5638 6038 6427 6494 7125 7211 7610 7775 7924 8165 8247 8802 8901 9063 9170 9222 9261 9295 9301 9435 9452 9718 9897 9938 10022 10124 10232 11196 11300...
result:
ok 1000 numbers
Test #30:
score: 0
Accepted
time: 6303ms
memory: 20212kb
input:
100000 1000 946 56816 52517 2577 76202 40378 1758 50464 66497 15834 50880 9829 16331 80693 9963 51096 17591 15871 35192 91302 65510 90775 57493 11891 8967 44787 41896 3387 35479 93471 47453 84804 93636 90746 34877 18202 38718 7473 34258 36581 19533 13249 27525 6442 69870 8822 61871 94537 67714 41396...
output:
942 1229 1851 2161 2594 2646 2984 3171 3267 3298 3354 3404 4166 4258 4620 4667 5002 5336 5651 6094 6244 6591 6832 7089 7123 7216 7231 7308 7573 7654 7805 7984 8084 8205 8355 8357 8381 8653 8896 9602 9637 9759 9773 10021 10158 10410 10471 10568 10644 10661 10667 10820 10905 11004 11007 11594 12243 12...
result:
ok 1000 numbers
Test #31:
score: 0
Accepted
time: 1ms
memory: 9748kb
input:
4 1000 1 2 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 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:
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...
result:
ok 1000 numbers
Test #32:
score: 0
Accepted
time: 5857ms
memory: 17592kb
input:
100000 1000 110 25371 25371 85965 85964 416 416 16797 16797 12438 12438 45410 45409 63006 63005 22156 22156 87829 87828 84014 84014 37308 37308 72325 72325 83704 83704 55391 55390 6781 6780 78091 78091 9376 9376 82193 82193 74695 74695 49842 49842 15799 15799 69856 69855 82949 82948 97390 97389 205 ...
output:
110 360 678 750 894 1037 1044 1342 1417 1758 2129 2442 2588 2787 3551 3821 4204 4863 4998 5010 5065 5263 5299 5755 5832 6169 6551 6978 7036 7118 7808 7823 7831 8108 8147 9333 9547 9605 9606 9615 9903 10071 10249 10255 10637 10779 10871 10959 11193 11289 11310 11444 11630 11651 11716 11929 12041 1208...
result:
ok 1000 numbers
Test #33:
score: 0
Accepted
time: 5759ms
memory: 18488kb
input:
100000 1000 67 59470 59470 76774 76773 89517 89517 87041 87041 90185 90185 83076 83076 61455 61455 33616 33616 85795 85794 92073 92072 49726 49726 63843 63842 99248 99248 24122 24122 29553 29552 73534 73534 75846 75846 27030 27029 84419 84419 26637 26637 10101 10100 75014 75013 67342 67342 75647 756...
output:
67 326 420 563 591 732 764 978 1131 1721 2067 2301 2323 2369 2495 2613 2635 2849 2887 3003 3018 3110 3143 3193 3220 3641 3770 3805 3928 4170 4397 4560 4705 4766 4854 4973 5613 5696 6100 6217 6229 6282 6301 6457 6717 6733 6823 6892 6971 7052 7138 7635 7637 7720 7796 8007 8013 8085 8305 8719 8747 8797...
result:
ok 1000 numbers
Test #34:
score: 0
Accepted
time: 6377ms
memory: 17652kb
input:
100000 1000 340 22285 45796 32145 44931 58735 13904 57137 34145 7549 92851 56319 11875 77530 85279 27040 51543 77507 94258 69266 89382 67074 61393 86160 96136 83228 74828 14858 19501 32085 73640 86885 175 27269 94391 20021 55020 45358 92588 17834 7903 55802 46033 36294 46558 73556 13747 8419 88394 1...
output:
340 434 1958 1988 2255 2433 2579 3146 3186 3191 3847 3888 4040 4155 4392 4551 4792 5015 5329 6017 6027 6124 6144 6369 6625 6811 6868 7598 7823 8124 8663 8699 8738 9888 10575 11135 11178 11313 11351 11446 11562 11694 11827 12015 12066 12225 12268 12309 12629 12803 12901 13156 13237 13305 13535 13768 ...
result:
ok 1000 numbers
Test #35:
score: 0
Accepted
time: 6391ms
memory: 19700kb
input:
100000 1000 24 4851 52517 2577 29251 69017 1758 85855 66497 48301 50880 83742 16331 98932 9963 38731 17591 15871 13961 91302 97596 81693 57493 11891 59333 5077 41896 23575 35479 93471 65246 61977 93636 96141 34877 18202 35367 64058 34258 25589 19533 13249 91004 6442 83449 99192 61871 94537 16903 141...
output:
24 165 195 325 656 911 1192 1342 1354 1514 1574 1655 1662 1990 2647 2812 3541 3776 4291 4684 5231 5256 5505 5599 5706 6054 6164 6199 6244 6258 6544 6758 6846 6913 6944 7523 7732 7916 7943 8068 8124 8164 8593 9130 9188 9871 10067 10584 11026 11234 11242 11411 11468 11622 11640 11752 11935 12018 12192...
result:
ok 1000 numbers
Test #36:
score: 0
Accepted
time: 6521ms
memory: 18108kb
input:
100000 1000 243 4415 9894 97824 23182 2551 30097 24322 27913 64552 31862 23073 68076 28494 14953 11400 33367 14514 13085 40869 51446 63170 88054 76550 23848 22657 57759 9479 56985 96440 59224 69954 84962 55443 22220 96520 87619 31746 72821 8800 6061 36912 77572 8970 95816 32991 68335 29931 84159 333...
output:
243 404 465 556 1096 1132 1233 1353 1518 1530 1567 1657 1658 1672 1788 1938 2182 2231 2390 2452 2490 2607 2908 3438 3760 3803 4123 4472 5458 5591 5725 5924 6015 6245 6281 6423 6816 7146 7233 7498 7573 7690 7800 7890 7960 8269 8588 8656 8709 8851 9476 9634 9634 9829 9912 10865 11248 11317 11384 11441...
result:
ok 1000 numbers
Test #37:
score: 0
Accepted
time: 6498ms
memory: 17592kb
input:
100000 1000 118 88398 83466 84749 59029 89875 66158 13827 70123 42158 89836 17150 69739 94515 36029 65168 64957 20523 82579 767 6540 23367 32863 61341 51172 41325 62479 6019 38350 61266 36740 88694 66965 87199 74377 27532 67626 72836 38103 66474 43665 94014 82684 22393 7656 65428 88846 1268 82978 82...
output:
118 646 1061 1067 1254 2308 2487 2615 2884 2899 3415 3526 3561 3578 3618 3636 3720 3816 3868 4226 4504 4719 4752 4983 5040 5053 5089 5136 5179 5180 5228 5398 5460 5599 5704 5981 6069 6182 6210 6556 6602 6664 6761 6804 6970 7095 7215 7424 7531 7556 7628 7688 7721 7775 7923 8062 8229 8327 8327 8499 85...
result:
ok 1000 numbers
Test #38:
score: 0
Accepted
time: 6437ms
memory: 17656kb
input:
100000 1000 368 19916 73760 33590 54291 86580 62788 16261 85328 54723 79797 99874 80572 54928 54473 89925 95257 69135 85704 7329 82391 40585 16916 72524 22756 18765 12473 44987 15352 30916 89510 35447 10869 89920 87243 50945 57679 67164 34842 72434 217 33280 11229 79543 42189 39850 20240 97438 7964 ...
output:
367 668 861 1226 1296 1410 1561 2140 2219 2264 2491 2716 2841 3033 3077 3191 3383 3520 3830 4013 4226 4587 5095 5233 5253 5382 5625 5951 6137 6194 6466 6743 6792 6922 6997 7212 7447 7529 7679 7953 8032 8133 8486 8575 8610 8668 9295 9446 9458 9463 9564 9594 9714 9878 10037 10121 10219 10413 10421 104...
result:
ok 1000 numbers
Test #39:
score: 0
Accepted
time: 3847ms
memory: 12904kb
input:
61379 1000 458 14004 13750 24505 24348 30372 30220 27662 27462 33248 33398 38347 38158 17301 16945 50477 50644 56489 56552 46691 46950 21356 21289 3900 3660 24331 24166 8807 8306 40958 40995 15090 14814 20398 20390 30865 30801 33636 33756 20901 20809 55448 55500 4336 4041 36727 36552 16497 16096 367...
output:
454 575 1052 1078 1094 1228 1378 1397 1479 1565 1617 2017 3101 3136 3161 3419 3446 3984 4019 4064 4102 4220 4405 4465 4574 4841 4853 4962 5150 5429 5715 6322 6384 6527 6689 6870 6900 7020 7432 7538 7813 7944 8197 8371 8408 8875 8933 8953 8959 8983 9061 9193 9382 9452 9528 9567 9854 9871 9942 10528 1...
result:
ok 1000 numbers
Test #40:
score: 0
Accepted
time: 3807ms
memory: 16072kb
input:
61352 1000 40 2271 2420 38843 39328 48789 48844 2494 2636 40184 40660 59755 59011 48981 48994 52509 52277 12893 13196 33812 34566 40261 40701 2117 2290 11743 12134 29440 29943 4257 4393 51423 51264 44696 44995 21601 22166 21667 22209 26473 26786 49980 50039 12100 12516 10540 10817 32737 33402 30808 ...
output:
40 108 118 172 402 506 526 724 856 1515 1799 1885 2356 2482 2567 2579 2901 3184 3205 3341 3757 3770 4094 4141 4232 4346 4546 4558 5127 5198 5310 5427 5512 5519 5629 5727 5784 5830 5867 5946 5953 6032 6038 6088 6286 6601 6651 7046 7109 7176 7286 7380 7494 7752 7855 7956 7958 8136 8382 8389 8393 8969 ...
result:
ok 1000 numbers
Test #41:
score: -100
Time Limit Exceeded
input:
100000 1000 162 1 13806 1 33642 2 9260 2 62739 2 70692 2 78119 3 41149 4 15766 4 50060 5 96645 6 91522 7 32563 9 2551 9 11397 9 48346 10 14640 10 51058 10 79294 10 92375 11 64734 11 67021 12 7765 12 46823 12 60303 13 8750 13 27870 13 69570 13 71511 14 35685 14 42580 14 82024 15 34779 16 1976 16 6932...