結果
問題 |
No.2209 Flip and Reverse
|
ユーザー |
![]() |
提出日時 | 2023-02-10 21:38:27 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 675 bytes |
コンパイル時間 | 3,767 ms |
コンパイル使用メモリ | 228,708 KB |
実行使用メモリ | 7,188 KB |
最終ジャッジ日時 | 2024-07-07 15:49:35 |
合計ジャッジ時間 | 5,673 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 19 WA * 11 |
ソースコード
#include<bits/stdc++.h> #include<atcoder/all> #include<string> #include<vector> #include<algorithm> #include<map> #include<math.h> #include<set> #include<regex> #include<deque> #include<queue> #define all(x) x.begin(),x.end() #define gall(x) x.begin(),x.end(),greater<>() #define rep(i,n) for (int i = 0; i < (n); ++i) #define pb push_back #define ll long long #define P pair<int,int> #define LP pair<ll,ll> using namespace std; using namespace atcoder; int main(){ int n; cin>>n; string s,t; cin>>s>>t; int ans=0; bool f=0; rep(i,n){ if(!f){ if(s[i]!=t[n-1-i]){ ans++; } } else { if(s[i]!=t[i]) ans++; } } cout<<ans<<endl; return 0; }