提出 #64276210
ソースコード 拡げる
#include <bits/stdc++.h> using namespace std; #define int long long #define pint pair<int, int> #define vint vector<int> #define IO \ ios_base::sync_with_stdio(0); \ cin.tie(0); \ cout.tie(0) #define umap unordered_map<int, int> #define all(v) v.begin(), v.end() #define pmax priority_queue<int> #define pmin priority_queue<int, vint, greater<int>> #define newl cout << "\n" int inf = LONG_MAX, mod = 1000000007; void run() { int n, c=0; string s, t; cin >> n >> s >> t; for (int i = 0;i<n;i++) { if(s[i]!=t[i]) c++; } cout << c; } signed main() { IO; int test; // for (cin >> test; test; test -= 1, cout << "\n") run(); }
提出情報
提出日時 | |
---|---|
問題 | A - Hamming Distance |
ユーザ | naveen_0503 |
言語 | C++ 20 (gcc 12.2) |
得点 | 100 |
コード長 | 779 Byte |
結果 | AC |
実行時間 | 1 ms |
メモリ | 3512 KiB |
コンパイルエラー
Main.cpp: In function ‘int main()’: Main.cpp:34:9: warning: unused variable ‘test’ [-Wunused-variable] 34 | int test; | ^~~~
ジャッジ結果
セット名 | Sample | All | ||||
---|---|---|---|---|---|---|
得点 / 配点 | 0 / 0 | 100 / 100 | ||||
結果 |
|
|
セット名 | テストケース |
---|---|
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 |
ケース名 | 結果 | 実行時間 | メモリ |
---|---|---|---|
00_sample_00.txt | AC | 1 ms | 3456 KiB |
00_sample_01.txt | AC | 1 ms | 3460 KiB |
00_sample_02.txt | AC | 1 ms | 3504 KiB |
00_sample_03.txt | AC | 1 ms | 3504 KiB |
01_random_00.txt | AC | 1 ms | 3460 KiB |
01_random_01.txt | AC | 1 ms | 3404 KiB |
01_random_02.txt | AC | 1 ms | 3404 KiB |
02_random2_00.txt | AC | 1 ms | 3464 KiB |
02_random2_01.txt | AC | 1 ms | 3512 KiB |
02_random2_02.txt | AC | 1 ms | 3312 KiB |
02_random2_03.txt | AC | 1 ms | 3444 KiB |
02_random2_04.txt | AC | 1 ms | 3316 KiB |
02_random2_05.txt | AC | 1 ms | 3372 KiB |
02_random2_06.txt | AC | 1 ms | 3504 KiB |
02_random2_07.txt | AC | 1 ms | 3512 KiB |
03_handmade_00.txt | AC | 1 ms | 3384 KiB |
03_handmade_01.txt | AC | 1 ms | 3508 KiB |