QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#327070 | #3834. Richard Hamming | writingdog# | AC ✓ | 1ms | 3632kb | C++20 | 713b | 2024-02-14 18:36:10 | 2024-02-14 18:36:10 |
Judging History
answer
#include<bits/stdc++.h>
using namespace std;
#define int long long
#define endl '\n'
typedef unsigned long long ull;
const int N=1e5;
const int INF=0x3f3f3f3f3f3f3f3f;
void solve()
{
int n;
cin >> n;
vector <int> v(n);
int ans=0;
for(int i=0;i<n;++i)
{
cin >> v[i];
}
for(int i=0;i<n;++i)
{
int x;
cin >> x;
ans+=(x!=v[i]);
}
cout << ans << endl;
}
signed main()
{
//cout.flags(ios::fixed); cout.precision(8);
ios::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
int T=1;
cin >> T;
for(int i=1;i<=T;++i)
{
solve();
}
return 0;
}
/*
*/
详细
Test #1:
score: 100
Accepted
time: 1ms
memory: 3632kb
input:
100 47 1 2 0 0 0 2 1 0 1 0 1 0 1 2 0 1 2 0 2 2 0 1 1 2 2 1 0 1 0 2 0 0 1 1 0 0 1 0 2 1 1 0 2 1 0 0 2 2 1 1 2 2 2 1 2 1 2 0 0 2 2 2 2 0 1 0 2 1 0 2 2 0 2 2 2 2 1 1 1 2 2 0 0 2 2 0 1 0 0 2 2 1 0 2 40 0 1 2 0 3 3 2 3 3 0 2 2 3 3 2 0 0 0 3 0 1 1 3 2 1 3 2 0 3 0 0 3 0 0 3 1 2 3 2 2 0 2 3 2 0 0 2 0 0 2 3 ...
output:
33 30 14 37 5 4 5 21 3 8 26 22 29 16 16 35 26 24 5 11 23 44 5 9 0 14 21 15 27 11 17 32 18 37 9 37 34 31 17 11 32 34 7 12 39 37 37 28 32 43 7 3 6 9 22 28 39 33 32 6 14 8 27 16 20 18 8 32 6 18 10 34 6 36 27 39 44 30 29 25 23 46 36 10 39 7 16 4 20 19 19 26 12 38 34 5 39 25 1 37
result:
ok 100 lines