Submission #64279477
Source Code Expand
Copy
#include <bits/stdc++.h>using namespace std;#define int long longint n;char c[10000], c1;signed main() {ios::sync_with_stdio(false);ios_base::sync_with_stdio(false);cin.tie(0), cout.tie(0);cin >>n;for (int i = 1; i <= n; ++i) {cin >>c[i];}int ans=0;for(int i =1;i<=n;++i){cin>>c1;if(c1!=c[i]) {++ans;}}
#include <bits/stdc++.h> using namespace std; #define int long long int n; char c[10000], c1; signed main() { ios::sync_with_stdio(false); ios_base::sync_with_stdio(false); cin.tie(0), cout.tie(0); cin >>n; for (int i = 1; i <= n; ++i) { cin >>c[i]; } int ans=0; for(int i =1;i<=n;++i){ cin>>c1; if(c1!=c[i]) { ++ans; } } cout<<ans; return 0; }
Submission Info
Submission Time | |
---|---|
Task | A - Hamming Distance |
User | cyt_before |
Language | C++ 20 (gcc 12.2) |
Score | 100 |
Code Size | 395 Byte |
Status | AC |
Exec Time | 1 ms |
Memory | 3528 KB |
Judge Result
Set Name | Sample | All | ||||
---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 100 / 100 | ||||
Status |
|
|
Set Name | Test Cases |
---|---|
Sample | 00_sample_00.txt, 00_sample_01.txt, 00_sample_02.txt, 00_sample_03.txt |
All | 00_sample_00.txt, 00_sample_01.txt, 00_sample_02.txt, 00_sample_03.txt, 01_random_00.txt, 01_random_01.txt, 01_random_02.txt, 02_random2_00.txt, 02_random2_01.txt, 02_random2_02.txt, 02_random2_03.txt, 02_random2_04.txt, 02_random2_05.txt, 02_random2_06.txt, 02_random2_07.txt, 03_handmade_00.txt, 03_handmade_01.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
00_sample_00.txt | AC | 1 ms | 3528 KB |
00_sample_01.txt | AC | 1 ms | 3388 KB |
00_sample_02.txt | AC | 1 ms | 3448 KB |
00_sample_03.txt | AC | 1 ms | 3468 KB |
01_random_00.txt | AC | 1 ms | 3448 KB |
01_random_01.txt | AC | 1 ms | 3460 KB |
01_random_02.txt | AC | 1 ms | 3396 KB |
02_random2_00.txt | AC | 1 ms | 3464 KB |
02_random2_01.txt | AC | 1 ms | 3428 KB |
02_random2_02.txt | AC | 1 ms | 3420 KB |
02_random2_03.txt | AC | 1 ms | 3472 KB |
02_random2_04.txt | AC | 1 ms | 3388 KB |
02_random2_05.txt | AC | 1 ms | 3396 KB |
02_random2_06.txt | AC | 1 ms | 3404 KB |
02_random2_07.txt | AC | 1 ms | 3472 KB |
03_handmade_00.txt | AC | 1 ms | 3400 KB |
03_handmade_01.txt | AC | 1 ms | 3452 KB |