結果
| 問題 | No.3774 Minimum Cost For Palindrome |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2026-10-23 21:25:42 |
| 言語 | C++23(gcc16) (gcc 16.2.0 + boost 1.92.0 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 17 ms / 2,000 ms |
| + 411µs | |
| コード長 | 679 bytes |
| 記録 | |
| コンパイル時間 | 2,970 ms |
| コンパイル使用メモリ | 351,328 KB |
| 実行使用メモリ | 9,872 KB |
| 最終ジャッジ日時 | 2026-10-23 21:25:48 |
| 合計ジャッジ時間 | 5,611 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge4_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 20 |
ソースコード
#include<bits/stdc++.h>
#define CSP2026 using
#define RP namespace
#define PLUSPLUS std
CSP2026 RP PLUSPLUS;
#define debug(x) cout<<"clock="<<clock()<<' '<<#x<<'='<<(x)<<'\n'
//#define getchar getchar_unlocked
using ll=long long;
inline int rd(){int x=0,f=1;char ch=getchar();for(;!isdigit(ch);ch=getchar())if(ch=='-')f=-1;for(;isdigit(ch);ch=getchar())x=(x<<3)+(x<<1)+(ch^48);return x*f;}
inline ll rdll(){ll x=0;int f=1;char ch=getchar();for(;!isdigit(ch);ch=getchar())if(ch=='-')f=-1;for(;isdigit(ch);ch=getchar())x=(x<<3)+(x<<1)+(ch^48);return x*f;}
signed main(){
string s;cin>>s;
int l=s.size(),ans=0;
for(int i=1;i<=l/2;++i)if(s[i-1]!=s[l-i])++ans;
cout<<ans<<'\n';
}