QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#786394 | #1858. Sum | ucup-team5217 | AC ✓ | 417ms | 19676kb | C++23 | 6.4kb | 2024-11-26 21:20:44 | 2024-11-26 21:20:51 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int n,m,k,p;
ll qpow(ll a,ll b){
ll ans=1;
while(b){
if(b&1) ans=ans*a%p;
a=a*a%p;
b>>=1;
}
return ans;
}
ll mul(ll x,ll y){
return x*qpow(y,p-2)%p;
}
vector<ll> operator-(vector<ll> a,vector<ll> b){
int sz=a.size();
for(int i=0;i<sz;i++) a[i]=((a[i]-b[i])%p+p)%p;
return a;
}
vector<ll> operator+(vector<ll> a,vector<ll> b){
int sz=a.size();
for(int i=0;i<sz;i++) a[i]=((a[i]+b[i]%p)%p+p)%p;
return a;
}
vector<ll> operator*(vector<ll> a,ll t){
int sz=a.size();
for(int i=0;i<sz;i++) a[i]=t*a[i]%p;
return a;
}
bool iszero(vector<ll> a){
for(auto i:a) if(i) return false;
return true;
}
void solve(void) {
cin>>n>>m>>k>>p;
vector<vector<ll>> mp(n,vector<ll>(m,0));
for(int i=0;i<n;i++){
for(int j=0;j<m;j++) cin>>mp[i][j];
}
bool sp=0;
if(n<m){
sp=1;
swap(n,m);
vector<vector<ll>> np(n,vector<ll>(m,0));
for(int i=0;i<n;i++){
for(int j=0;j<m;j++) np[i][j]=mp[j][i];
}
mp=np;
}
vector<vector<ll>> checker=mp;
int ji_num=0;
vector<vector<ll>> bt(m);
for(int i=0;i<n;i++){
vector<ll> jp=mp[i];
for(int j=0;j<m;j++){
if(jp[j]){
if(bt[j].empty()) {bt[j]=jp;ji_num++;break;}
else{
jp=jp-bt[j]*(jp[j]*qpow(bt[j][j],p-2)%p);
}
}
}
}
// cerr<<"???"<<ji_num<<'\n';
// cerr<<"!!!"<<ji_num<<'\n';
// for(int i=0;i<ji_num;i++){
// for(auto j:bt[i]) cerr<<j<<' ';
// cerr<<'\n';
// }
// for(int i=0;i<n;i++){
// for(int j=0;j<m;j++) cerr<<mp[i][j]<<' ';
// cerr<<'\n';
// }
if(ji_num>k) {cout<<"No solution!\n";return ;}
vector<vector<ll>> a(n,vector<ll>(k));
vector<vector<ll>> b(k,vector<ll>(m));
if(ji_num==0){
if(k==1){
cout<<"No solution!\n";
return ;
}
if(m==1&&n==1){
if(p==2){
if(k%2==0){
a.assign(n,vector<ll>(k,1));
b.assign(k,vector<ll>(m,1));
}
else{
cout<<"No solution!\n";
return ;
}
}
else {
a.assign(n,vector<ll>(k,1));
b.assign(k,vector<ll>(m,1));
ll dw=(p-1ll*(k-1)*(k-1)%p)%p;
if(dw==0){
a[0][k-2]=2;
dw=p-1;
}
a[0][k-1]=dw;
}
}
else{
b.assign(k,vector<ll>(m,1));
for(int i=0;i<k-1;i++){
a[0][i]=1;
}
a[0][k-1]=(p-(k-1)%p)%p;
a[1][0]=a[0][k-1];
for(int j=1;j<k;j++) a[1][j]=a[0][j-1];
for(int j=2;j<n;j++) a[j]=a[0];
}
}
else{
if(m==1&&n==1&&p==2){
if(k%2==1){
a.assign(n,vector<ll>(k,1));
b.assign(k,vector<ll>(m,1));
}
else{
cout<<"No solution!\n";
return ;
}
}
else{
int tot=0;
for(int i=0;i<m;i++){
if(!bt[i].empty()){
for(int j=0;j<m;j++){
b[tot][j]=bt[i][j];
}
tot++;
}
}
vector<int> ko;
for(int i=0;i<n;i++){
bool fm=false;
for(int j=0;j<m;j++){
fm=(fm|(mp[i][j]!=0));
}
if(!fm) ko.push_back(i);
}
if(ko.size()&&ji_num!=k){
b[tot]=b[0];
for(auto j:ko){
a[j][0]=1;a[j][tot]=(p-1);
}
tot++;
}
auto get=[&](vector<ll> x)->vector<ll> {
vector<ll> res;
for(int i=0;i<m;i++){
if(bt[i].size()){
res.push_back(x[i]*qpow(bt[i][i],p-2)%p);
x=x-bt[i]*res.back();
}
}
return res;
};
for(int j=tot;j<k;j++){
b[j]=b[0];
a[0][j]=1;
mp[0]=mp[0]-b[0];
}
vector<ll> happy=get(mp[0]);
if(ko.empty()&&iszero(happy)){
for(int j=tot;j<k;j++){
a[0][j]=0;
a[1][j]=1;
mp[0]=mp[0]+b[0];
mp[1]=mp[1]-b[0];
}
}
for(int i=0;i<n;i++){
bool fm=false;
for(int j=0;j<m;j++){
fm=(fm|(mp[i][j]!=0));
}
if(!fm) continue;
// cerr<<"?"<<i<<'\n';
vector<ll> gt=get(mp[i]);
for(int j=0;j<gt.size();j++) a[i][j]=gt[j];
}
}
}
if(sp){
for(int i=0;i<k;i++){
for(int j=0;j<m;j++) cout<<b[i][j]<<' ';
for(int j=0;j<n;j++) cout<<a[j][i]<<' ';
cout<<'\n';
}
}
else{
for(int i=0;i<k;i++){
for(int j=0;j<n;j++) cout<<a[j][i]<<' ';
for(int j=0;j<m;j++) cout<<b[i][j]<<' ';
cout<<'\n';
}
}
// for(int i=0;i<n;i++){
// for(int j=0;j<k;j++) cerr<<a[i][j]<<' ';
// cerr<<'\n';
// }
// for(int i=0;i<k;i++){
// for(int j=0;j<m;j++) cerr<<b[i][j]<<' ';
// cerr<<'\n';
// }
// cerr<<"\n\n";
// for(int i=0;i<n;i++){
// for(int j=0;j<m;j++){
// for(int z=0;z<k;z++){
// checker[i][j]=(checker[i][j]-a[i][z]*b[z][j]%p)%p;
// }
// if(checker[i][j]) assert(0);
// }
// }
}
int main() {
ios::sync_with_stdio(false), cin.tie(nullptr);
int _ = 1;
while (_--) solve();
return 0;
}
/*
3 3 2 7
1 2 1
2 4 2
1 1 1
*/
詳細信息
Test #1:
score: 100
Accepted
time: 0ms
memory: 3844kb
input:
1 1 1 97 0
output:
No solution!
result:
ok You are right!
Test #2:
score: 0
Accepted
time: 0ms
memory: 3824kb
input:
3 3 1 97 1 2 3 2 4 6 3 6 9
output:
1 2 3 1 2 3
result:
ok You are right!
Test #3:
score: 0
Accepted
time: 417ms
memory: 6784kb
input:
301 332 258 1000000007 18894535 383622714 716263210 987288497 290535375 800334670 784889172 408567153 465001559 215171296 869906323 22372790 600116865 422468075 863857835 873395360 659982322 959645087 569266813 646421315 380550504 590982323 724500866 358946392 969376763 475742086 542352358 663357730...
output:
18894535 497342965 107919094 390112079 877621152 766166650 593790136 804269523 80719073 887957077 956103549 155193938 619953665 90527913 690081153 701609051 704327471 248038769 20041087 244987848 738704974 439854615 115347801 446207123 931106616 748638597 695516364 778693628 350568351 91100403 77473...
result:
ok You are right!
Test #4:
score: 0
Accepted
time: 4ms
memory: 4416kb
input:
1 1 20477 1000000007 844625586
output:
999979532 844625586 1 844625586 1 844625586 1 844625586 1 844625586 1 844625586 1 844625586 1 844625586 1 844625586 1 844625586 1 844625586 1 844625586 1 844625586 1 844625586 1 844625586 1 844625586 1 844625586 1 844625586 1 844625586 1 844625586 1 844625586 1 844625586 1 8446...
result:
ok You are right!
Test #5:
score: 0
Accepted
time: 9ms
memory: 11036kb
input:
47529 2 1 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:
No solution!
result:
ok You are right!
Test #6:
score: 0
Accepted
time: 11ms
memory: 18004kb
input:
90156 1 1 1000000007 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 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:
No solution!
result:
ok You are right!
Test #7:
score: 0
Accepted
time: 85ms
memory: 5708kb
input:
550 181 40 1000000007 642370688 869675473 553431272 664327799 32082231 714218670 877725594 494118328 248370718 851042363 578169641 83739220 557925334 285469293 504618640 872843005 313362693 658086101 977676376 523526497 290308958 13976769 345452564 78007734 435198953 916127933 208065079 31796600 910...
output:
1 235722667 773173355 678495705 658164454 870021898 3107842 525230601 662284056 441138631 502965948 594619223 110650827 890015495 978341599 728280326 285256067 730471272 130522272 64877468 780823709 22451087 319934979 758577978 1167890 380153320 951122640 734727540 728192837 804775443 245300676 3648...
result:
ok You are right!
Test #8:
score: 0
Accepted
time: 7ms
memory: 8236kb
input:
29860 3 1 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:
No solution!
result:
ok You are right!
Test #9:
score: 0
Accepted
time: 75ms
memory: 5804kb
input:
858 116 73 1000000007 406861903 20589420 885586225 458353470 295316310 975824837 76893827 251976194 923858020 513272453 849239266 669955210 790097808 804184359 544008879 620375843 116085571 966642409 998630849 681654433 306362294 556223577 542684858 348074936 715444116 302344248 150536209 840843473 ...
output:
999999967 227580205 461871693 129556104 22228869 169811240 60371025 342420629 962817899 686555209 858666273 644354430 413484802 774325410 265676187 176745085 440688713 558419786 928901739 825520562 752214116 150168774 984351333 636880213 547765771 515639780 568312477 410702045 751516649 135496322 57...
result:
ok You are right!
Test #10:
score: 0
Accepted
time: 32ms
memory: 6004kb
input:
822 121 106 2 1 1 0 1 0 0 0 0 0 0 0 0 1 1 0 0 0 1 1 1 0 0 1 1 0 1 1 0 0 1 1 0 0 1 0 1 1 1 1 0 1 0 1 0 0 1 0 0 0 1 0 0 1 1 0 1 0 0 1 1 1 0 1 1 1 1 0 0 0 1 0 0 0 1 1 1 1 0 1 1 0 0 1 1 0 0 0 1 1 0 0 1 1 0 1 0 0 0 1 0 0 0 1 1 0 1 0 1 1 0 0 0 1 1 1 0 0 0 1 0 0 0 0 1 0 1 1 0 0 1 1 1 1 0 0 1 0 0 0 0 0 1 0 ...
output:
1 0 0 1 1 1 1 1 0 1 0 1 0 1 1 0 0 1 0 0 1 0 1 1 1 0 1 1 1 0 0 1 1 0 1 1 0 1 1 1 0 0 1 0 1 1 0 1 1 0 1 1 0 0 1 1 1 0 0 0 0 0 1 1 0 1 1 0 0 1 1 1 1 0 0 1 1 1 1 1 0 0 1 1 0 0 0 0 0 1 0 1 0 1 0 0 0 1 0 0 0 1 1 0 1 0 1 0 1 0 0 0 1 0 0 1 1 0 1 1 0 0 1 1 1 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 0 0 ...
result:
ok You are right!
Test #11:
score: 0
Accepted
time: 245ms
memory: 6460kb
input:
346 289 251 2 1 0 0 0 1 0 0 1 1 1 1 0 1 1 1 1 0 0 0 0 0 1 1 1 0 0 1 0 1 0 1 1 0 1 0 1 0 1 1 0 1 0 0 0 1 1 1 0 0 1 1 1 1 0 0 0 0 0 1 1 1 0 1 0 1 0 0 1 1 0 0 1 0 1 0 1 0 0 1 1 1 0 1 1 1 0 1 1 1 1 1 1 1 1 0 1 0 0 1 1 0 1 1 1 1 1 1 1 0 0 0 1 1 1 0 1 1 0 1 0 1 0 0 1 1 1 1 0 1 1 0 0 0 1 0 0 1 1 0 1 1 1 0 ...
output:
1 0 1 0 0 0 1 0 0 0 0 0 0 1 1 0 1 1 0 1 0 0 1 1 0 0 0 0 1 0 0 0 1 1 0 0 0 1 0 0 1 1 0 0 0 0 0 1 0 0 1 1 0 0 1 1 1 0 1 1 1 0 0 1 0 1 1 0 0 1 0 1 0 1 1 0 0 0 0 1 0 0 0 0 1 0 0 1 0 0 1 0 1 0 1 1 1 1 0 1 0 1 0 1 1 1 1 1 0 0 0 0 1 0 1 0 1 1 0 1 1 0 0 1 1 0 0 0 1 1 0 1 1 1 1 0 1 1 1 0 1 0 1 1 1 0 0 0 1 0 ...
result:
ok You are right!
Test #12:
score: 0
Accepted
time: 3ms
memory: 8848kb
input:
35081 2 1 1000000007 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 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:
No solution!
result:
ok You are right!
Test #13:
score: 0
Accepted
time: 276ms
memory: 6224kb
input:
774 129 129 1000000007 946235372 385981952 130067865 726244125 158539165 210106783 350596868 804480046 101400814 833650975 212428406 67021285 43894403 179692251 950025502 970422970 174595960 368312011 48852962 525897796 879136304 61485759 827012283 113203513 910323139 966079374 574200932 121675217 8...
output:
1 560082863 826096312 164752336 643317027 639150508 412044838 267080168 156509266 234052975 441282260 257593859 948739542 725990392 698367130 902711080 377360737 83848161 256035823 750110712 639131725 575085743 378871689 482566322 403858694 612335107 771718727 227493438 857632060 61902566 127762770 ...
result:
ok You are right!
Test #14:
score: 0
Accepted
time: 81ms
memory: 5496kb
input:
117 854 63 2 0 1 1 0 0 1 1 0 1 0 1 1 0 1 1 0 0 1 1 1 1 1 0 0 1 1 1 0 1 0 0 0 0 1 1 0 1 1 0 1 0 1 1 1 0 1 0 0 1 1 1 0 0 1 0 0 1 1 1 1 1 0 1 0 1 0 0 1 1 1 0 1 1 1 0 1 0 0 0 0 1 0 0 0 1 0 1 0 0 0 0 0 1 1 0 0 0 0 1 1 0 0 0 0 1 1 0 1 0 1 1 1 1 0 0 1 1 0 0 0 1 0 0 1 1 0 0 0 1 0 1 0 0 0 1 1 0 1 0 0 0 1 0 0...
output:
1 1 0 0 1 1 0 0 0 0 1 1 0 0 1 0 1 0 1 0 1 0 0 1 0 1 0 1 0 1 0 1 0 0 1 0 0 1 1 1 1 1 1 1 0 1 0 0 1 1 0 1 1 0 1 1 0 1 1 0 0 1 0 0 1 0 1 0 1 0 0 1 0 1 1 1 0 0 1 1 0 0 0 1 0 1 0 1 1 0 0 0 0 1 0 0 1 1 0 1 0 0 1 0 0 1 0 1 0 1 1 0 0 1 0 0 0 0 1 1 0 0 1 1 0 1 0 1 1 0 1 1 0 0 1 1 1 1 1 0 0 1 1 1 0 1 0 0 0 0 ...
result:
ok You are right!
Test #15:
score: 0
Accepted
time: 3ms
memory: 6788kb
input:
18915 5 1 1000000007 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 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:
No solution!
result:
ok You are right!
Test #16:
score: 0
Accepted
time: 33ms
memory: 7536kb
input:
20919 4 4 1000000007 326249534 849951427 687543290 716346967 729119960 815645057 665549733 55054651 159299681 15056429 29690021 194568946 599659368 443940977 933421469 778366831 838878721 121273656 621699687 107354942 533536262 54545619 589183192 851753273 826509772 598840225 803698864 869088764 751...
output:
1000000006 960055486 395346735 246421836 460361635 390020399 650083400 699028316 540921235 801044825 762552136 662886499 115565579 247039432 804883186 121918369 428906251 122139755 293038512 445912850 42010955 400064145 168576000 727409873 551160443 957259198 841377094 552330203 368663190 722811496 ...
result:
ok You are right!
Test #17:
score: 0
Accepted
time: 9ms
memory: 11208kb
input:
48946 2 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 You are right!
Test #18:
score: 0
Accepted
time: 50ms
memory: 14144kb
input:
67661 1 1 1000000007 184899031 877109097 78252988 49498056 434672455 431998408 892859600 865741312 110995390 405202647 921959228 723269123 362011150 822353573 442081657 941212375 102809010 679708654 925917629 185789476 586389858 98859335 746234404 44985564 980942186 271725737 233346501 790335526 563...
output:
1 783158982 899494672 578645887 438609946 438773684 512706757 664121559 254854848 142080499 680842653 131804476 694275019 730957042 331655891 884875541 350596405 264425745 354677426 374581004 41605738 732362589 301022038 322071063 51790223 74480057 457217214 235307026 96881128 580202284 974219717 13...
result:
ok You are right!
Test #19:
score: 0
Accepted
time: 16ms
memory: 5244kb
input:
919 108 4 1000000007 474518067 417426307 980424431 383759542 25082944 435191335 916925509 657483070 4050187 191567666 899420441 635082973 490464302 353915823 685019869 66243540 911639592 262003249 421399941 109047757 64944163 587580756 599623491 307008074 596328480 878622736 872387834 635355539 9815...
output:
1 494075335 464791309 140786264 31108698 530619806 635631025 317565835 952346885 338203312 584183845 56701561 794729382 747440445 176057290 14381675 392365416 309567392 179898959 127597613 654043132 321006895 45073760 451290315 906666730 251453911 449869439 875940907 226066677 736001589 742340757 99...
result:
ok You are right!
Test #20:
score: 0
Accepted
time: 55ms
memory: 7808kb
input:
23504 4 3 1000000007 901006047 41092093 945253190 362091035 227872646 454288038 97313688 384255295 695805700 691836982 610077607 715586672 309968042 621607392 936438035 39454064 390080616 738727685 584188553 18088297 322954635 533419405 432137310 863479863 855605624 36092916 866439565 761111555 7560...
output:
1 268680412 273608809 656560927 86976293 882174279 248712460 196175023 512489316 542236328 842775960 484939757 30498460 995627017 228586533 122503060 448629509 805186059 376707209 93979633 392021973 753794480 409240662 619783403 898413807 771973746 794041599 15396343 224965835 310738854 529989177 37...
result:
ok You are right!
Test #21:
score: 0
Accepted
time: 155ms
memory: 6252kb
input:
560 178 156 1000000007 77439083 526341954 546074829 18155349 199676170 671873166 211001098 975008548 572330163 44871582 363264354 917712483 183365049 843007094 386933761 227295312 735193409 106967056 351445397 96242790 862230378 296130063 12697731 12624012 521303696 994252966 328793570 289267164 678...
output:
999999924 550977355 782893530 118218501 961530204 546393221 882026135 950803719 985956707 694568238 67722039 805346806 114719144 256260367 137345355 394103560 448299392 340880082 621811482 828177298 222349700 646241986 109542547 991609015 899046401 358915405 465970159 970184245 988909013 41674377 41...
result:
ok You are right!
Test #22:
score: 0
Accepted
time: 50ms
memory: 8316kb
input:
31381 3 2 1000000007 970648174 816557836 221795988 835009074 123717054 619030467 197767713 291973933 878816880 490612532 326303839 59983081 728810824 888147436 260539418 139398710 244446645 732743327 270640782 598608664 38485065 968264943 275179014 643153868 14205681 388765005 104514507 88061669 585...
output:
1 965159190 146948977 200120570 416473491 541347042 930943799 29051066 416275572 82451407 167783636 659202445 816113388 667839674 960122473 162271252 380758855 729063995 500982330 681949269 511993599 800057024 27898934 858839240 298998579 239321707 420880012 413405749 122014536 316782097 990304933 6...
result:
ok You are right!
Test #23:
score: 0
Accepted
time: 7ms
memory: 6324kb
input:
3703 27 27 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 0 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 You are right!
Test #24:
score: 0
Accepted
time: 327ms
memory: 6224kb
input:
491 203 185 1000000007 656699684 692957010 50943985 1909454 299456032 682207888 242759099 419002483 4529808 571838879 872522437 309463803 431167248 968396209 310231488 988603756 396244975 645306119 213189717 27469283 720848545 113169320 909035829 807659525 708760301 633853766 45454550 186121592 9610...
output:
999999996 497219809 514045062 547593559 175225298 711962761 96611702 177905204 139949136 230220561 224846776 458310253 922719825 616456950 424053640 979181212 627020427 362126882 657735887 744311588 91944905 531319384 619800594 683445543 245511308 893539194 95038301 732454196 968145679 898275513 904...
result:
ok You are right!
Test #25:
score: 0
Accepted
time: 8ms
memory: 5880kb
input:
194 515 189 1000000007 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 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 You are right!
Test #26:
score: 0
Accepted
time: 2ms
memory: 4504kb
input:
1 1 20648 1000000007 948738783
output:
999979361 948738783 1 948738783 1 948738783 1 948738783 1 948738783 1 948738783 1 948738783 1 948738783 1 948738783 1 948738783 1 948738783 1 948738783 1 948738783 1 948738783 1 948738783 1 948738783 1 948738783 1 948738783 1 948738783 1 948738783 1 948738783 1 948738783 1 9487...
result:
ok You are right!
Test #27:
score: 0
Accepted
time: 15ms
memory: 18860kb
input:
96748 1 1 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:
No solution!
result:
ok You are right!
Test #28:
score: 0
Accepted
time: 56ms
memory: 5432kb
input:
109 917 37 2 0 1 0 0 1 1 0 0 0 1 0 1 0 0 1 1 1 1 0 0 0 1 1 0 0 0 0 1 0 0 0 0 0 1 1 1 0 0 0 1 1 1 1 1 1 1 0 1 0 1 1 1 1 1 0 1 0 1 1 1 0 1 1 1 1 1 0 1 1 0 1 0 1 1 1 0 0 0 0 1 1 0 1 0 1 0 1 1 1 1 1 0 0 0 0 1 0 0 0 1 0 0 1 0 0 1 1 0 1 1 0 1 1 0 1 0 1 1 1 0 1 0 1 0 0 0 1 1 0 0 0 0 1 1 1 0 1 1 1 1 1 1 0 1...
output:
1 0 1 0 0 0 1 0 0 1 0 1 0 0 0 0 0 1 0 0 0 1 0 0 0 1 1 0 1 0 1 1 0 1 1 1 0 0 0 1 1 0 1 0 0 0 1 1 1 1 0 1 1 1 1 1 1 0 1 1 1 0 0 1 0 1 0 1 0 1 0 1 0 1 1 0 0 1 0 1 1 1 0 0 1 1 1 1 0 1 0 1 1 1 1 1 1 1 1 1 1 0 0 0 1 0 0 1 0 0 1 0 0 1 1 0 0 0 1 0 1 0 0 1 1 1 1 0 0 0 1 1 0 0 0 0 1 0 0 0 0 0 1 1 1 0 0 0 1 1 ...
result:
ok You are right!
Test #29:
score: 0
Accepted
time: 59ms
memory: 6128kb
input:
8394 11 9 1000000007 552190293 408298859 377673219 529857763 846334409 82884509 293001030 629755661 516567106 921240728 883223157 898740083 360254547 942346369 41079921 834059646 325723333 102874878 175696388 17472865 776873718 714001370 250597469 942756515 542227204 64195229 951491365 499184617 507...
output:
1 298920328 862151015 407902766 610749078 801556539 339248924 104146416 470208918 315088219 851070536 179163309 620771337 39400507 144941723 567028053 804254251 502876376 995110446 584436275 879995330 697464112 864154499 311683828 85660080 462891747 737950070 992502383 339235038 684531930 94289134 3...
result:
ok You are right!
Test #30:
score: 0
Accepted
time: 5ms
memory: 9932kb
input:
40936 2 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 You are right!
Test #31:
score: 0
Accepted
time: 8ms
memory: 7744kb
input:
1 1 67362 2 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 ...
result:
ok You are right!
Test #32:
score: 0
Accepted
time: 4ms
memory: 5228kb
input:
348 287 1 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:
No solution!
result:
ok You are right!
Test #33:
score: 0
Accepted
time: 15ms
memory: 8140kb
input:
29462 3 2 2 0 0 0 1 0 1 0 0 0 1 0 1 0 0 1 0 0 1 1 0 0 0 0 1 1 0 1 0 0 0 1 0 1 0 0 1 1 0 0 1 0 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 1 0 1 1 0 0 1 0 1 1 0 0 0 0 1 0 0 1 0 0 1 0 0 1 1 0 0 1 0 1 0 0 1 1 0 1 0 0 0 1 0 1 1 0 0 1 0 1 1 0 0 0 0 0 1 0 1 0 0 1 1 0 0 1 0 1 0 0 1 0 0 1 0 0 0 0 0 1 1 0 0 0 0 0 ...
output:
0 1 0 1 0 0 1 0 1 0 1 0 1 1 1 0 0 0 0 1 1 1 1 1 0 0 0 0 1 1 0 1 0 1 1 1 1 0 1 0 1 1 0 0 0 0 1 0 0 0 1 1 1 0 1 1 0 1 0 1 0 1 1 0 1 1 0 0 0 1 0 1 0 0 0 1 0 1 0 1 1 1 1 1 0 0 0 0 1 0 0 1 0 1 0 1 1 1 1 1 0 0 0 0 1 0 0 0 0 0 1 0 1 1 0 1 0 1 1 1 0 0 0 1 1 0 1 0 1 1 0 1 0 1 0 0 1 1 1 1 1 1 0 0 1 1 1 1 1 1 ...
result:
ok You are right!
Test #34:
score: 0
Accepted
time: 58ms
memory: 14672kb
input:
71023 1 1 1000000007 730198460 530228070 270834736 376681002 29173916 120511635 849321099 998248099 624824133 67706824 65150433 931786533 954477564 222457060 325851365 937845000 131860842 136059335 953771708 122913348 149125221 179586731 266241717 235129973 220297721 932484344 95739738 229628707 437...
output:
1 829038334 314705832 832645030 744757714 444196770 901807008 789078613 745990214 662775448 972125285 398381125 743436836 600454407 375347145 831482807 223605587 381936956 361594790 52730235 451419412 108892352 254351085 866243741 115357704 236715824 815119783 266185580 486028275 477348322 976143335...
result:
ok You are right!
Test #35:
score: 0
Accepted
time: 0ms
memory: 5616kb
input:
562 177 35 1000000007 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 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 999999973 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 You are right!
Test #36:
score: 0
Accepted
time: 4ms
memory: 5164kb
input:
408 245 1 1000000007 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 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:
No solution!
result:
ok You are right!
Test #37:
score: 0
Accepted
time: 251ms
memory: 6388kb
input:
452 221 193 2 1 1 0 0 1 0 0 0 0 0 0 1 1 1 0 0 0 0 0 1 0 0 0 0 1 1 0 0 0 1 0 0 0 0 1 1 0 0 1 1 1 1 1 0 0 1 0 1 0 1 1 1 0 0 0 1 1 1 1 0 1 1 1 0 1 0 0 0 0 1 0 1 0 1 0 0 1 0 1 1 1 0 0 0 0 1 0 0 1 1 1 1 0 0 1 1 1 0 1 0 0 0 1 0 1 0 0 1 0 0 1 1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1 1 1 1 1 0 1 1 0 0 1 1 0 1 0 1 1 ...
output:
1 0 0 1 0 0 1 0 0 1 0 1 1 0 1 1 0 1 1 0 0 0 0 1 0 0 1 1 0 1 0 1 1 0 1 1 0 1 0 1 0 1 0 1 1 1 1 0 0 0 1 0 1 0 0 1 0 1 0 1 0 0 1 1 0 1 1 1 1 0 0 0 0 0 1 0 0 1 1 1 0 1 0 0 1 0 0 0 0 0 1 0 1 1 1 0 0 1 1 0 0 1 0 1 1 0 0 1 0 1 1 1 1 0 1 1 0 1 0 1 1 1 0 1 0 1 1 0 0 0 0 1 1 1 0 0 1 0 1 1 1 0 0 0 1 1 0 0 1 0 ...
result:
ok You are right!
Test #38:
score: 0
Accepted
time: 10ms
memory: 13208kb
input:
60329 1 1 1000000007 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 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:
No solution!
result:
ok You are right!
Test #39:
score: 0
Accepted
time: 18ms
memory: 6116kb
input:
816 122 90 2 1 1 1 0 0 1 0 0 0 0 1 0 0 1 1 0 1 0 1 1 0 1 1 1 1 1 0 1 0 1 1 0 1 1 0 0 0 0 1 0 1 1 0 1 0 1 1 0 1 0 0 0 1 0 0 1 1 1 1 0 0 1 0 1 1 1 0 1 0 1 0 0 1 0 1 0 0 0 1 0 1 0 1 0 1 0 0 0 1 0 1 1 0 1 0 0 1 0 1 0 1 1 1 1 1 1 0 0 0 0 0 1 1 0 0 0 1 0 0 1 1 0 0 0 0 0 0 0 0 1 0 1 1 1 0 0 1 1 1 1 0 1 0 1...
output:
0 0 0 0 0 0 1 0 0 1 1 1 1 1 0 1 1 0 1 0 1 1 0 1 1 0 1 0 0 1 0 1 0 0 0 1 0 1 1 1 1 0 0 1 0 1 1 1 1 1 0 0 1 0 1 1 0 0 0 0 1 0 0 1 0 1 0 0 0 1 1 0 1 0 1 0 0 0 1 0 1 0 1 1 1 1 0 0 1 1 0 1 0 1 1 1 1 1 1 1 1 0 1 0 1 1 0 1 1 1 0 0 1 0 0 1 1 1 0 0 1 0 0 1 1 0 1 1 1 0 1 1 0 0 1 0 0 1 0 0 0 0 1 0 1 1 1 0 0 0 ...
result:
ok You are right!
Test #40:
score: 0
Accepted
time: 4ms
memory: 9888kb
input:
41051 2 1 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:
No solution!
result:
ok You are right!
Test #41:
score: 0
Accepted
time: 6ms
memory: 16968kb
input:
84025 1 1 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:
No solution!
result:
ok You are right!
Test #42:
score: 0
Accepted
time: 81ms
memory: 6176kb
input:
95 1052 94 2 1 0 0 0 1 1 0 1 0 0 0 1 1 0 0 0 0 1 1 0 1 0 0 0 0 1 1 1 0 1 1 1 1 0 1 1 1 0 1 0 0 1 1 0 1 1 1 0 1 0 0 0 0 1 0 1 0 0 0 0 1 0 1 1 0 0 1 1 1 0 0 0 0 0 0 1 1 1 1 0 0 1 0 0 0 1 1 0 0 1 0 0 0 1 1 1 1 0 0 1 1 0 0 0 1 0 1 0 0 1 1 1 0 0 1 0 0 1 1 1 0 0 1 1 0 0 1 0 1 1 1 0 0 0 0 0 1 1 1 1 1 1 0 0...
output:
1 1 0 1 0 0 1 1 1 1 1 0 0 0 0 1 1 1 1 0 1 0 0 0 0 1 1 0 1 1 1 1 1 1 0 0 1 0 0 1 0 1 0 1 1 0 1 1 1 1 1 1 0 1 0 1 0 0 1 1 0 1 0 1 0 0 1 1 0 0 0 1 0 0 1 1 0 0 0 0 1 1 1 0 0 1 0 1 1 1 0 1 0 1 1 1 0 0 0 1 1 0 1 0 0 0 1 1 0 0 0 0 1 1 0 1 0 0 0 0 1 1 1 0 1 1 1 1 0 1 1 1 0 1 0 0 1 1 0 1 1 1 0 1 0 0 0 0 1 0 ...
result:
ok You are right!
Test #43:
score: 0
Accepted
time: 291ms
memory: 6096kb
input:
375 266 160 1000000007 665229625 311086081 632197771 499612917 883095465 786347251 881814341 692401999 719669461 320851359 308552168 339968038 29165950 828866603 540044345 984601821 199416271 38167001 254625273 455045630 462241457 877152212 674262759 224803008 864176770 585465873 135730725 837716892...
output:
1 49356341 430279481 782631014 555144856 422050309 774781015 502129631 427751035 98940122 912779762 210559804 503976427 890178202 235491986 792114371 159502850 784863052 656892099 87499114 411193088 117882069 514665624 778984412 526892954 796326140 328118680 71385063 492066548 104108196 297609879 98...
result:
ok You are right!
Test #44:
score: 0
Accepted
time: 13ms
memory: 16708kb
input:
81608 1 1 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:
No solution!
result:
ok You are right!
Test #45:
score: 0
Accepted
time: 117ms
memory: 5708kb
input:
806 124 51 1000000007 789443102 270242310 189650527 559275913 640408242 78622510 322504808 563281153 267640213 492363381 791240399 20912152 385906729 394412203 225388825 890031580 936412624 574161811 227200865 688781512 41779343 389077796 113367729 463981679 811880450 903694208 86753107 897437984 93...
output:
1 918287887 911322198 270113609 102779399 64887771 839517806 300673065 856999105 484352390 558431867 459261399 834845652 574998390 554126269 304368005 595665865 864802675 721153295 925523380 986322018 677326139 443565618 770234940 508257308 82888716 852522270 261016103 35788356 456958954 649817674 7...
result:
ok You are right!
Test #46:
score: 0
Accepted
time: 4ms
memory: 5432kb
input:
124 806 1 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:
No solution!
result:
ok You are right!
Test #47:
score: 0
Accepted
time: 126ms
memory: 6052kb
input:
472 211 89 2 0 1 1 1 0 1 0 0 1 1 1 0 1 1 1 0 1 0 0 0 1 0 0 0 1 0 0 1 0 1 0 0 1 1 1 0 1 1 1 0 1 0 0 1 1 1 0 1 1 0 1 1 1 1 0 0 1 0 0 1 0 1 0 1 0 0 0 1 1 0 1 1 1 1 0 0 1 1 1 0 0 1 0 1 0 0 1 0 1 1 1 0 1 0 1 0 0 1 0 0 0 0 1 0 0 0 0 0 0 1 1 1 1 0 1 0 1 0 1 1 0 0 1 1 0 0 1 1 0 0 0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0 0 1 0 0 1 1 1 1 0 1 1 0 0 0 0 1 1 1 1 0 0 1 1 0 0 1 1 1 1 1 0 1 1 0 1 0 1 0 0 1 1 0 0 0 0 1 0 0 1 1 1 0 0 1 0 1 0 0 1 1 0 1 0 0 1 0 1 1 0 1 0 0 1 0 1 1 1 1 0 0 0 1 0 0 0 0 0 0 0 1 1 1 1 1 1 0 1 0 1 0 0 1 0 0 1 0 0 0 0 1 1 0 0 0 ...
result:
ok You are right!
Test #51:
score: 0
Accepted
time: 0ms
memory: 9428kb
input:
1 1 99999 2 0
output:
No solution!
result:
ok You are right!
Test #52:
score: 0
Accepted
time: 5ms
memory: 9364kb
input:
1 1 100000 2 1
output:
No solution!
result:
ok You are right!
Test #53:
score: 0
Accepted
time: 0ms
memory: 3560kb
input:
1 1 1 2 0
output:
No solution!
result:
ok You are right!
Test #54:
score: 0
Accepted
time: 0ms
memory: 3836kb
input:
1 1 1 2 1
output:
1 1
result:
ok You are right!
Test #55:
score: 0
Accepted
time: 0ms
memory: 3636kb
input:
1 1 2 2 1
output:
No solution!
result:
ok You are right!
Test #56:
score: 0
Accepted
time: 0ms
memory: 3828kb
input:
1 1 2 2 0
output:
1 1 1 1
result:
ok You are right!
Test #57:
score: 0
Accepted
time: 0ms
memory: 3600kb
input:
5 5 1 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
output:
No solution!
result:
ok You are right!
Test #58:
score: 0
Accepted
time: 0ms
memory: 3600kb
input:
1 3 3 2 0 0 0
output:
1 1 0 1 1 1 1 1 1 0 1 0
result:
ok You are right!
Test #59:
score: 0
Accepted
time: 0ms
memory: 3600kb
input:
3 1 3 2 0 0 0
output:
1 0 1 1 1 1 1 1 0 1 0 1
result:
ok You are right!
Test #60:
score: 0
Accepted
time: 0ms
memory: 3836kb
input:
2 1 2 2 1 0
output:
1 1 1 0 1 1
result:
ok You are right!
Test #61:
score: 0
Accepted
time: 0ms
memory: 3540kb
input:
5 5 1 998244353 0 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:
No solution!
result:
ok You are right!
Test #62:
score: 0
Accepted
time: 0ms
memory: 3604kb
input:
2 2 1 998244353 1 2 499122177 1
output:
1 499122177 1 2
result:
ok You are right!
Test #63:
score: 0
Accepted
time: 0ms
memory: 3836kb
input:
1 1 14 13 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 2 1 12 1
result:
ok You are right!
Test #64:
score: 0
Accepted
time: 74ms
memory: 19624kb
input:
100000 1 1 1000000007 655148169 80378305 493071225 324727373 687487969 837135466 918953522 914955003 286477319 117684458 792214578 668298853 775774673 837339772 560211451 867899627 123600549 209449141 632586082 676423190 988270752 364627712 982686597 934719890 592096271 54847098 403666204 650868062 ...
output:
1 446658672 70014876 468951335 787869532 326295909 875653205 397249369 906836857 274450805 217485875 385402856 798536623 429007382 395807864 908468095 384606243 858460551 610671383 494355186 847747748 138317691 944681850 190587024 512519100 678962864 612816676 822202529 823106613 720333387 741174637...
result:
ok You are right!
Test #65:
score: 0
Accepted
time: 77ms
memory: 19396kb
input:
1 100000 1 1000000007 742216761 836378195 189843545 936704966 151715231 730747310 815263697 484119358 8903151 223302649 148975297 173957811 507591000 466555528 112481914 531314004 96457233 793922958 679157386 240820873 758087801 19289931 124917156 521602699 871068158 301396104 130936293 672015452 22...
output:
742216761 1 821904755 911355552 920802288 110065877 348013881 293996774 341001766 300416116 266546086 111664825 204397811 300460667 580168715 604857373 570462118 142602670 43006322 688302228 148683856 221899885 139616650 958593157 848278984 840823661 735353961 244197737 533328998 297049562 96486892 ...
result:
ok You are right!
Test #66:
score: 0
Accepted
time: 30ms
memory: 19596kb
input:
100000 1 1 2 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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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 You are right!
Test #68:
score: 0
Accepted
time: 7ms
memory: 19676kb
input:
100000 1 1 1000000007 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 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:
No solution!
result:
ok You are right!
Test #69:
score: 0
Accepted
time: 12ms
memory: 19460kb
input:
1 100000 1 1000000007 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 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:
No solution!
result:
ok You are right!
Test #70:
score: 0
Accepted
time: 7ms
memory: 19392kb
input:
100000 1 1 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:
No solution!
result:
ok You are right!
Test #71:
score: 0
Accepted
time: 16ms
memory: 19480kb
input:
1 100000 1 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:
No solution!
result:
ok You are right!
Test #72:
score: 0
Accepted
time: 54ms
memory: 15128kb
input:
71394 1 1 1000000007 499327447 717648730 919250950 969040858 953182474 593218844 475171747 409983246 883303228 262946348 653440858 291308751 371055991 2195270 538606612 106893705 195792686 771051380 357151275 982227365 647421387 836802717 328326421 562343700 484367 949948067 174754541 293579212 8399...
output:
1 529839924 479000029 166602407 359743826 215902170 452279514 632562607 442773386 799160726 343157561 907083216 444977680 592707082 296678365 288700495 438722704 694224548 836648143 347939570 161026402 579286894 806332517 158354634 266557532 768042616 875827279 811437716 748389412 592623527 65147213...
result:
ok You are right!
Test #73:
score: 0
Accepted
time: 7ms
memory: 6196kb
input:
21 4761 17 1000000007 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 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 999999991 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 You are right!