結果

問題 No.224 文字列変更(easy)
コンテスト
ユーザー Coder123
提出日時 2025-12-29 16:47:08
言語 C++17
(gcc 13.3.0 + boost 1.89.0)
結果
AC  
実行時間 4 ms / 5,000 ms
コード長 1,763 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 1,784 ms
コンパイル使用メモリ 215,348 KB
実行使用メモリ 7,848 KB
最終ジャッジ日時 2025-12-29 16:47:12
合計ジャッジ時間 3,100 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 22
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp:36: warning: "INT_MAX" redefined
   36 | #define INT_MAX LLONG_MAX
      | 
In file included from /usr/include/c++/13/climits:42,
                 from /usr/include/x86_64-linux-gnu/c++/13/bits/stdc++.h:38,
                 from main.cpp:10:
/usr/lib/gcc/x86_64-linux-gnu/13/include/limits.h:120: note: this is the location of the previous definition
  120 | #define INT_MAX __INT_MAX__
      | 

ソースコード

diff #
raw source code

/*   Bismillah
*    Author: Akhyar Ahmed Turk
*    Created: 2025-12-29 12:45 (GMT+5)

*    brain["Motivation"].insert("Ya to win hy ya learn");

*    Those who can't remember the past are condemned to repeat it.
*                                                 -Dynamic Programming.
*/
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace __gnu_pbds;

template <typename T>
using ordered_set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;
// use when u need indexing in sets like (when you need lower upper bound while frequently updating set) 
// idx.order_of_key(value) for nums<value idx.order_of_key(value+1) for nums<=value
// idx.find_by_order(n); to get the nth value by order
#define int long long
#define ld long double
#define yesno(b) cout << ((b) ? "YES" : "NO") << "\n";
#define pii pair<int, int>
#define pb push_back
#define f first
#define ss second
#define vi vector<int>
#define vb vector<bool>
#define vvi vector<vi>
#define all(a) a.begin(), a.end()
#define allr(a) a.rbegin(), a.rend()
#define mod 1000000007
#define mod2 998244353
const int inf = 1e17 + 1;
#define INT_MAX LLONG_MAX
#define nl "\n"

#define forn(i, a, b) for (int i = a; i < b; i++)
#define forr(i, a, b) for (int i = a; i >= b; i--)
#define input(vec, n) for(int z = 0; z < (n); z++) cin >> vec[z];

void solve() {
    int n,res=0; cin>>n;
    string a,b; cin>>a>>b;
    forn(i,0,n) res+=(a[i]!=b[i]);
    cout<<res<<endl;
}

int32_t main(){
ios_base::sync_with_stdio(false);
cin.tie(NULL);
// freopen("input.txt", "r", stdin);
// freopen("output.txt", "w", stdout);
    int t=1;
    // cin >> t;
    while (t--) {
        solve();
    }
    return 0;
}
0