QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#19752 | #1091. Binary Supersonic Utahraptors | wlzhouzhuan | AC ✓ | 16ms | 10488kb | C++17 | 1.2kb | 2022-02-10 14:14:24 | 2022-05-06 06:58:54 |
Judging History
answer
// Author: wlzhouzhuan
#include<bits/stdc++.h>
using namespace std;
#define rep(i,l,r) for(int i=(l);i<=(r);i++)
#define per(i,l,r) for(int i=(l);i>=(r);i--)
#define ll long long
#define ull unsigned long long
#define pii pair<int,int>
#define mset(s,t) memset(s,t,sizeof(s))
#define mcpy(s,t) memcpy(s,t,sizeof(t))
#define SZ(x) ((int)x.size())
#define pb push_back
#define eb emplace_back
#define fir first
#define sec second
template<class T1,class T2>bool ckmax(T1 &a,T2 b){if(a<b)return a=b,1;else return 0;}
template<class T1,class T2>bool ckmin(T1 &a,T2 b){if(a>b)return a=b,1;else return 0;}
inline int read(){
int x=0,f=0;char ch=getchar();
while(!isdigit(ch))f|=ch=='-',ch=getchar();
while(isdigit(ch))x=10*x+ch-'0',ch=getchar();
return f?-x:x;
}
template<typename T>void print(T x){
if(x<0)putchar('-'),x=-x;
if(x>=10)print(x/10);
putchar(x%10+'0');
}
template<typename T>void print(T x,char ch){
print(x),putchar(ch);
}
int a[1000005],b[1000005];
int n,m,k,ans;
int main(){
n=read(),m=read(),k=read();
rep(i,1,n)a[i]=read(),ans+=!a[i];
rep(i,1,m)b[i]=read(),ans+=!b[i];
printf("%d\n",abs(ans-m));
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 3ms
memory: 5736kb
input:
2 3 1 0 0 1 1 1 2
output:
1
result:
ok 1 number(s): "1"
Test #2:
score: 0
Accepted
time: 3ms
memory: 5696kb
input:
1 1 1 1 1 1
output:
1
result:
ok 1 number(s): "1"
Test #3:
score: 0
Accepted
time: 3ms
memory: 5760kb
input:
1 1 1 1 0 1
output:
0
result:
ok 1 number(s): "0"
Test #4:
score: 0
Accepted
time: 3ms
memory: 5736kb
input:
1 1 1 0 1 1
output:
0
result:
ok 1 number(s): "0"
Test #5:
score: 0
Accepted
time: 3ms
memory: 5764kb
input:
1 1 1 0 0 1
output:
1
result:
ok 1 number(s): "1"
Test #6:
score: 0
Accepted
time: 1ms
memory: 5668kb
input:
2 2 2 1 1 1 1 1 2
output:
2
result:
ok 1 number(s): "2"
Test #7:
score: 0
Accepted
time: 1ms
memory: 5756kb
input:
2 2 5 1 1 0 1 1 1 2 1 2
output:
1
result:
ok 1 number(s): "1"
Test #8:
score: 0
Accepted
time: 3ms
memory: 5620kb
input:
2 2 10 1 1 0 0 1 2 2 2 1 1 1 1 1 1
output:
0
result:
ok 1 number(s): "0"
Test #9:
score: 0
Accepted
time: 3ms
memory: 5692kb
input:
2 2 20 1 0 1 1 2 2 2 2 2 2 2 1 1 1 1 2 2 2 1 2 2 1 1 2
output:
1
result:
ok 1 number(s): "1"
Test #10:
score: 0
Accepted
time: 3ms
memory: 5764kb
input:
2 2 40 0 1 0 1 1 2 1 1 1 2 1 1 2 1 1 2 1 2 1 2 2 1 1 1 1 1 2 1 1 2 1 1 2 2 2 1 2 1 2 1 2 1 2 2
output:
0
result:
ok 1 number(s): "0"
Test #11:
score: 0
Accepted
time: 3ms
memory: 5704kb
input:
2 2 100 0 1 0 0 1 2 1 2 2 2 1 2 1 1 2 1 2 1 1 2 1 2 2 2 1 1 2 1 2 1 1 2 1 1 2 1 2 2 1 2 1 2 2 2 2 2 1 2 1 2 1 2 2 1 2 2 1 2 1 1 1 1 2 1 1 1 1 2 1 1 1 1 1 1 2 1 1 1 2 2 1 1 1 2 2 1 2 1 2 2 1 2 2 1 1 2 1 1 1 1 2 2 1 1
output:
1
result:
ok 1 number(s): "1"
Test #12:
score: 0
Accepted
time: 3ms
memory: 5756kb
input:
2 2 300 0 0 1 1 1 2 1 2 1 1 1 1 2 1 1 1 2 2 1 1 2 2 2 1 1 2 2 1 1 2 1 2 2 1 2 1 2 2 1 1 2 1 1 1 2 2 1 1 1 1 1 2 2 1 2 2 2 2 1 2 2 1 1 1 1 2 1 2 1 2 1 2 2 2 1 2 2 1 2 2 1 2 1 2 1 1 1 2 1 1 1 1 2 1 1 2 1 1 1 1 2 2 1 1 2 1 1 1 2 1 2 1 2 1 2 1 1 1 2 1 2 1 2 1 2 2 2 2 1 1 1 2 1 2 1 2 1 1 1 1 2 2 2 2 2 2 ...
output:
0
result:
ok 1 number(s): "0"
Test #13:
score: 0
Accepted
time: 0ms
memory: 5772kb
input:
2 2 600 0 0 1 0 1 2 1 2 1 1 2 1 1 1 2 1 1 2 1 2 1 2 2 2 2 1 2 1 2 2 1 1 2 2 1 1 1 2 2 2 1 1 1 1 2 1 2 2 2 1 1 1 2 2 1 2 2 2 2 2 2 2 1 2 2 1 1 2 1 2 1 1 1 1 2 2 2 1 1 2 1 1 1 2 2 1 1 1 1 2 1 1 1 1 2 1 1 1 1 2 2 2 2 2 1 1 2 2 1 1 1 2 1 1 2 1 2 2 2 1 1 2 2 2 1 1 1 1 2 2 1 1 2 1 2 2 2 1 1 1 2 1 2 2 1 1 ...
output:
1
result:
ok 1 number(s): "1"
Test #14:
score: 0
Accepted
time: 0ms
memory: 5624kb
input:
2 2 2000 0 0 0 0 1 2 2 2 1 2 2 1 1 1 1 1 1 2 2 2 2 1 2 1 2 1 2 1 1 1 1 2 2 1 1 2 2 2 2 1 2 1 2 1 2 1 2 2 2 1 2 2 1 2 1 1 2 2 2 1 1 1 1 2 2 1 1 1 1 1 1 1 2 1 2 2 2 1 1 2 2 2 2 2 1 1 1 1 2 1 1 2 1 2 2 1 1 1 2 2 2 1 2 2 1 2 1 1 1 2 1 1 2 2 1 2 1 1 2 2 2 2 1 2 1 1 2 2 1 1 1 2 2 1 1 1 2 1 2 1 1 1 1 1 1 2...
output:
2
result:
ok 1 number(s): "2"
Test #15:
score: 0
Accepted
time: 2ms
memory: 5704kb
input:
25 6 3000 1 1 1 1 1 0 1 0 0 0 0 0 0 1 1 0 0 0 1 0 0 0 0 0 0 1 0 1 0 0 0 1 2 3 3 4 2 3 6 4 6 3 5 3 2 3 1 4 5 5 6 1 3 6 4 1 3 5 1 5 4 4 4 5 3 4 6 6 6 5 6 1 3 3 4 3 5 2 2 3 6 3 6 4 3 2 3 6 6 5 1 6 1 6 1 2 5 1 6 3 2 1 2 4 6 1 2 3 6 2 6 5 3 2 2 3 4 4 3 5 4 5 5 6 3 6 3 5 6 2 3 4 5 5 2 5 2 4 1 1 5 4 2 2 2 ...
output:
14
result:
ok 1 number(s): "14"
Test #16:
score: 0
Accepted
time: 1ms
memory: 5624kb
input:
83 153 30000 1 1 1 0 1 0 0 0 0 0 0 1 1 1 1 1 0 0 1 1 1 0 1 1 1 1 1 1 1 1 0 0 1 1 0 0 0 1 1 1 1 0 1 1 1 1 0 1 1 1 0 1 1 1 1 0 1 0 0 1 1 0 1 1 1 0 0 0 1 1 1 1 0 1 0 1 1 1 0 1 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 1 0 0 0 1 0 0 0 0 0 0 0 1 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 1 0 0 0...
output:
7
result:
ok 1 number(s): "7"
Test #17:
score: 0
Accepted
time: 3ms
memory: 5700kb
input:
587 587 50000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 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 1 number(s): "0"
Test #18:
score: 0
Accepted
time: 3ms
memory: 5644kb
input:
6507 6507 10023 1 1 0 0 1 0 0 1 1 1 0 1 1 0 0 0 0 1 1 1 1 0 1 1 0 0 0 1 1 1 1 0 0 0 1 1 1 0 1 0 1 0 1 1 0 0 1 0 1 0 0 0 1 1 0 0 0 1 1 0 0 1 1 0 1 1 1 1 1 1 0 0 1 0 0 1 1 1 1 0 0 1 1 1 0 1 1 0 0 0 1 0 0 0 0 1 1 0 1 1 0 1 0 1 1 0 1 1 0 1 1 1 0 0 1 0 1 1 1 0 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 ...
output:
3323
result:
ok 1 number(s): "3323"
Test #19:
score: 0
Accepted
time: 4ms
memory: 5872kb
input:
34523 12232 2003 1 1 1 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 0 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 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 0 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1...
output:
4451
result:
ok 1 number(s): "4451"
Test #20:
score: 0
Accepted
time: 5ms
memory: 6356kb
input:
150523 152232 150233 0 0 0 1 1 1 1 0 1 1 0 0 0 1 0 1 1 1 0 0 0 1 1 1 0 0 1 0 0 1 1 0 1 1 1 1 1 1 1 0 0 1 0 1 0 1 0 0 1 0 1 1 0 1 0 0 0 1 1 1 0 0 0 0 0 0 0 1 1 0 0 1 0 1 0 0 1 1 1 0 0 0 1 1 0 1 0 0 0 0 1 0 1 1 0 1 1 1 0 0 0 1 0 1 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 1 1 0 0 0 1 0 1 1 1 0 0 0 1 0 0 1 1...
output:
33423
result:
ok 1 number(s): "33423"
Test #21:
score: 0
Accepted
time: 0ms
memory: 10060kb
input:
120523 162232 150233 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 0 1 0 1 1 1 1 1 1 1 0 1 1 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 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 0 1 1 1 1 1 1 1 1 0 0 1 1 1 0 1 1 1 1 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...
output:
16577
result:
ok 1 number(s): "16577"
Test #22:
score: 0
Accepted
time: 3ms
memory: 8336kb
input:
130523 152232 250233 0 0 0 0 0 0 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 1 0 0 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 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...
output:
6677
result:
ok 1 number(s): "6677"
Test #23:
score: 0
Accepted
time: 14ms
memory: 8904kb
input:
290523 299232 300000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 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:
290523
result:
ok 1 number(s): "290523"
Test #24:
score: 0
Accepted
time: 13ms
memory: 10100kb
input:
297523 299292 300000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 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 1 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0...
output:
8769
result:
ok 1 number(s): "8769"
Test #25:
score: 0
Accepted
time: 11ms
memory: 10184kb
input:
299999 300000 300000 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 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:
300000
result:
ok 1 number(s): "300000"
Test #26:
score: 0
Accepted
time: 5ms
memory: 10488kb
input:
299999 300000 300000 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 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 1 number(s): "0"
Test #27:
score: 0
Accepted
time: 7ms
memory: 10256kb
input:
300000 299999 300000 1 0 0 0 0 0 0 0 0 0 0 0 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 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 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 1 0 0 0 0 0 0 0...
output:
3102
result:
ok 1 number(s): "3102"
Test #28:
score: 0
Accepted
time: 16ms
memory: 6996kb
input:
300000 299999 300000 1 0 1 0 0 0 0 1 0 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 1 0 0 0 1 0 0 0 1 0 1 0 1 0 1 0 1 1 1 1 0 0 1 1 0 0 0 0 0 1 0 0 0 0 1 0 1 0 0 1 0 1 0 0 1 1 1 0 0 0 1 0 1 1 1 1 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 1 0 0 1 0 1 1 0 1 0 0 0 0 0 1 1 0 0 1 0 0 0 1 0 0 1 0 0 1 0 0...
output:
21440
result:
ok 1 number(s): "21440"
Test #29:
score: 0
Accepted
time: 8ms
memory: 10388kb
input:
300000 299999 300000 0 1 0 1 1 1 0 0 0 1 0 0 0 0 0 1 0 1 1 0 0 0 0 1 0 1 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 1 1 1 0 0 0 0 1 0 0 0 1 0 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 1 1 0 0 1 0 1 0 0 0 1...
output:
198045
result:
ok 1 number(s): "198045"
Test #30:
score: 0
Accepted
time: 10ms
memory: 6932kb
input:
300000 299999 300000 0 0 1 1 1 0 0 0 1 0 1 0 0 0 0 1 0 1 1 1 1 1 0 0 1 1 0 0 0 1 1 1 0 0 1 0 0 1 1 1 1 0 1 1 1 1 0 0 0 1 1 1 0 0 0 0 1 0 0 1 0 0 1 1 0 0 1 0 0 0 1 0 0 1 1 1 1 0 0 0 1 1 1 1 0 0 0 1 1 0 0 0 0 0 1 1 1 0 0 1 0 1 1 1 0 0 0 0 1 1 0 1 1 0 0 1 0 1 0 1 0 1 1 1 0 0 1 1 1 0 1 0 0 0 1 0 0 0 0 1...
output:
127854
result:
ok 1 number(s): "127854"
Test #31:
score: 0
Accepted
time: 8ms
memory: 10272kb
input:
300000 299999 300000 0 0 1 0 1 0 1 0 0 0 0 0 0 1 1 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 1 1 0 1 1 0 1 1 0 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 1 1 0 1 1 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 1 0 1 0 0 0 0 1 0 1 0 1 0 0 0 0 0 0 0 1 1 0 1 1 0 0 0 1 1 0 0 0 0 1 0 1...
output:
50283
result:
ok 1 number(s): "50283"
Test #32:
score: 0
Accepted
time: 11ms
memory: 6876kb
input:
300000 299999 300000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 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 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 1 0 0 0 0 0 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 1 1 0 0 0 0 0 0 0 0 0 0 0 0...
output:
191359
result:
ok 1 number(s): "191359"