結果

問題 No.2209 Flip and Reverse
ユーザー soragsorag
提出日時 2023-02-10 21:38:27
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 675 bytes
コンパイル時間 3,767 ms
コンパイル使用メモリ 227,256 KB
実行使用メモリ 7,208 KB
最終ジャッジ日時 2023-09-21 22:43:19
合計ジャッジ時間 6,245 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,376 KB
testcase_01 AC 1 ms
4,380 KB
testcase_02 AC 1 ms
4,380 KB
testcase_03 AC 2 ms
4,380 KB
testcase_04 AC 1 ms
4,376 KB
testcase_05 AC 1 ms
4,376 KB
testcase_06 AC 1 ms
4,380 KB
testcase_07 AC 2 ms
4,376 KB
testcase_08 WA -
testcase_09 AC 2 ms
4,380 KB
testcase_10 AC 1 ms
4,380 KB
testcase_11 WA -
testcase_12 AC 2 ms
4,376 KB
testcase_13 AC 2 ms
4,380 KB
testcase_14 AC 40 ms
7,208 KB
testcase_15 AC 40 ms
6,992 KB
testcase_16 AC 41 ms
7,072 KB
testcase_17 AC 40 ms
6,888 KB
testcase_18 WA -
testcase_19 WA -
testcase_20 AC 40 ms
7,024 KB
testcase_21 AC 40 ms
6,932 KB
testcase_22 AC 40 ms
6,988 KB
testcase_23 WA -
testcase_24 WA -
testcase_25 AC 40 ms
6,944 KB
testcase_26 WA -
testcase_27 WA -
testcase_28 AC 41 ms
7,060 KB
testcase_29 AC 40 ms
6,888 KB
testcase_30 WA -
testcase_31 AC 40 ms
6,944 KB
testcase_32 WA -
testcase_33 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

#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;
}
0