QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#581431#2521. KeystrokeCSQ#AC ✓0ms3688kbC++14461b2024-09-22 12:45:112024-09-22 12:45:11

Judging History

你现在查看的是最新测评结果

  • [2024-09-22 12:45:11]
  • 评测
  • 测评结果:AC
  • 用时:0ms
  • 内存:3688kb
  • [2024-09-22 12:45:11]
  • 提交

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