結果
| 問題 | No.3774 Minimum Cost For Palindrome |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2026-10-23 21:27:57 |
| 言語 | C++23(gcc16) (gcc 16.2.0 + boost 1.92.0 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 18 ms / 2,000 ms |
| + 731µs | |
| コード長 | 331 bytes |
| 記録 | |
| コンパイル時間 | 2,193 ms |
| コンパイル使用メモリ | 195,152 KB |
| 実行使用メモリ | 9,860 KB |
| 最終ジャッジ日時 | 2026-10-23 21:28:03 |
| 合計ジャッジ時間 | 3,999 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge5_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 20 |
コンパイルメッセージ
main.cpp:9:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
9 | main() {
| ^~~~
ソースコード
#include <iostream>
#include <vector>
#include <algorithm>
#include <map>
#include <stack>
#include <queue>
using namespace std;
main() {
string s;
cin>>s;
int ans=0;
for (int i=0;i<s.size();i++) {
int j=s.size()-1-i;
if (i>=j) continue;
if (s[j]!=s[i]) ans++;
}
cout<<ans<<endl;
}