QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#88849 | #3834. Richard Hamming | SorahISA | AC ✓ | 2ms | 3292kb | C++20 | 526b | 2023-03-17 19:33:59 | 2023-03-17 19:34:08 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
#ifdef local
#define fastIO() void()
#else
#define fastIO() ios_base::sync_with_stdio(0), cin.tie(0)
#endif
void solve() {
int N; cin >> N;
vector<int> A(N), B(N);
for (int &x : A) cin >> x;
for (int &x : B) cin >> x;
int ans = 0;
for (int i = 0; i < N; ++i) ans += A[i] != B[i];
cout << ans << "\n";
}
int32_t main() {
fastIO();
int t = 1; cin >> t;
while (t--) solve();
return 0;
}
詳細信息
Test #1:
score: 100
Accepted
time: 2ms
memory: 3292kb
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