結果
| 問題 | No.3774 Minimum Cost For Palindrome |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2026-10-23 21:28:42 |
| 言語 | C++23(gcc16) (gcc 16.2.0 + boost 1.92.0 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 4 ms / 2,000 ms |
| + 564µs | |
| コード長 | 682 bytes |
| 記録 | |
| コンパイル時間 | 2,582 ms |
| コンパイル使用メモリ | 354,080 KB |
| 実行使用メモリ | 9,920 KB |
| 最終ジャッジ日時 | 2026-10-23 21:28:57 |
| 合計ジャッジ時間 | 4,848 ms |
|
ジャッジサーバーID (参考情報) |
judge4_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 20 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using vll = vector<ll>;
using vvl = vector<vll>;
using pll = pair<ll,ll>;
#define rep(i,N) for(ll i=0;i<N;++i)
#define rrep(i,N) for(ll i=N-1; i>=0; --i)
#define all(v) (v).begin(), (v).end()
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return true; } return false; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return true; } return false; }
int main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
string S;cin >> S;
ll N=S.size();
ll ans=0;
rep(i,N/2){
if(S[i]!=S[N-i-1])ans++;
}
cout << ans << endl;
return 0;
}