QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#88849#3834. Richard HammingSorahISAAC ✓2ms3292kbC++20526b2023-03-17 19:33:592023-03-17 19:34:08

Judging History

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

  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2023-03-17 19:34:08]
  • 评测
  • 测评结果:AC
  • 用时:2ms
  • 内存:3292kb
  • [2023-03-17 19:33:59]
  • 提交

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