Submission #143555


Source Code Expand

Copy
#include<map>
#include<set>
#include<list>
#include<cmath>
#include<queue>
#include<stack>
#include<cstdio>
#include<string>
#include<vector>
#include<complex>
#include<cstdlib>
#include<cstring>
#include<climits>
#include<numeric>
#include<sstream>
#include<iostream>
#include<algorithm>
#include<functional>
 
#define mp       make_pair
#define pb       push_back
#define all(x)   (x).begin(),(x).end()
#define rep(i,n) for(int i=0;i<(n);i++)
 
using namespace std;
 
typedef    long long          ll;
typedef    unsigned long long ull;
typedef    vector<bool>       vb;
typedef    vector<int>        vi;
typedef    vector<vb>         vvb;
typedef    vector<vi>         vvi;
typedef    pair<int,int>      pii;
 
const double EPS=1e-9;
 
const int dx[]={1,0,-1,0},dy[]={0,-1,0,1};

int main(){
	string s;
	cin >> s;
	if(s.size() == 1){
		cout << 0 << endl;
		return 0;
	}

	int idx = s.size()-1;
	int cnt = 0;
	rep(i,s.size()/2){
		if(s[i] != s[idx]){
			cnt++;
		}
		idx--;
	}

	if(cnt==0){
		cout << 25*s.size() << endl;
	}else if(cnt==1){
		cout << 24*2+25*(s.size()-2) << endl;
	}else{
		cout << 25*s.size() << endl;
	}
}

Submission Info

Submission Time
Task B - こだわりの名前
User igaxx
Language C++ (G++ 4.6.4)
Score 0
Code Size 1188 Byte
Status WA
Exec Time 36 ms
Memory 1396 KB

Judge Result

Set Name All
Score / Max Score 0 / 100
Status
AC × 31
WA × 5
Set Name Test Cases
All hand_1.txt, hand_2.txt, hand_3.txt, hand_4.txt, hand_5.txt, hand_6.txt, palindrome_1.txt, palindrome_12345.txt, palindrome_2.txt, palindrome_299998.txt, palindrome_299999.txt, palindrome_3.txt, palindrome_300000.txt, palindrome_4.txt, palindrome_5.txt, palindrome_6789.txt, palindrome_67890.txt, palindrome_mod_1.txt, palindrome_mod_1000.txt, palindrome_mod_10000.txt, palindrome_mod_100001.txt, palindrome_mod_2.txt, palindrome_mod_200000.txt, palindrome_mod_299999.txt, palindrome_mod_3.txt, palindrome_mod_300000.txt, palindrome_mod_4.txt, palindrome_mod_5.txt, palindrome_mod_50001.txt, random_1.txt, random_10.txt, random_100001.txt, random_101.txt, random_3000.txt, random_300000.txt, random_50001.txt
Case Name Status Exec Time Memory
hand_1.txt AC 36 ms 1396 KB
hand_2.txt AC 36 ms 1324 KB
hand_3.txt AC 36 ms 1312 KB
hand_4.txt AC 36 ms 1320 KB
hand_5.txt AC 36 ms 1324 KB
hand_6.txt AC 36 ms 1320 KB
palindrome_1.txt AC 21 ms 924 KB
palindrome_12345.txt WA 21 ms 932 KB
palindrome_2.txt AC 21 ms 800 KB
palindrome_299998.txt AC 36 ms 1320 KB
palindrome_299999.txt WA 36 ms 1320 KB
palindrome_3.txt WA 20 ms 800 KB
palindrome_300000.txt AC 36 ms 1324 KB
palindrome_4.txt AC 21 ms 924 KB
palindrome_5.txt WA 21 ms 800 KB
palindrome_6789.txt WA 22 ms 924 KB
palindrome_67890.txt AC 24 ms 1048 KB
palindrome_mod_1.txt AC 21 ms 924 KB
palindrome_mod_1000.txt AC 20 ms 924 KB
palindrome_mod_10000.txt AC 21 ms 924 KB
palindrome_mod_100001.txt AC 26 ms 928 KB
palindrome_mod_2.txt AC 20 ms 928 KB
palindrome_mod_200000.txt AC 31 ms 1068 KB
palindrome_mod_299999.txt AC 36 ms 1320 KB
palindrome_mod_3.txt AC 21 ms 676 KB
palindrome_mod_300000.txt AC 36 ms 1320 KB
palindrome_mod_4.txt AC 21 ms 800 KB
palindrome_mod_5.txt AC 21 ms 924 KB
palindrome_mod_50001.txt AC 23 ms 928 KB
random_1.txt AC 21 ms 928 KB
random_10.txt AC 21 ms 924 KB
random_100001.txt AC 25 ms 936 KB
random_101.txt AC 21 ms 928 KB
random_3000.txt AC 21 ms 928 KB
random_300000.txt AC 36 ms 1324 KB
random_50001.txt AC 22 ms 796 KB
sample_1.txt AC 21 ms 808 KB
sample_2.txt AC 21 ms 808 KB
sample_3.txt AC 20 ms 932 KB