QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#581431 | #2521. Keystroke | CSQ# | AC ✓ | 0ms | 3688kb | C++14 | 461b | 2024-09-22 12:45:11 | 2024-09-22 12:45:11 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
#define rep(i,a,b) for(int i=a;i<b;++i)
#define all(x) begin(x),end(x)
#define sz(x) (int)(x).size();
typedef long long ll;
typedef pair<int,int> pii;
typedef vector<int> vi;
int main()
{
int t;
cin>>t;
while(t--){
int n,m;
cin>>n>>m;
int x;
for(int i=0;i<n+m;i++)cin>>x;
if(min(n,m) == 1)cout<<1<<'\n';
else cout<<7<<'\n';
}
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 0ms
memory: 3688kb
input:
2 2 1 0 1 0 1 2 1 0 1
output:
1 1
result:
ok 2 lines
Test #2:
score: 0
Accepted
time: 0ms
memory: 3616kb
input:
2 2 2 0 1 0 1 1 1 1 1
output:
7 1
result:
ok 2 lines
Test #3:
score: 0
Accepted
time: 0ms
memory: 3540kb
input:
9 1 1 0 0 1 1 0 1 1 1 1 0 1 1 1 1 1 2 0 0 1 1 2 1 0 1 2 1 0 1 0 2 1 0 1 1 2 2 0 1 0 1
output:
1 1 1 1 1 1 1 1 7
result:
ok 9 lines