結果
| 問題 |
No.2209 Flip and Reverse
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2023-02-10 21:24:11 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 354 bytes |
| コンパイル時間 | 3,896 ms |
| コンパイル使用メモリ | 251,920 KB |
| 最終ジャッジ日時 | 2025-02-10 12:08:32 |
|
ジャッジサーバーID (参考情報) |
judge2 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 7 WA * 23 |
ソースコード
#include<bits/stdc++.h>
using namespace std;
#include<atcoder/all>
using namespace atcoder;
using ll = long long;
int n;
string s,t;
void solve(){
int ans = 0;
for(int i = n-1;i>=0;i--){
if(abs(s[i]-t[i])!=ans%2){
ans++;
}
}
cout<<ans<<endl;
}
signed main(){
cin.tie(nullptr);
ios::sync_with_stdio(false);
cin >> n >> s >> t;
solve();
}