QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#586435 | #9258. Huawei Frequencies Selection | ucup-team3474 | AC ✓ | 61ms | 24240kb | C++20 | 1.5kb | 2024-09-24 12:15:08 | 2024-09-24 12:15:09 |
Judging History
answer
#include<bits/stdc++.h>
using namespace std;
const int N=1919810;
typedef long long ll;
typedef pair<ll,ll> PII;
ll n,m,k;
ll a[N],b[N];
char s[N];
vector<int> e[N];
int dep[N];
int ne[N][2];
bool judge0(){
int cnt=0;
for(int i=1;i<=n;i++) if(a[i]==0) cnt++;
return cnt>=k;
}
int dp[N];
int last[N];
bool judge1(){
int lst=1;
int mx=0,mx1=-1e9;
memset(dp,-0x3f,sizeof dp);
dp[0]=0;
bool flag=0;
int j=1;
for(int i=1;i<=n;i++){
if(a[i]==0){
dp[i]=mx1+1;
}else if(a[i]==1){
flag=1;
dp[i]=mx+1;
}else
{
dp[i]=dp[i-1]+1;
}
mx=max(mx,dp[i]);
if(a[i]==1){
while(j<=i){
mx1=max(mx1,dp[j-1]);
j++;
}
}
// cout<<dp[i]<<" ";
}
// cout<<mx<<endl;
return dp[n]>=k;
}
bool judge2(){
int lst=-1;
int cnt=0;
for(int i=1;i<=n;i++){
if(a[i]==2) return true;
else if(a[i]<=1){
if(lst!=a[i]){
cnt++;
lst=a[i];
}
}
}
return cnt<=k;
}
void __(){
cin>>n>>k;
for(int i=1;i<=n;i++) scanf("%lld",&a[i]);
if(judge0()){
puts("0");
}else if(judge1()) puts("1");
else if(judge2()) puts("2");
else puts("3");
}
int main(){
int _=1;
// cin>>_;
while(_--){
__();
}
}
这程序好像有点Bug,我给组数据试试?
詳細信息
Test #1:
score: 100
Accepted
time: 0ms
memory: 14004kb
input:
2 2 0 2
output:
2
result:
ok answer is '2'
Test #2:
score: 0
Accepted
time: 0ms
memory: 16048kb
input:
3 1 2 1 1
output:
1
result:
ok answer is '1'
Test #3:
score: 0
Accepted
time: 0ms
memory: 15928kb
input:
3 2 1 3 0
output:
2
result:
ok answer is '2'
Test #4:
score: 0
Accepted
time: 0ms
memory: 14012kb
input:
20 15 1 2 2 0 3 3 2 2 2 0 1 1 2 1 3 1 0 2 2 1
output:
1
result:
ok answer is '1'
Test #5:
score: 0
Accepted
time: 0ms
memory: 15920kb
input:
9 4 0 0 2 1 3 1 3 0 3
output:
1
result:
ok answer is '1'
Test #6:
score: 0
Accepted
time: 0ms
memory: 13872kb
input:
19 17 1 0 0 3 0 0 2 3 1 0 3 3 3 1 3 0 0 3 1
output:
2
result:
ok answer is '2'
Test #7:
score: 0
Accepted
time: 4ms
memory: 16048kb
input:
17 15 0 0 3 0 1 1 2 1 2 1 1 1 3 0 0 1 0
output:
2
result:
ok answer is '2'
Test #8:
score: 0
Accepted
time: 4ms
memory: 16040kb
input:
6 5 2 1 3 0 1 0
output:
2
result:
ok answer is '2'
Test #9:
score: 0
Accepted
time: 4ms
memory: 16052kb
input:
16 12 0 2 0 1 2 0 0 0 1 3 3 0 1 0 3 1
output:
2
result:
ok answer is '2'
Test #10:
score: 0
Accepted
time: 4ms
memory: 16044kb
input:
15 9 0 2 2 1 2 0 3 3 1 0 1 1 1 0 1
output:
2
result:
ok answer is '2'
Test #11:
score: 0
Accepted
time: 4ms
memory: 15908kb
input:
8 6 0 0 0 1 0 1 0 1
output:
2
result:
ok answer is '2'
Test #12:
score: 0
Accepted
time: 4ms
memory: 13948kb
input:
10 6 1 0 0 1 0 1 0 3 3 0
output:
2
result:
ok answer is '2'
Test #13:
score: 0
Accepted
time: 2ms
memory: 5800kb
input:
1 1 0
output:
0
result:
ok answer is '0'
Test #14:
score: 0
Accepted
time: 0ms
memory: 16040kb
input:
1 1 1
output:
1
result:
ok answer is '1'
Test #15:
score: 0
Accepted
time: 4ms
memory: 15920kb
input:
7 4 0 1 0 2 1 3 0
output:
2
result:
ok answer is '2'
Test #16:
score: 0
Accepted
time: 4ms
memory: 13996kb
input:
8 5 1 0 1 0 2 1 3 0
output:
2
result:
ok answer is '2'
Test #17:
score: 0
Accepted
time: 49ms
memory: 22188kb
input:
1000000 1000000 507624 225615 645997 324384 930930 165669 488080 968655 530722 293286 929521 65826 242278 483915 447838 683484 757911 811652 223115 648468 287602 113125 150435 645440 413280 788127 48622 967532 334599 130555 888316 315597 102200 535955 54735 505596 746579 99783 536797 245479 758694 9...
output:
2
result:
ok answer is '2'
Test #18:
score: 0
Accepted
time: 61ms
memory: 22248kb
input:
1000000 500000 640527 324985 387717 720881 633473 74400 8373 456149 416870 416333 184426 818743 715174 667790 988237 291161 728768 243121 382952 843840 968031 686092 262205 231513 425449 626739 319939 866653 621575 603981 27492 149201 399598 794532 45790 857851 350354 581264 270212 74658 131717 8953...
output:
2
result:
ok answer is '2'
Test #19:
score: 0
Accepted
time: 53ms
memory: 20056kb
input:
1000000 10 73144 420038 917611 893568 801708 217666 485046 278773 241462 491725 221615 905907 261631 222670 275799 46296 186210 160223 457829 675468 201493 67670 475403 941339 730587 66061 407951 919091 583209 703421 516025 269210 504246 363977 814642 129013 116508 808340 936504 920819 691219 535620...
output:
1
result:
ok answer is '1'
Test #20:
score: 0
Accepted
time: 50ms
memory: 24236kb
input:
1000000 1000000 2 0 0 3 3 3 0 2 2 2 1 2 0 1 3 3 1 0 1 2 2 2 0 1 0 3 3 0 2 2 1 3 3 0 1 1 2 3 1 2 0 0 1 2 2 0 1 1 0 3 2 1 3 1 1 2 3 3 2 1 2 0 3 1 3 1 2 1 0 0 3 1 1 2 3 0 3 1 2 3 2 3 2 1 3 1 2 1 2 0 0 0 0 3 3 0 3 0 2 2 2 2 3 0 2 2 1 3 3 3 2 3 3 0 2 2 2 2 2 1 0 2 1 3 2 0 3 0 2 3 1 0 2 2 2 1 1 3 2 0 3 2 ...
output:
2
result:
ok answer is '2'
Test #21:
score: 0
Accepted
time: 49ms
memory: 24236kb
input:
1000000 500000 2 0 3 3 2 1 2 1 2 2 3 1 1 2 3 0 0 2 0 0 1 2 3 0 1 2 1 2 0 3 2 3 1 0 1 3 0 2 1 2 2 0 1 0 0 3 2 2 0 3 0 3 2 0 1 0 1 2 1 0 0 1 3 1 1 2 2 1 1 0 1 1 2 0 0 2 3 2 1 3 0 2 0 0 0 3 2 3 1 3 2 1 3 1 0 1 2 2 0 1 3 1 1 3 2 3 3 1 3 3 0 2 1 3 0 3 2 1 1 3 2 3 3 0 3 0 1 3 2 0 2 3 1 0 1 3 3 0 2 0 3 3 3...
output:
1
result:
ok answer is '1'
Test #22:
score: 0
Accepted
time: 53ms
memory: 24236kb
input:
1000000 300000 2 1 2 0 2 2 1 2 3 1 0 3 2 1 3 3 3 1 1 1 2 0 3 2 3 2 0 1 3 1 1 1 1 1 3 3 2 0 0 0 1 2 2 1 0 3 1 3 1 0 3 3 2 2 3 2 1 3 3 2 0 3 0 3 2 0 2 3 0 2 2 3 2 0 2 0 0 1 0 2 1 0 0 0 3 0 1 3 0 1 0 2 3 1 1 1 1 0 0 3 1 0 1 2 0 2 1 2 2 3 2 2 3 3 3 2 2 2 2 0 2 2 3 3 0 3 0 3 3 3 0 3 0 3 3 1 1 3 1 1 2 1 3...
output:
1
result:
ok answer is '1'
Test #23:
score: 0
Accepted
time: 38ms
memory: 14004kb
input:
1000000 200000 1 0 1 1 2 3 3 2 3 3 3 0 1 3 1 1 2 0 3 0 3 3 2 0 2 1 2 3 1 2 1 1 1 3 0 2 0 3 2 3 3 2 3 1 0 1 2 1 1 3 3 3 3 3 2 3 0 0 2 3 2 0 3 2 2 1 0 2 2 3 2 3 3 0 3 3 0 2 0 0 1 1 0 1 0 2 2 1 0 1 3 1 1 1 2 3 1 2 2 2 2 2 3 3 1 1 1 3 1 3 0 2 2 2 2 2 3 1 0 2 0 2 2 3 0 1 2 3 1 3 1 0 3 0 2 2 1 1 0 2 3 3 0...
output:
0
result:
ok answer is '0'
Test #24:
score: 0
Accepted
time: 46ms
memory: 14072kb
input:
1000000 3 0 2 0 3 0 3 2 2 0 0 1 0 1 1 3 3 2 0 1 0 2 2 1 1 0 2 3 3 2 1 1 1 2 0 0 0 0 1 2 1 2 3 3 2 2 1 3 1 0 3 3 3 2 1 3 2 2 2 2 0 3 2 2 2 0 0 0 2 3 1 2 1 3 3 3 1 3 3 1 0 1 0 0 0 0 1 1 1 3 3 0 2 0 0 2 0 1 1 3 1 2 2 1 2 0 1 3 2 0 2 3 1 2 1 1 2 2 2 1 1 3 1 1 1 3 0 1 3 1 0 1 2 3 0 3 1 0 3 2 0 3 2 0 3 2 ...
output:
0
result:
ok answer is '0'
Test #25:
score: 0
Accepted
time: 46ms
memory: 13852kb
input:
1000000 2 1 0 1 2 3 2 3 2 2 2 2 0 2 3 2 1 2 0 3 2 3 2 2 1 0 1 2 2 3 2 3 3 3 0 3 1 0 2 0 1 3 2 3 0 3 2 0 0 1 2 0 0 1 3 1 0 2 3 2 2 2 3 1 3 0 3 3 0 0 2 3 1 2 3 3 1 3 1 1 3 3 0 3 3 1 1 0 3 2 2 1 3 3 0 0 2 2 0 1 3 1 2 0 0 3 0 0 2 1 0 3 3 3 2 0 2 0 0 0 3 1 2 1 1 2 1 2 2 3 0 1 2 1 2 3 0 3 2 0 3 1 0 1 3 1 ...
output:
0
result:
ok answer is '0'
Test #26:
score: 0
Accepted
time: 46ms
memory: 13988kb
input:
1000000 1 2 2 3 2 3 2 0 3 1 0 3 3 3 2 0 3 2 1 2 0 3 1 2 1 1 3 1 0 1 0 2 2 0 3 2 2 1 3 1 2 0 2 0 2 0 3 1 3 2 1 1 2 0 2 3 2 3 1 3 1 1 0 0 3 3 3 1 2 0 3 0 0 1 3 2 0 3 3 0 2 0 0 2 3 2 2 2 2 2 2 1 1 2 0 3 0 0 2 2 0 1 2 3 2 3 0 1 2 3 2 0 1 3 3 3 3 1 1 2 1 2 3 1 0 1 3 3 0 2 0 0 2 3 1 0 3 2 0 2 3 0 1 1 2 3 ...
output:
0
result:
ok answer is '0'
Test #27:
score: 0
Accepted
time: 38ms
memory: 12028kb
input:
1000000 500000 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0...
output:
0
result:
ok answer is '0'
Test #28:
score: 0
Accepted
time: 38ms
memory: 14048kb
input:
1000000 500000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 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:
0
result:
ok answer is '0'
Test #29:
score: 0
Accepted
time: 42ms
memory: 13876kb
input:
1000000 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 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...
output:
0
result:
ok answer is '0'
Test #30:
score: 0
Accepted
time: 52ms
memory: 20008kb
input:
1000000 750334 1 2 2 0 2 2 0 2 2 2 0 2 2 1 0 0 2 0 1 2 0 0 1 2 2 1 0 2 0 0 1 0 0 0 2 1 2 2 2 0 2 2 1 0 0 0 2 1 2 2 0 2 2 2 0 2 2 1 2 1 2 0 1 2 2 0 2 2 0 2 2 0 2 2 2 1 2 0 2 2 1 2 2 0 2 1 0 2 1 2 2 0 2 1 2 2 2 0 2 2 1 2 2 2 0 2 2 1 2 0 2 0 2 2 0 2 1 2 1 2 0 0 1 2 0 0 1 0 0 2 1 0 2 1 0 0 2 1 2 0 0 0 1...
output:
1
result:
ok answer is '1'
Test #31:
score: 0
Accepted
time: 48ms
memory: 24116kb
input:
1000000 749720 1 2 2 0 2 2 0 2 2 0 2 2 2 1 2 2 2 1 2 0 2 2 0 2 1 2 2 0 2 0 2 0 2 1 2 2 2 0 2 2 1 2 1 2 2 0 2 2 2 0 2 2 0 2 2 1 2 2 2 0 2 2 1 2 2 0 2 0 2 0 2 1 2 2 2 1 2 0 2 0 2 0 2 2 1 2 0 2 0 2 0 2 2 1 2 2 0 2 2 2 0 2 2 0 2 2 1 2 2 0 2 2 2 0 2 2 0 2 2 1 2 2 0 2 2 0 2 2 2 1 2 2 0 2 1 2 2 0 2 2 2 0 2...
output:
1
result:
ok answer is '1'
Test #32:
score: 0
Accepted
time: 52ms
memory: 24240kb
input:
1000000 750503 1 2 2 0 2 2 2 0 2 2 0 2 2 1 2 0 0 1 2 2 0 2 2 2 1 2 2 0 2 1 0 0 0 2 1 2 0 2 2 0 2 1 2 0 2 2 1 2 2 0 2 2 0 2 2 2 1 2 2 2 1 2 2 0 2 1 2 2 0 2 1 2 2 2 1 2 0 2 2 1 2 0 2 0 2 2 1 0 2 0 1 2 2 1 2 2 0 2 2 2 1 2 2 0 2 2 2 1 0 0 0 2 1 2 0 2 2 0 2 1 2 2 2 0 2 2 1 2 0 2 0 2 2 1 2 2 2 1 2 0 1 2 2...
output:
1
result:
ok answer is '1'
Test #33:
score: 0
Accepted
time: 41ms
memory: 20056kb
input:
999998 571509 1 0 0 1 0 9 0 1 0 0 1 0 5 0 1 0 7 0 1 0 3 0 1 0 7 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 10 0 1 0 0 1 0 7 0 1 0 0 1 0 10 0 1 0 3 0 1 0 3 0 1 0 10 0 1 0 0 1 0 0 1 0 10 0 1 0 6 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 4 0 1 0 0 1 0 0 1 0 0 1 0 3 0 1 0 0 1 0 7 0 1 0 0 1 0 0 1 0 10 0 1 0 0 1 0 3 0 1 0 0...
output:
2
result:
ok answer is '2'
Test #34:
score: 0
Accepted
time: 47ms
memory: 20056kb
input:
999997 571375 1 0 0 1 0 0 1 0 0 1 0 8 0 1 0 0 1 0 3 0 1 0 10 0 1 0 7 0 1 0 0 1 0 7 0 1 0 3 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 10 0 1 0 3 0 1 0 4 0 1 0 10 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 8 0 1 0 0 1 0 0 1 0 0 1 0 4 0 1 0 4 0 1 0 7 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 4 0 1 0 0 1 0 0 1 0 0 1...
output:
2
result:
ok answer is '2'
Test #35:
score: 0
Accepted
time: 46ms
memory: 20092kb
input:
1000000 571483 1 0 0 1 0 0 1 0 0 1 0 6 0 1 0 8 0 1 0 8 0 1 0 0 1 0 0 1 0 10 0 1 0 0 1 0 0 1 0 6 0 1 0 4 0 1 0 8 0 1 0 8 0 1 0 3 0 1 0 8 0 1 0 0 1 0 0 1 0 4 0 1 0 5 0 1 0 9 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 9 0 1 0 0 1 0 3 0 1 0 7 0 1 0 0 1 0 4 0 1 0 10 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 4 0 1 0 0...
output:
2
result:
ok answer is '2'
Test #36:
score: 0
Accepted
time: 42ms
memory: 24104kb
input:
1000000 999997 1 0 2 1 2 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1...
output:
2
result:
ok answer is '2'
Test #37:
score: 0
Accepted
time: 42ms
memory: 24104kb
input:
1000000 999997 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1...
output:
2
result:
ok answer is '2'
Test #38:
score: 0
Accepted
time: 42ms
memory: 20072kb
input:
1000000 999997 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0...
output:
2
result:
ok answer is '2'
Test #39:
score: 0
Accepted
time: 57ms
memory: 11948kb
input:
1000000 1 0 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 ...
output:
0
result:
ok answer is '0'
Test #40:
score: 0
Accepted
time: 38ms
memory: 13952kb
input:
1000000 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 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:
0
result:
ok answer is '0'
Test #41:
score: 0
Accepted
time: 37ms
memory: 24116kb
input:
1000000 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...
output:
1
result:
ok answer is '1'
Test #42:
score: 0
Accepted
time: 56ms
memory: 24100kb
input:
1000000 10 0 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...
output:
1
result:
ok answer is '1'
Test #43:
score: 0
Accepted
time: 42ms
memory: 14048kb
input:
1000000 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 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 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:
0
result:
ok answer is '0'
Test #44:
score: 0
Accepted
time: 46ms
memory: 22060kb
input:
1000000 10 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1...
output:
1
result:
ok answer is '1'
Test #45:
score: 0
Accepted
time: 56ms
memory: 24112kb
input:
1000000 1000000 0 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 ...
output:
2
result:
ok answer is '2'
Test #46:
score: 0
Accepted
time: 42ms
memory: 13812kb
input:
1000000 1000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 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:
0
result:
ok answer is '0'
Test #47:
score: 0
Accepted
time: 38ms
memory: 20072kb
input:
1000000 1000000 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...
output:
1
result:
ok answer is '1'
Extra Test:
score: 0
Extra Test Passed