結果
| 問題 | No.224 文字列変更(easy) |
| コンテスト | |
| ユーザー |
vjudge1
|
| 提出日時 | 2026-01-03 17:05:59 |
| 言語 | C++17(gcc12) (gcc 12.4.0 + boost 1.89.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 967 bytes |
| 記録 | |
| コンパイル時間 | 1,979 ms |
| コンパイル使用メモリ | 206,120 KB |
| 実行使用メモリ | 7,852 KB |
| 最終ジャッジ日時 | 2026-01-03 17:06:03 |
| 合計ジャッジ時間 | 3,263 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 3 WA * 19 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
#define int long long
#define forn(i, a, b) for (int i = a; i < b; i++)
#define print(a) cout << a << "\n"
#define printarr(a) for (int i = 0; i < (int)a.size(); i++) cout << a[i] << " "; cout << "\n"
typedef vector<int> vi;
typedef vector<vi> vii;
typedef pair<int,int> pi;
#define srt(a) sort(a.begin(), a.end())
#define all(a) a.begin(), a.end()
#define f first
#define s second
#define pb push_back
#define mp make_pair
#define popcount __builtin_popcountll
const int MOD = 1e9 + 7;
bool comp(pi a, pi b) {
return (a.f == b.f) ? (a.s > b.s) : (a.f < b.f);
}
void solve(){
int n;
cin >> n ;
string s1,s2;
cin >> s1 >> s2;
srt(s1);
srt(s2);
int cnt = 0 ;
forn(i,0,n){
if(s1[i]!=s2[i])cnt++;
}
cout<<cnt<<"\n";
}
signed main() {
ios::sync_with_stdio(0);
cin.tie(0);
int t = 1;
//cin >> t;
while (t--)
solve();
return 0;
}
vjudge1