結果
| 問題 | No.3774 Minimum Cost For Palindrome |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2026-10-23 21:28:06 |
| 言語 | C++23(gcc16) (gcc 16.2.0 + boost 1.92.0 + ACL) |
| 結果 |
WA
不安定
|
| 実行時間 | - |
| コード長 | 682 bytes |
| 記録 | |
| コンパイル時間 | 3,016 ms |
| コンパイル使用メモリ | 351,820 KB |
| 実行使用メモリ | 9,916 KB |
| 最終ジャッジ日時 | 2026-10-23 21:28:13 |
| 合計ジャッジ時間 | 5,300 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 WA * 2 |
| other | AC * 1 WA * 19 |
ソースコード
#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;
}