結果

問題 No.2209 Flip and Reverse
ユーザー achapiachapi
提出日時 2023-02-11 00:22:41
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 860 bytes
コンパイル時間 4,618 ms
コンパイル使用メモリ 259,016 KB
実行使用メモリ 7,172 KB
最終ジャッジ日時 2023-09-22 00:59:09
合計ジャッジ時間 7,607 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,380 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 2 ms
4,376 KB
testcase_06 AC 2 ms
4,376 KB
testcase_07 AC 2 ms
4,376 KB
testcase_08 WA -
testcase_09 AC 1 ms
4,380 KB
testcase_10 AC 2 ms
4,376 KB
testcase_11 AC 1 ms
4,376 KB
testcase_12 AC 2 ms
4,376 KB
testcase_13 WA -
testcase_14 AC 44 ms
6,936 KB
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 AC 45 ms
6,932 KB
testcase_19 AC 45 ms
6,984 KB
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 AC 44 ms
7,032 KB
testcase_24 AC 43 ms
6,936 KB
testcase_25 WA -
testcase_26 WA -
testcase_27 WA -
testcase_28 AC 41 ms
7,144 KB
testcase_29 AC 41 ms
6,976 KB
testcase_30 AC 41 ms
6,936 KB
testcase_31 WA -
testcase_32 AC 40 ms
6,908 KB
testcase_33 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
#include <atcoder/all>
using namespace std;
using namespace atcoder;
typedef long long ll;
//using mint = modint998244353;
//using mint = modint1000000007;
#define all(...) std::begin(__VA_ARGS__), std::end(__VA_ARGS__)
#define rall(...) std::rbegin(__VA_ARGS__), std::rend(__VA_ARGS__)
#define debug(x) cerr << "\033[33m(line:" << __LINE__ << ") " << #x << ": " << x << "\033[m" << endl;
int dx[4]={1,0,-1,0};
int dy[4]={0,1,0,-1};
const int inf = INT_MAX / 2; const ll infl = 1LL << 60;
template<class T>bool chmax(T& a, const T& b) { if (a < b) { a = b; return 1; } return 0; }
template<class T>bool chmin(T& a, const T& b) { if (b < a) { a = b; return 1; } return 0; }

int main() {
	int n;cin>>n;
	string s,t;cin>>s>>t;
	int a=0,b=0;
	for(int i=0;i<n;i++){
		if(s[i]!=t[i])a++;
		if(s[n-i-1]!=t[i])b++;
	}
	cout<<min(a,b)<<endl;
}
0