結果

問題 No.224 文字列変更(easy)
コンテスト
ユーザー vjudge1
提出日時 2026-01-04 01:36:20
言語 C++23
(gcc 15.2.0 + boost 1.89.0)
結果
WA  
実行時間 -
コード長 1,561 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 3,535 ms
コンパイル使用メモリ 343,896 KB
実行使用メモリ 7,852 KB
最終ジャッジ日時 2026-01-04 01:36:25
合計ジャッジ時間 4,994 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 3 WA * 19
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

//Bismillah
#include <bits/stdc++.h>
using namespace std;
#define int long long int
#define f(i, a, n) for (int i = a; i < n; i++)
#define fn(i,a,n) for (int i = n - 1; i >= a; i--)
#define pr(vec) {for(auto &value: vec) cout<<value<<" ";} nl;
#define iv(vec) for(auto &value: vec) cin>>value;
#define pb push_back
#define p(a) cout << a << "\n";
#define file_read(filepath) freopen(filepath, "r", stdin);
#define file_write(filepath) freopen(filepath, "w", stdout);
#define fr first
#define se second
#define all(a) a.begin(), a.end()
#define rall(a) a.rbegin(), a.rend()
#define uset unordered_set
#define mset unordered_multiset
#define vb vector<bool>
#define vi vector<int>
#define vvi vector<vector<int>>
#define vc vector<char>
#define vs vector<string>
#define vpii vector<pair<int,int>>
#define MOD1 1000000007
#define mii map<int,int>
#define sz(a) a.size()
#define ld long double
#define ins insert
int rev(int a, int b) { return a > b; }
#define nl cout<<"\n";
#define ned ios::sync_with_stdio(0);cin.tie(0);cout.tie(0);int t = 1;
int test  = 1;
const int N = 1e7 + 5;
vector<bool> is_prime(N, true);
void sieve() {is_prime[0] = is_prime[1] = false;for (int i = 2; i * i < N; i++) {if (is_prime[i]) {for (int j = i * i; j < N; j += i) {is_prime[j] = false;}}}}

void solve(){
    int n; cin>>n;
    string s, t;
    cin >> s >> t;
    sort(all(s));
    sort(all(t));

    int cnt = 0;
    f(i,0,n){
        cnt += (s[i] != t[i]);
    }
    p(cnt);
}

signed main(){
    ned;
    // cin>>t;
    while(t--)
    {
        solve();
    }
    return 0;
}
0