QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#612170 | #957. Assignment Problem | N_z_ | AC ✓ | 229ms | 3932kb | C++20 | 6.7kb | 2024-10-05 08:47:38 | 2024-10-05 08:47:39 |
Judging History
answer
#include<bits/stdc++.h>
using namespace std;
struct time_helper{
#ifdef LOCAL
clock_t time_last;time_helper(){time_last=clock();}void test(){auto time_now=clock();std::cerr<<"time:"<<1.*(time_now-time_last)/CLOCKS_PER_SEC<<";all_time:"<<1.*time_now/CLOCKS_PER_SEC<<std::endl;time_last=time_now;}~time_helper(){test();}
#else
void test(){}
#endif
}time_helper;
#ifdef LOCAL
#include"dbg.h"
#else
#define dbg(...) (__VA_ARGS__)
#endif
namespace Fread{const int SIZE=1<<16;char buf[SIZE],*S,*T;inline char getchar(){if(S==T){T=(S=buf)+fread(buf,1,SIZE,stdin);if(S==T)return'\n';}return *S++;}}namespace Fwrite{const int SIZE=1<<16;char buf[SIZE],*S=buf,*T=buf+SIZE;inline void flush(){fwrite(buf,1,S-buf,stdout);S=buf;}inline void putchar(char c){*S++=c;if(S==T)flush();}struct NTR{~NTR(){flush();}}ztr;}
#define getchar Fread::getchar
#define putchar Fwrite::putchar
int print_precision=10;bool print_T_endl=1;char print_between=' ';
template<typename T>struct is_char{static constexpr bool value=(std::is_same<T,char>::value||std::is_same<T,signed char>::value||std::is_same<T,unsigned char>::value);};template<typename T>struct is_integral_ex{static constexpr bool value=(std::is_integral<T>::value||std::is_same<T,__int128>::value)&&!is_char<T>::value;};template<typename T>struct is_floating_point_ex{static constexpr bool value=std::is_floating_point<T>::value||std::is_same<T,__float128>::value;};namespace Fastio{struct Reader;struct Writer;template<size_t id>struct read_tuple{template<typename...T>static void read(Reader&stream,std::tuple<T...>&x){read_tuple<id-1>::read(stream,x);stream>>get<id-1>(x);}};template<>struct read_tuple<0>{template<typename...T>static void read([[maybe_unused]]Reader&stream,[[maybe_unused]]std::tuple<T...>&x){}};template<size_t id>struct print_tuple{template<typename...T>static void print(Writer&stream,const std::tuple<T...>&x){print_tuple<id-1>::print(stream,x);putchar(print_between);stream<<get<id-1>(x);}};template<>struct print_tuple<1>{template<typename...T>static void print(Writer&stream,const std::tuple<T...>&x){stream<<get<0>(x);}};template<>struct print_tuple<0>{template<typename...T>static void print([[maybe_unused]]Writer&stream,[[maybe_unused]]const std::tuple<T...>&x){}};
struct Reader{template<typename T>typename std::enable_if_t<std::is_class<T>::value,Reader&>operator>>(T&x){for(auto &y:x)*this>>y;return *this;}template<typename...T>Reader&operator>>(std::tuple<T...>&x){read_tuple<sizeof...(T)>::read(*this,x);return *this;}template<typename T>typename std::enable_if_t<is_integral_ex<T>::value,Reader&>operator>>(T&x){char c=getchar();short f=1;while(c<'0'||c>'9'){if(c=='-')f*=-1;c=getchar();}x=0;while(c>='0'&&c<='9'){x=(x<<1)+(x<<3)+(c^48);c=getchar();}x*=f;return *this;}template<typename T>typename std::enable_if_t<is_floating_point_ex<T>::value,Reader&>operator>>(T&x){char c=getchar();short f=1,s=0;x=0;T t=0;while((c<'0'||c>'9')&&c!='.'){if(c=='-')f*=-1;c=getchar();}while(c>='0'&&c<='9'&&c!='.')x=x*10+(c^48),c=getchar();if(c=='.')c=getchar();else return x*=f,*this;while(c>='0'&&c<='9')t=t*10+(c^48),s++,c=getchar();while(s--)t/=10.0;x=(x+t)*f;return*this;}template<typename T>typename std::enable_if_t<is_char<T>::value,Reader&>operator>>(T&c){c=getchar();while(c=='\n'||c==' '||c=='\r')c=getchar();return *this;}Reader&operator>>(char*str){int len=0;char c=getchar();while(c=='\n'||c==' '||c=='\r')c=getchar();while(c!='\n'&&c!=' '&&c!='\r')str[len++]=c,c=getchar();str[len]='\0';return*this;}template<typename T1,typename T2>Reader&operator>>(std::pair<T1,T2>&x){*this>>x.first>>x.second;return *this;}Reader&operator>>(std::string&str){str.clear();char c=getchar();while(c=='\n'||c==' '||c=='\r')c=getchar();while(c!='\n'&&c!=' '&&c!='\r')str.push_back(c),c=getchar();return*this;}Reader(){}}cin;const char endl='\n';
struct Writer{typedef __int128 mxdouble;template<typename T>typename std::enable_if_t<std::is_class<T>::value,Writer&>operator<<(const T&x){for(auto q:x){*this<<q;if(!is_class<decltype(q)>::value)*this<<print_between;}if(!is_class<typename T::value_type>::value&&print_T_endl)*this<<'\n';return *this;}template<typename...T>Writer&operator<<(const std::tuple<T...>&x){print_tuple<sizeof...(T)>::print(*this,x);if(print_T_endl)*this<<'\n';return *this;}template<typename T>typename std::enable_if_t<is_integral_ex<T>::value,Writer&>operator<<(T x){if(x==0)return putchar('0'),*this;if(x<0)putchar('-'),x=-x;static int sta[45];int top=0;while(x)sta[++top]=x%10,x/=10;while(top)putchar(sta[top]+'0'),--top;return*this;}template<typename T>typename std::enable_if_t<is_floating_point_ex<T>::value,Writer&>operator<<(T x){if(x<0)putchar('-'),x=-x;x+=pow(10,-print_precision)/2;mxdouble _=x;x-=(T)_;static int sta[45];int top=0;while(_)sta[++top]=_%10,_/=10;if(!top)putchar('0');while(top)putchar(sta[top]+'0'),--top;putchar('.');for(int i=0;i<print_precision;i++)x*=10;_=x;while(_)sta[++top]=_%10,_/=10;for(int i=0;i<print_precision-top;i++)putchar('0');while(top)putchar(sta[top]+'0'),--top;return*this;}template<typename T>typename std::enable_if_t<is_char<T>::value,Writer&>operator<<(const T&c){putchar(c);return*this;}Writer&operator<<(char*str){int cur=0;while(str[cur])putchar(str[cur++]);return *this;}Writer&operator<<(const char*str){int cur=0;while(str[cur])putchar(str[cur++]);return*this;}template<typename T1,typename T2>Writer&operator<<(const std::pair<T1,T2>&x){*this<<x.first<<print_between<<x.second;if(print_T_endl)*this<<'\n';return *this;}Writer&operator<<(const std::string&str){int st=0,ed=str.size();while(st<ed)putchar(str[st++]);return*this;}Writer(){}}cout;}
#define cin Fastio::cin
#define cout Fastio::cout
#define endl Fastio::endl
template<class Fun>class y_combinator_result{Fun fun_;public:template<class T>explicit y_combinator_result(T &&fun): fun_(std::forward<T>(fun)) {}template<class ...Args>decltype(auto) operator()(Args &&...args){return fun_(std::ref(*this), std::forward<Args>(args)...);}};template<class Fun>decltype(auto) y_combinator(Fun &&fun){return y_combinator_result<std::decay_t<Fun>>(std::forward<Fun>(fun));}
void init();void solve(int tc);
main()
{
init();int t=1;
// cin>>t;
for(int tc=1;tc<=t;tc++)solve(tc);
}
void init()
{
}
mt19937 mt(time(0));
void solve([[maybe_unused]]int tc)
{
int n,m;
cin>>n>>m;
vector<vector<int>>best(m,vector<int>(m));
for(int x=0;x<m;x++)
for(int y=0;y<n;y++)
{
int a;
cin>>a;
if(y<m)best[x][y]=a-1;
}
vector<int>p(m);
for(int x=0;x<m;x++)p[x]=x;
vector<int>ok(n),tag(n);
int T=1000000;
while(T--)
{
shuffle(p.begin(),p.end(),mt);
for(auto x:p)
for(int y=0;y<m;y++)
if(!tag[best[x][y]]){ok[best[x][y]]=tag[best[x][y]]=1;break;}
for(auto x:p)
for(int y=0;y<m;y++)
tag[best[x][y]]=0;
}
int ans=0;
for(int x=0;x<n;x++)
ans+=ok[x];
cout<<ans<<endl;
for(int x=0;x<n;x++)
if(ok[x])cout<<x+1<<' ';cout<<endl;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 18ms
memory: 3724kb
input:
4 2 1 2 4 3 1 3 4 2
output:
3 1 2 3
result:
ok 4 number(s): "3 1 2 3"
Test #2:
score: 0
Accepted
time: 17ms
memory: 3880kb
input:
4 2 1 4 3 2 2 3 4 1
output:
2 1 2
result:
ok 3 number(s): "2 1 2"
Test #3:
score: 0
Accepted
time: 65ms
memory: 3608kb
input:
10 5 3 5 10 9 8 7 4 1 6 2 3 4 5 8 1 6 2 9 7 10 2 9 8 3 1 5 10 6 7 4 6 8 4 9 2 7 3 5 1 10 10 3 6 5 9 1 4 2 8 7
output:
6 2 3 4 5 6 10
result:
ok 7 numbers
Test #4:
score: 0
Accepted
time: 63ms
memory: 3932kb
input:
1000 5 890 508 800 793 148 422 569 817 41 303 52 946 691 273 719 918 920 464 640 596 905 187 425 483 292 290 987 343 145 888 754 348 894 454 818 654 225 688 369 616 785 784 294 485 551 272 798 668 451 565 534 122 809 329 168 772 282 467 112 886 66 965 926 521 836 297 305 386 288 717 255 151 568 43 9...
output:
5 255 279 360 643 890
result:
ok 6 numbers
Test #5:
score: 0
Accepted
time: 140ms
memory: 3688kb
input:
15 9 11 8 7 15 4 10 12 1 2 3 6 9 14 5 13 15 8 1 3 4 12 10 6 13 7 11 2 5 14 9 10 2 1 8 14 5 12 9 3 4 6 15 11 7 13 6 15 3 8 12 14 1 13 10 11 7 2 5 9 4 9 6 14 10 11 8 2 12 3 7 1 15 4 5 13 8 6 14 13 11 10 9 2 5 3 15 12 4 1 7 8 1 7 6 9 3 11 10 12 14 15 2 5 4 13 6 15 7 9 2 13 1 11 14 4 5 3 10 12 8 2 9 15 ...
output:
11 1 2 3 6 7 8 9 10 11 14 15
result:
ok 12 numbers
Test #6:
score: 0
Accepted
time: 99ms
memory: 3652kb
input:
1000 9 2 700 292 58 153 387 688 770 589 533 94 442 35 706 75 300 881 898 10 70 377 892 433 313 983 12 494 733 53 179 502 495 44 606 539 647 646 672 520 69 997 239 403 426 944 18 979 81 782 133 671 792 336 327 630 38 821 775 456 25 852 656 711 16 529 169 935 318 140 550 759 471 250 546 742 951 440 35...
output:
9 2 185 383 431 439 728 852 921 983
result:
ok 10 numbers
Test #7:
score: 0
Accepted
time: 159ms
memory: 3684kb
input:
15 10 12 8 15 3 7 1 5 10 11 2 13 6 4 9 14 3 12 14 9 4 8 2 10 13 7 6 15 5 1 11 10 12 15 7 11 2 6 8 13 9 14 5 1 4 3 6 1 4 8 7 5 9 10 14 2 13 3 12 15 11 4 6 2 10 1 11 9 14 13 7 5 15 8 3 12 12 10 7 5 6 11 1 13 14 15 4 8 3 9 2 15 5 4 7 9 2 1 13 11 12 3 10 14 8 6 1 8 2 15 9 4 14 5 10 7 3 6 12 13 11 7 11 9...
output:
14 1 2 3 4 5 6 7 8 9 10 11 12 13 15
result:
ok 15 numbers
Test #8:
score: 0
Accepted
time: 114ms
memory: 3704kb
input:
1000 10 22 671 550 260 689 981 935 62 270 596 224 202 156 937 715 520 812 378 400 702 546 517 344 236 235 949 109 282 294 106 652 956 994 380 366 830 810 283 95 304 231 750 728 189 495 388 170 348 64 462 522 674 307 309 752 371 919 384 430 313 377 39 35 237 941 310 976 497 234 683 817 525 989 514 73...
output:
10 22 247 521 534 590 658 671 682 763 820
result:
ok 11 numbers
Test #9:
score: 0
Accepted
time: 187ms
memory: 3728kb
input:
15 11 12 2 3 6 15 10 8 1 7 5 13 14 11 4 9 14 9 10 8 3 5 15 13 1 7 11 6 2 4 12 13 10 14 6 12 3 11 7 5 15 2 9 4 1 8 2 7 1 8 10 5 12 15 13 6 3 9 4 11 14 2 15 11 12 3 6 5 8 9 7 4 14 13 1 10 15 2 5 4 1 14 3 9 13 8 11 6 12 10 7 6 3 5 7 10 13 9 2 11 15 4 14 1 8 12 9 15 1 13 4 3 2 5 8 7 12 14 11 10 6 7 13 1...
output:
15 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
result:
ok 16 numbers
Test #10:
score: 0
Accepted
time: 141ms
memory: 3708kb
input:
1000 11 780 479 30 770 201 920 302 972 558 420 542 251 706 46 232 559 713 222 477 633 791 957 740 202 314 837 353 928 724 265 589 357 458 673 332 910 429 946 714 697 110 206 561 855 22 216 994 423 882 830 564 149 987 930 921 409 1000 329 551 708 878 993 33 480 67 787 700 826 412 927 735 854 829 229 ...
output:
11 111 224 285 384 431 508 516 708 780 803 955
result:
ok 12 numbers
Test #11:
score: 0
Accepted
time: 54ms
memory: 3672kb
input:
10 5 1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7 8 9 10
output:
5 1 2 3 4 5
result:
ok 6 numbers
Test #12:
score: 0
Accepted
time: 73ms
memory: 3812kb
input:
10 5 2 1 5 3 4 6 7 8 9 10 5 4 3 1 2 6 7 8 9 10 4 3 5 2 1 6 7 8 9 10 2 3 5 1 4 6 7 8 9 10 1 5 4 2 3 6 7 8 9 10
output:
5 1 2 3 4 5
result:
ok 6 numbers
Test #13:
score: 0
Accepted
time: 72ms
memory: 3656kb
input:
10 5 8 10 4 7 5 2 1 9 6 3 9 5 2 1 7 8 4 6 10 3 4 2 1 10 6 3 8 7 9 5 9 4 8 5 2 1 6 3 7 10 2 1 5 7 9 8 3 4 10 6
output:
7 1 2 4 5 8 9 10
result:
ok 8 numbers
Test #14:
score: 0
Accepted
time: 57ms
memory: 3616kb
input:
10 5 9 7 4 5 3 8 6 2 1 10 3 5 4 1 2 6 9 10 8 7 10 9 8 4 5 3 1 2 7 6 2 8 9 1 4 3 7 10 5 6 7 4 5 6 2 9 10 3 8 1
output:
5 2 3 7 9 10
result:
ok 6 numbers
Test #15:
score: 0
Accepted
time: 121ms
memory: 3720kb
input:
20 9 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1...
output:
9 1 2 3 4 5 6 7 8 9
result:
ok 10 numbers
Test #16:
score: 0
Accepted
time: 149ms
memory: 3656kb
input:
20 9 2 3 4 1 5 9 8 6 7 10 11 12 13 14 15 16 17 18 19 20 1 2 9 6 5 8 3 7 4 10 11 12 13 14 15 16 17 18 19 20 9 2 8 5 6 3 4 1 7 10 11 12 13 14 15 16 17 18 19 20 8 5 4 3 9 1 2 7 6 10 11 12 13 14 15 16 17 18 19 20 2 6 7 4 8 9 3 1 5 10 11 12 13 14 15 16 17 18 19 20 7 6 1 8 9 3 4 2 5 10 11 12 13 14 15 16 1...
output:
9 1 2 3 4 5 6 7 8 9
result:
ok 10 numbers
Test #17:
score: 0
Accepted
time: 141ms
memory: 3880kb
input:
20 9 1 2 3 15 16 11 6 8 7 10 4 9 13 17 12 5 14 18 19 20 1 19 3 2 5 6 16 18 9 10 11 13 4 8 15 7 14 12 20 17 10 5 18 4 13 6 12 3 14 1 20 11 2 9 7 16 17 8 19 15 7 8 10 4 5 9 20 2 6 16 11 12 15 14 3 18 1 13 19 17 1 12 8 13 5 6 4 3 14 17 20 2 10 9 15 16 18 19 7 11 6 14 3 20 5 7 1 8 2 10 18 11 13 9 12 16 ...
output:
10 1 2 3 6 7 9 10 12 18 19
result:
ok 11 numbers
Test #18:
score: 0
Accepted
time: 143ms
memory: 3676kb
input:
20 9 12 5 2 19 3 1 7 13 16 6 11 14 9 4 15 10 17 18 8 20 16 8 20 6 7 15 19 3 1 12 4 9 13 10 14 18 17 5 2 11 14 16 8 3 12 1 15 4 7 9 11 6 13 5 20 2 17 18 19 10 1 6 8 17 3 15 7 9 18 10 4 5 12 14 2 11 16 13 19 20 1 17 4 6 9 20 3 2 7 14 8 11 16 10 15 13 5 18 19 12 13 5 8 3 17 2 7 10 11 1 20 18 14 12 6 16...
output:
14 1 2 3 4 5 6 7 8 12 13 14 16 17 20
result:
ok 15 numbers
Test #19:
score: 0
Accepted
time: 140ms
memory: 3724kb
input:
20 10 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 ...
output:
10 1 2 3 4 5 6 7 8 9 10
result:
ok 11 numbers
Test #20:
score: 0
Accepted
time: 214ms
memory: 3612kb
input:
20 10 6 8 4 7 9 3 10 1 2 5 11 12 13 14 15 16 17 18 19 20 8 6 2 10 1 5 3 9 7 4 11 12 13 14 15 16 17 18 19 20 6 3 8 1 2 9 5 10 4 7 11 12 13 14 15 16 17 18 19 20 3 10 8 9 2 6 7 4 5 1 11 12 13 14 15 16 17 18 19 20 8 4 6 2 9 7 5 10 1 3 11 12 13 14 15 16 17 18 19 20 6 8 1 2 4 5 9 10 3 7 11 12 13 14 15 16 ...
output:
10 1 2 3 4 5 6 7 8 9 10
result:
ok 11 numbers
Test #21:
score: 0
Accepted
time: 149ms
memory: 3720kb
input:
20 10 1 2 10 14 5 12 7 8 9 15 11 6 19 18 4 16 17 20 13 3 1 15 9 4 5 2 14 8 3 16 18 12 13 7 6 17 19 11 10 20 13 2 3 9 18 14 1 5 4 10 8 7 12 6 15 16 17 11 19 20 15 2 17 5 20 6 7 3 9 4 11 12 13 14 8 16 10 18 19 1 12 11 9 4 6 1 15 10 13 8 2 3 17 14 7 16 5 18 19 20 5 12 4 9 16 15 7 6 3 10 1 2 8 14 17 11 ...
output:
12 1 2 3 4 5 8 9 10 12 13 15 17
result:
ok 13 numbers
Test #22:
score: 0
Accepted
time: 151ms
memory: 3664kb
input:
20 10 8 1 9 13 12 15 6 3 4 2 14 18 20 7 5 11 17 16 19 10 8 7 18 4 11 2 5 20 12 1 9 6 3 14 15 16 19 13 10 17 20 14 16 9 2 13 10 3 8 6 12 5 1 7 15 19 17 18 4 11 14 4 5 6 10 12 7 18 9 2 11 8 1 13 15 20 17 19 16 3 2 1 19 18 8 3 10 14 7 17 11 5 13 6 16 15 12 4 9 20 20 18 2 1 14 4 3 6 9 8 11 15 13 17 16 1...
output:
14 1 2 4 5 7 8 9 10 11 12 14 16 18 20
result:
ok 15 numbers
Test #23:
score: 0
Accepted
time: 141ms
memory: 3728kb
input:
100 10 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 1...
output:
10 1 2 3 4 5 6 7 8 9 10
result:
ok 11 numbers
Test #24:
score: 0
Accepted
time: 201ms
memory: 3720kb
input:
100 10 4 9 5 10 3 7 8 6 1 2 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 8...
output:
10 1 2 3 4 5 6 7 8 9 10
result:
ok 11 numbers
Test #25:
score: 0
Accepted
time: 190ms
memory: 3880kb
input:
100 10 1 2 3 4 5 6 7 8 9 89 11 12 13 14 15 16 17 18 19 20 21 71 23 24 25 26 27 28 29 100 31 32 33 34 35 36 37 38 39 70 41 42 43 44 45 74 47 48 50 49 51 52 82 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 78 22 72 73 46 75 76 77 40 79 80 81 53 93 84 85 86 87 88 10 90 83 92 91 94 95 96 97 98 99 30 1...
output:
17 1 2 3 4 5 6 7 8 9 24 28 39 46 54 62 77 80
result:
ok 18 numbers
Test #26:
score: 0
Accepted
time: 160ms
memory: 3680kb
input:
100 10 3 9 8 1 6 10 4 2 59 49 50 12 31 14 15 16 17 18 19 86 21 13 23 24 25 26 22 28 29 30 27 32 33 34 35 36 89 38 39 40 41 42 43 44 45 65 47 48 7 11 51 52 85 54 55 56 57 58 5 60 61 62 63 64 46 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 53 20 87 88 37 90 91 92 93 94 95 96 97 98 99 100 5...
output:
13 1 3 5 6 7 8 9 10 13 24 34 64 92
result:
ok 14 numbers
Test #27:
score: 0
Accepted
time: 129ms
memory: 3664kb
input:
100 10 89 99 13 33 31 56 100 44 22 88 14 62 66 94 57 16 74 71 86 20 70 9 10 24 26 11 4 53 40 65 49 17 29 12 78 36 58 69 39 90 41 42 34 5 93 60 97 27 23 50 96 8 43 67 37 28 47 85 2 92 51 61 95 7 68 80 46 54 18 64 75 83 84 25 15 76 98 82 19 72 81 35 3 73 79 59 87 55 38 1 91 30 45 77 6 63 21 32 52 48 9...
output:
11 1 5 14 21 38 41 65 79 89 98 99
result:
ok 12 numbers
Test #28:
score: 0
Accepted
time: 115ms
memory: 3892kb
input:
100 10 48 96 11 31 37 24 30 98 8 25 74 12 84 64 4 36 23 46 93 91 35 100 26 89 45 58 34 69 80 50 63 56 94 13 7 15 38 19 62 51 77 81 57 65 55 41 47 1 49 71 92 20 90 54 28 22 39 99 83 60 61 72 87 9 68 29 53 66 21 70 79 17 40 16 75 76 82 5 33 2 42 67 52 78 85 86 14 88 73 43 6 44 18 32 95 3 97 10 59 27 8...
output:
10 4 8 18 19 48 58 61 80 83 94
result:
ok 11 numbers
Test #29:
score: 0
Accepted
time: 129ms
memory: 3612kb
input:
100 10 90 77 6 20 11 67 22 82 27 80 19 75 92 71 48 12 36 1 49 66 25 50 86 43 37 99 34 8 26 93 79 55 95 13 33 10 4 85 98 7 69 9 16 78 81 59 52 68 2 31 88 21 97 42 35 87 73 61 57 74 62 5 17 38 58 54 32 40 47 39 18 30 65 24 15 63 44 51 60 89 83 70 84 3 72 94 23 91 56 76 28 100 41 14 96 64 29 53 46 45 9...
output:
11 1 2 19 39 40 41 53 69 85 90 94
result:
ok 12 numbers
Test #30:
score: 0
Accepted
time: 128ms
memory: 3676kb
input:
100 10 68 45 21 94 25 91 54 3 11 37 98 1 64 52 7 97 99 61 5 49 53 79 56 84 26 41 29 73 88 71 19 100 40 13 55 15 4 36 14 87 57 48 12 44 43 89 34 74 17 27 42 78 35 28 77 22 6 47 63 67 83 85 59 20 18 50 96 51 39 10 33 82 90 62 46 31 70 95 81 8 80 75 60 76 32 72 38 2 16 58 30 69 86 24 23 93 65 9 66 92 7...
output:
11 5 10 19 24 66 68 69 73 74 75 98
result:
ok 12 numbers
Test #31:
score: 0
Accepted
time: 157ms
memory: 3680kb
input:
20 11 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 ...
output:
11 1 2 3 4 5 6 7 8 9 10 11
result:
ok 12 numbers
Test #32:
score: 0
Accepted
time: 214ms
memory: 3816kb
input:
20 11 1 11 2 5 8 9 7 4 3 6 10 12 13 14 15 16 17 18 19 20 4 6 1 5 9 11 2 10 3 7 8 12 13 14 15 16 17 18 19 20 9 1 3 2 4 6 10 5 7 11 8 12 13 14 15 16 17 18 19 20 10 7 6 1 2 9 4 8 11 3 5 12 13 14 15 16 17 18 19 20 5 4 7 6 1 2 10 11 8 9 3 12 13 14 15 16 17 18 19 20 5 3 9 6 2 4 10 11 7 1 8 12 13 14 15 16 ...
output:
11 1 2 3 4 5 6 7 8 9 10 11
result:
ok 12 numbers
Test #33:
score: 0
Accepted
time: 224ms
memory: 3616kb
input:
20 11 17 2 6 16 5 3 20 7 9 10 11 19 13 14 15 4 1 18 12 8 3 2 4 1 13 9 7 8 12 10 20 15 5 11 14 16 17 6 19 18 1 19 17 4 10 13 7 15 9 14 11 8 2 12 6 16 3 18 5 20 1 11 3 13 16 6 7 18 9 10 14 12 17 2 15 8 5 4 19 20 17 2 3 4 5 7 11 20 13 16 14 12 15 18 10 9 1 6 19 8 1 2 3 10 4 6 7 11 9 5 13 12 8 14 15 20 ...
output:
18 1 2 3 4 5 6 7 9 10 11 12 13 14 16 17 18 19 20
result:
ok 19 numbers
Test #34:
score: 0
Accepted
time: 175ms
memory: 3640kb
input:
20 11 4 14 9 12 7 17 11 5 6 8 2 3 18 1 15 16 10 13 19 20 20 3 4 1 18 19 14 5 9 17 8 12 13 6 15 16 11 2 7 10 18 9 4 1 11 7 10 5 20 14 8 19 13 15 3 16 17 2 12 6 5 13 12 6 10 1 8 3 15 9 2 4 18 7 11 16 17 14 19 20 16 13 2 1 17 11 7 6 10 9 5 12 3 14 15 4 8 18 20 19 19 4 12 13 20 11 1 7 10 14 6 3 8 9 15 1...
output:
15 2 3 4 5 7 8 9 11 12 13 14 16 18 19 20
result:
ok 16 numbers
Test #35:
score: 0
Accepted
time: 157ms
memory: 3664kb
input:
100 11 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 1...
output:
11 1 2 3 4 5 6 7 8 9 10 11
result:
ok 12 numbers
Test #36:
score: 0
Accepted
time: 229ms
memory: 3684kb
input:
100 11 5 7 10 6 11 1 8 4 2 3 9 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 9...
output:
11 1 2 3 4 5 6 7 8 9 10 11
result:
ok 12 numbers
Test #37:
score: 0
Accepted
time: 205ms
memory: 3680kb
input:
100 11 1 2 77 4 5 91 7 8 9 10 11 12 13 14 15 16 17 3 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 40 35 36 37 38 39 34 41 42 43 93 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 92 94 84 64 65 66 67 68 69 70 71 72 73 74 75 76 18 78 79 95 81 82 83 63 85 61 87 88 89 90 6 86 44 62 80 96 97 98 99 100 1...
output:
16 1 2 3 4 5 6 11 12 24 40 50 57 61 77 93 98
result:
ok 17 numbers
Test #38:
score: 0
Accepted
time: 196ms
memory: 3684kb
input:
100 11 3 7 1 10 2 8 88 11 9 89 4 12 13 14 15 16 17 18 19 20 21 47 5 24 25 26 27 28 29 30 31 32 33 34 22 36 37 38 39 40 41 42 43 44 45 46 35 48 49 50 80 52 98 54 55 56 57 58 59 60 61 62 99 51 65 66 67 68 69 70 71 72 73 74 75 76 77 6 79 64 81 82 83 84 85 86 87 23 78 90 91 92 93 94 95 96 97 53 63 100 2...
output:
16 1 2 3 4 5 7 8 9 10 11 55 72 74 88 89 94
result:
ok 17 numbers
Test #39:
score: 0
Accepted
time: 150ms
memory: 3620kb
input:
100 11 2 87 95 49 39 44 45 26 34 4 8 19 40 55 10 57 99 50 94 16 79 78 5 69 25 23 81 27 29 91 31 64 62 96 53 9 74 15 20 13 72 42 85 22 38 46 47 75 63 66 52 65 18 54 37 58 88 98 68 89 90 33 77 11 61 6 67 100 24 70 71 93 36 32 60 28 73 17 86 43 14 84 41 59 80 1 35 12 56 83 30 92 21 97 7 3 51 48 76 82 6...
output:
13 1 2 16 18 21 22 32 41 62 71 72 81 87
result:
ok 14 numbers
Test #40:
score: 0
Accepted
time: 130ms
memory: 3664kb
input:
100 11 36 41 31 39 19 82 56 65 45 17 18 89 13 14 96 74 12 40 76 20 97 6 34 77 57 8 60 3 29 50 53 32 44 15 10 72 21 63 23 79 38 2 75 55 42 84 16 48 61 52 4 59 86 80 92 64 54 24 30 46 83 62 22 1 51 66 67 68 69 70 11 43 73 35 47 25 27 78 94 26 81 37 5 99 85 98 9 88 58 90 91 28 93 95 71 87 49 33 7 100 5...
output:
11 5 13 19 36 39 57 58 74 75 87 91
result:
ok 12 numbers
Test #41:
score: 0
Accepted
time: 133ms
memory: 3612kb
input:
100 11 34 45 39 27 5 63 38 74 100 79 21 30 80 7 47 84 96 11 83 67 16 59 57 94 62 58 10 89 20 43 82 66 23 85 42 25 75 98 35 51 88 44 86 40 54 28 46 95 17 77 64 48 91 18 92 97 52 41 61 4 53 36 90 13 76 14 65 81 73 2 8 24 49 87 70 26 99 9 15 37 60 69 33 55 22 93 71 78 68 29 32 19 12 50 56 31 1 3 6 72 4...
output:
11 11 23 31 34 40 49 63 65 88 96 99
result:
ok 12 numbers
Test #42:
score: 0
Accepted
time: 140ms
memory: 3664kb
input:
100 11 46 7 34 12 75 33 99 92 41 45 10 1 47 78 8 84 3 36 16 18 17 6 49 35 5 25 65 80 86 37 48 97 90 4 58 19 77 54 67 98 82 79 23 94 100 27 95 81 43 51 91 87 32 70 31 85 53 83 39 61 11 73 57 93 69 64 20 40 28 50 22 62 88 24 9 21 2 76 42 56 15 13 52 44 68 30 71 29 60 38 63 96 66 72 74 59 55 89 14 26 2...
output:
12 1 2 4 7 19 25 39 46 49 88 96 97
result:
ok 13 numbers