buggy_code stringlengths 11 625k | fixed_code stringlengths 17 625k | bug_type stringlengths 2 4.45k | language int64 0 8 | token_count int64 5 200k |
|---|---|---|---|---|
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# FileName: B
# CreatedDate: 2020-03-22 20:59:36 +0900
# LastModified: 2020-03-22 21:36:47 +0900
#
import os
import sys
def main():
S = input()
N = len(S)
S_b = S[:(N-1)//2]
S_a = S[(N+1)//2:]
for i in range((N+1)//2-1):
if S[i]!=S[-(i+1)... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# FileName: B
# CreatedDate: 2020-03-22 20:59:36 +0900
# LastModified: 2020-03-22 22:25:25 +0900
#
import os
import sys
def main():
S = input()
N = len(S)
S_b = S[:(N-1)//2]
S_a = S[(N+1)//2:]
for i in range((N+1)//2-1):
if S[i]!=S[-(i+1)... | [["+", 15, 666, 0, 206, 206, 664, 28, 23, 0, 24], ["+", 0, 206, 206, 664, 28, 23, 0, 657, 17, 72], ["+", 0, 206, 206, 664, 28, 23, 0, 657, 12, 612], ["+", 15, 666, 0, 206, 206, 664, 28, 23, 0, 25]] | 5 | 184 |
wholeString = input()
firstSub = wholeString[0:int((len(wholeString)-1)/2)]
secondSub = wholeString[int(((len(wholeString)+3)/2)-1):]
if len(wholeString) % 2 == 0 or len(wholeString) < 3 or len(wholeString) > 99:
print("No")
if firstSub == firstSub[::-1] and secondSub == secondSub[::-1] and wholString == wholeString... | wholeString = input()
firstSub = wholeString[0:int((len(wholeString)-1)/2)]
secondSub = wholeString[int(((len(wholeString)+3)/2)-1):]
if len(wholeString) % 2 == 0 or len(wholeString) < 3 or len(wholeString) > 99:
print("No")
if firstSub == firstSub[::-1] and secondSub == secondSub[::-1] and wholeString == wholeStrin... | [["-", 0, 656, 0, 57, 15, 679, 12, 666, 0, 22], ["+", 0, 656, 0, 57, 15, 679, 12, 666, 0, 22]] | 5 | 123 |
S=input()
sum="Yes"
kai=len(S)
unk=(int(kai)-1)/2
unk1=(int(kai)+3)/2
A=S[0:int(unk)]
B=S[int(unk1):int(kai)]
for i in range(kai//2):
if S[i]!=S[-i-1]:
sum="No"
for i in range(len(A)):
if A[i]!=A[-i-1]:
sum="No"
for i in range(len(B)):
if B[i]!=B[-i-1]:
sum="No"
print(sum) | S=input()
sum="Yes"
kai=len(S)
unk=(int(kai)-1)/2
unk1=(int(kai)+3)/2
A=S[0:int(unk)]
B=S[int(unk1-1):int(kai)]
#print(B)
for i in range(kai//2):
if S[i]!=S[-i-1]:
sum="No"
for i in range(len(A)):
if A[i]!=A[-i-1]:
sum="No"
for i in range(len(B)):
if B[i]!=B[-i-1]:
sum="No"
print(sum) | [["+", 206, 663, 0, 652, 3, 4, 0, 657, 17, 33], ["+", 206, 663, 0, 652, 3, 4, 0, 657, 12, 612]] | 5 | 158 |
#include <stdio.h>
#include <string.h>
int main(int argc, char const *argv[]) {
char a[1000];
scanf("%s", a);
int b = strlen(a);
int c = 1;
for (int i = 0; i < b / 2; i++) {
if (a[i] != a[b - 1 - i]) {
c = 0;
}
}
int f = (b + 3) / 2;
int k = f;
for (int i = b - 1; i > f; i--) {
if (... | #include <stdio.h>
#include <string.h>
int main(int argc, char const *argv[]) {
char a[1000];
scanf("%s", a);
int b = strlen(a);
int c = 1;
for (int i = 0; i < b / 2; i++) {
if (a[i] != a[b - 1 - i]) {
c = 0;
}
}
int f = (b + 3) / 2;
int k = f;
for (int i = b - 1; i > f; i--) {
if (... | [["+", 15, 23, 0, 16, 12, 69, 71, 16, 17, 33], ["+", 15, 23, 0, 16, 12, 69, 71, 16, 12, 13]] | 0 | 225 |
def palindrome(string): return 1 if string==string[::-1] else 0
kaibun=input()
N=len(kaibun)
A=kaibun[0:int((N-1)/2)]
B=kaibun[int((N+3)/2-1):int(N)]
if palindrome(A) & palindrome(B):
print('Yes')
else:
print('No') | def palindrome(string): return 1 if string==string[::-1] else 0
kaibun=input()
N=len(kaibun)
A=kaibun[0:int((N-1)/2)]
B=kaibun[int((N+3)/2-1):int(N)]
if palindrome(kaibun) & palindrome(A) & palindrome(B):
print('Yes')
else:
print('No') | [["+", 15, 657, 31, 657, 31, 652, 3, 4, 0, 22], ["+", 15, 657, 31, 657, 31, 652, 3, 4, 0, 25], ["+", 0, 656, 0, 57, 15, 657, 31, 657, 17, 67], ["+", 0, 57, 15, 657, 31, 657, 12, 652, 63, 22], ["+", 15, 657, 31, 657, 12, 652, 3, 4, 0, 24]] | 5 | 95 |
S = str(input())
N = len(S)
A = S[0:((N-1)//2)]
B = S[(N+3)//2-1:N]
if S == S[::-1] and A == A[::-1] and B == B[::-1]:
print('Yes')
else:
print('no')
#C | S = str(input())
N = len(S)
A = S[0:((N-1)//2)]
B = S[(N+3)//2-1:N]
if S == S[::-1] and A == A[::-1] and B == B[::-1]:
print('Yes')
else:
print('No')
| [["-", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6], ["+", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6]] | 5 | 92 |
s=input()
a=1
for i in range(len(s)):
if(s[i]!=s[-i-1]):
a=0
break
for i in range((len(s)-1)//2):
if(s[i]!=s[(len(s)-3)//2]):
a=0
break
if(a==1):
print("Yes")
else:
print("No") | s=input()
a=1
for i in range(len(s)):
if(s[i]!=s[-i-1]):
a=0
break
for i in range((len(s)-1)//2):
if(s[i]!=s[(len(s)-3)//2-i]):
a=0
break
if(a==1):
print("Yes")
else:
print("No") | [["+", 15, 23, 0, 666, 0, 206, 206, 657, 17, 33], ["+", 15, 23, 0, 666, 0, 206, 206, 657, 12, 22]] | 5 | 103 |
S = input()
N = len(S)
str_num = -1
reverse_S = ''
#条件1(Sが回文であるか)
for i in range(-1,-(N+1),-1):
reverse_S = reverse_S + S[i]
if S == reverse_S:
condition1 = 'YES'
else:
condition1 = 'NO'
#条件2
S2 = ''
N2 = int((N-1)/2)
for i in range(N2):
S2 = S2 + S[i]
reverse_S2 = ''
for i in range(-1,-(N2+1),-1):
reve... | S = input()
N = len(S)
str_num = -1
reverse_S = ''
#条件1(Sが回文であるか)
for i in range(-1,-(N+1),-1):
reverse_S = reverse_S + S[i]
if S == reverse_S:
condition1 = 'YES'
else:
condition1 = 'NO'
#条件2
S2 = ''
N2 = int((N-1)/2)
for i in range(N2):
S2 = S2 + S[i]
reverse_S2 = ''
for i in range(-1,-(N2+1),-1):
reve... | [["+", 36, 36, 0, 656, 0, 57, 15, 666, 667, 60], ["+", 0, 656, 0, 57, 15, 666, 0, 557, 0, 654], ["+", 0, 656, 0, 57, 15, 666, 0, 557, 0, 6], ["+", 0, 656, 0, 57, 15, 666, 0, 557, 0, 655]] | 5 | 251 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int a, b, c, d, i, j, k, t = 0, tt = 0;
string x;
vector<char> v;
vector<char> v1;
cin >> x;
a = x.length();
b = x.length() - 1;
k = 0;
while (k < b) {
if (x[b] != x[k]) {
tt++;
}
k++;
b--;
}
for (i = 0; i < ((a - 1)... | #include <bits/stdc++.h>
using namespace std;
int main() {
int a, b, c, d, i, j, k, t = 0, tt = 0;
string x;
vector<char> v;
vector<char> v1;
cin >> x;
a = x.length();
b = x.length() - 1;
k = 0;
while (k < b) {
if (x[b] != x[k]) {
tt++;
}
k++;
b--;
}
for (i = 0; i < ((a - 1)... | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 98], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 106]] | 1 | 247 |
S = input()
N = len(S)
N_2 = (N+1) // 2 -1
if (N+1) % 4 == 0:
N1 = N2 = (N+1) // 4 -1
N3 = N4 = (N1+1) * 3 -1
else:
N1 = (N-1) // 4 -1
N2 = N1 + 1
N3 = N_2 + N1 +1
N4 = N3 + 1
#print(N1, N2, N3, N4)
#print(S[0:N1+1], S[N2:N_2], S[N_2+1:N3+1], S[N4:N])
if S[0:N_2] == S[N_2:N][::-1] and S[0:N1+1] == S[... | S = input()
N = len(S)
N_2 = (N+1) // 2 -1
if (N+1) % 4 == 0:
N1 = N2 = (N+1) // 4 -1
N3 = N4 = (N1+1) * 3 -1
else:
N1 = (N-1) // 4 -1
N2 = N1 + 1
N3 = N_2 + N1 +1
N4 = N3 + 1
#print(N1, N2, N3, N4)
#print(S[0:N1+1], S[N2:N_2], S[N_2+1:N3+1], S[N4:N], S[0:N_2], S[N_2+1:N])
if S[0:N_2] == S[N_2+1:N][:... | [["+", 0, 206, 51, 206, 206, 663, 0, 657, 17, 72], ["+", 0, 206, 51, 206, 206, 663, 0, 657, 12, 612]] | 5 | 172 |
#include <bits/stdc++.h>
using namespace std;
bool isKaibun(string s) {
int l = s.size();
for (int i = 0; i < l / 2; i++) {
if (s.at(i) != s.at(l - i - 1))
return false;
}
return true;
}
int main() {
string s;
cin >> s;
int n = s.size();
if (n % 2 == 0) {
cout << "No" << endl;
retu... | #include <bits/stdc++.h>
using namespace std;
bool isKaibun(string s) {
int l = s.size();
for (int i = 0; i < l / 2; i++) {
if (s.at(i) != s.at(l - i - 1))
return false;
}
return true;
}
int main() {
string s;
cin >> s;
int n = s.size();
if (!isKaibun(s)) {
cout << "No" << endl;
re... | [["-", 0, 57, 15, 339, 51, 16, 31, 16, 31, 22], ["-", 0, 57, 15, 339, 51, 16, 31, 16, 17, 109], ["-", 0, 57, 15, 339, 51, 16, 31, 16, 12, 13], ["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 60], ["-", 8, 9, 0, 57, 15, 339, 51, 16, 12, 13], ["+", 8, 9, 0, 57, 15, 339, 51, 91, 17, 111], ["+", 0, 57, 15, 339, 51, 91, 28, 2, 63, ... | 1 | 194 |
s = input()
def is_palindrome(s):
return s == s[::-1]
s_len = len(s)
if is_palindrome(s):
if is_palindrome(s[:(s_len-1)//2]):
if is_palindrome(s[(s_len+3)//2-1:]):
print("Yes")
else:
print("No")
| s = input()
def is_palindrome(s):
return s == s[::-1]
s_len = len(s)
if is_palindrome(s) and is_palindrome(s[:(s_len-1)//2]) and is_palindrome(s[(s_len+3)//2-1:]):
print("Yes")
else:
print("No")
| [["-", 36, 36, 36, 36, 0, 656, 0, 57, 0, 102], ["-", 0, 656, 0, 57, 64, 196, 0, 57, 0, 121], ["+", 0, 656, 0, 57, 15, 679, 31, 679, 17, 355], ["-", 0, 656, 0, 57, 64, 196, 0, 57, 0, 102], ["-", 64, 196, 0, 57, 64, 196, 0, 57, 0, 121], ["+", 36, 36, 0, 656, 0, 57, 15, 679, 17, 355]] | 5 | 81 |
from collections import deque
def reverse(p):
q = p[::-1]
if p == q:
return True
else:
return False
S = input()
N = len(S)
pt1 = (N - 1) // 2 - 1
pt2 = (N + 3) // 2 - 1
ptS1 = S[:pt1 + 1]
ptS2 = S[pt2:]
#print(ptS1, ptS2)
#print(reverse(ptS1), reverse(ptS2))
if reverse(ptS1) and rev... | from collections import deque
def reverse(p):
q = p[::-1]
if p == q:
return True
else:
return False
S = input()
N = len(S)
pt1 = (N - 1) // 2 - 1
pt2 = (N + 3) // 2 - 1
ptS1 = S[:pt1 + 1]
ptS2 = S[pt2:]
#print(ptS1, ptS2)
#print(reverse(ptS1), reverse(ptS2))
if reverse(S) and revers... | [["+", 15, 679, 31, 679, 31, 652, 3, 4, 0, 22], ["+", 15, 679, 31, 679, 31, 652, 3, 4, 0, 25], ["+", 0, 656, 0, 57, 15, 679, 31, 679, 17, 355], ["+", 0, 57, 15, 679, 31, 679, 12, 652, 63, 22], ["+", 15, 679, 31, 679, 12, 652, 3, 4, 0, 24]] | 5 | 106 |
#include <bits/stdc++.h>
using namespace std;
#define ff first
#define ss second
#define pb push_back
typedef long long ll;
typedef unsigned long long ull;
const ll mod = 1e9 + 7;
const ll inf = 9223372036854775807;
const ll mininf = -9223372036854775807;
const ll nax = 0;
ll len, n, bl;
string s;
char ch[105];
int m... | #include <bits/stdc++.h>
using namespace std;
#define ff first
#define ss second
#define pb push_back
typedef long long ll;
typedef unsigned long long ull;
const ll mod = 1e9 + 7;
const ll inf = 9223372036854775807;
const ll mininf = -9223372036854775807;
const ll nax = 0;
ll len, n, bl;
string s;
char ch[105];
int m... | [["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6]] | 1 | 296 |
s = gets.chomp.chars
n = s.length
m = (n-1)/2
u = (n+3)/2
mae = s[0..m-1]
ushiro = s[u-1..n-1]
if mae == mae.reverse && ushiro == ushiro.reverse && s = s.reverse
puts "Yes"
else
puts "No"
end | s = gets.chomp.chars
n = s.length
m = (n-1)/2
u = (n+3)/2
mae = s[0..m-1]
ushiro = s[u-1..n-1]
if mae == mae.reverse && ushiro == ushiro.reverse && s == s.reverse
puts "Yes"
else
puts "No"
end | [["-", 0, 493, 0, 121, 15, 738, 12, 662, 0, 32], ["+", 0, 493, 0, 121, 15, 738, 12, 738, 17, 60]] | 4 | 80 |
s = gets.chomp
x = s.split("")
n = x.length
if x[0..n] == x[0..n].reverse
if (x[0...((n - 1) / 2)] == x[0...((n - 1) / 2)].reverse) && (x[((n + 3) / 2) - 1...n] == x[((n + 3) / 2) - 1...n].reverse)
puts 'Yes'
else put 'No'
end
else puts 'No'
end | s = gets.chomp
x = s.split("")
n = x.length
if x[0..n] == x[0..n].reverse
if (x[0...((n - 1) / 2)] == x[0...((n - 1) / 2)].reverse) && (x[((n + 3) / 2) - 1...n] == x[((n + 3) / 2) - 1...n].reverse)
puts 'Yes'
else puts 'No'
end
else puts 'No'
end | [["-", 64, 749, 0, 121, 75, 95, 0, 652, 735, 22], ["+", 64, 749, 0, 121, 75, 95, 0, 652, 735, 22]] | 4 | 123 |
ans = "Yes"
s = input()
if s != s[::-1]: # スライスというやつ
ans = "No"
n = len(s) // 2
if s[:n] != s[:n:-1]:
ans = "No"
print(ans) | ans = "Yes"
s = input()
if s != s[::-1]: # スライスというやつ 全体が回文かどうか
ans = "No"
n = len(s) // 2
if s[:n] != s[n-1::-1]: # 全体が回文は保証されているので片方だけ判定
ans = "No"
print(ans) | [["-", 0, 57, 15, 666, 0, 206, 206, 663, 0, 102], ["+", 15, 666, 0, 206, 206, 663, 0, 657, 17, 33], ["+", 15, 666, 0, 206, 206, 663, 0, 657, 12, 612], ["+", 0, 57, 15, 666, 0, 206, 206, 663, 0, 102]] | 5 | 60 |
#include <algorithm>
#include <bits/stdc++.h>
#include <cstdio>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
string str;
cin >> str;
bool p = true;
int len = str.size();
for (int i = 0; i < len / 2; i++) {
if (st... | #include <algorithm>
#include <bits/stdc++.h>
#include <cstdio>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
string str;
cin >> str;
bool p = true;
int len = str.size();
for (int i = 0; i < len / 2; i++) {
if (st... | [["-", 0, 57, 64, 1, 0, 16, 12, 5, 0, 6], ["+", 0, 57, 64, 1, 0, 16, 12, 5, 0, 6], ["-", 75, 76, 0, 1, 0, 16, 12, 5, 0, 6], ["+", 75, 76, 0, 1, 0, 16, 12, 5, 0, 6]] | 1 | 289 |
text = str(input())
n = len(text)
target = (n-1)//2
print(target)
bef = text[:target]
aft = text[target+1:]
if bef == aft:
print("Yes")
else:
print("No") | text = str(input())
n = len(text)
target = (n-1)//2
bef = text[:target]
aft = text[target+1:]
if bef == aft:
print("Yes")
else:
print("No") | [["-", 36, 36, 0, 656, 0, 1, 0, 652, 63, 22], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 24], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 22], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 25]] | 5 | 62 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int l, m, flag = 0;
string s;
cin >> s;
l = s.length();
if ((l % 2) != 1)
flag = 1;
m = l / 2;
for (int j = 0; j < m; j++) {
if (s[j] != s[l - j - 1])
flag = 1;
}
int x, y, q, r;
x = (l - 1) / 2;
q = x / 2;
for (int j = 0... | #include <bits/stdc++.h>
using namespace std;
int main() {
int l, m, flag = 0;
string s;
cin >> s;
l = s.length();
if ((l % 2) != 1)
flag = 1;
m = l / 2;
for (int j = 0; j < m; j++) {
if (s[j] != s[l - j - 1])
flag = 1;
}
int x, y, q, r;
x = (l - 1) / 2;
q = x / 2;
for (int j = 0... | [["-", 12, 69, 341, 342, 0, 16, 31, 16, 31, 22], ["+", 12, 69, 341, 342, 0, 16, 31, 16, 31, 22]] | 1 | 226 |
#include <algorithm>
#include <iostream>
#include <string.h>
using namespace std;
bool isPalindrome(string s) {
string x = s;
reverse(x.begin(), x.end());
if (x == s) {
return true;
}
return false;
}
int main() {
string S;
cin >> S;
string A, B;
A = S.substr(0, ((int)(S.length()) - 1) / 2);
... | #include <algorithm>
#include <iostream>
#include <string.h>
using namespace std;
bool isPalindrome(string s) {
string x = s;
reverse(x.begin(), x.end());
if (x == s) {
return true;
}
return false;
}
int main() {
string S;
cin >> S;
string A, B;
A = S.substr(0, ((int)(S.length()) - 1) / 2);
... | [["+", 0, 57, 75, 76, 0, 1, 0, 16, 31, 22], ["+", 0, 57, 75, 76, 0, 1, 0, 16, 17, 151]] | 1 | 187 |
import math
s = input()
list = list(s)
num = math.floor(len(s)/2)
count = 0
if len(s) == 3:
if list[0] == list[2]:
print("Yes")
else:
print("No")
else:
for i in range(num):
if list[i] == list[len(s) - 1 - i]:
count += 1
else:
print("No")
... | import math
s = input()
list = list(s)
num = math.floor(len(s)/2)
count = 0
if len(s) == 3:
if list[0] == list[2]:
print("Yes")
else:
print("No")
else:
for i in range(num):
if list[i] == list[num+1+i]:
count += 1
else:
print("No")
... | [["-", 0, 206, 206, 657, 31, 657, 31, 652, 63, 22], ["-", 206, 657, 31, 657, 31, 652, 3, 4, 0, 24], ["-", 206, 657, 31, 657, 31, 652, 3, 4, 0, 22], ["-", 206, 657, 31, 657, 31, 652, 3, 4, 0, 25], ["-", 15, 666, 0, 206, 206, 657, 31, 657, 17, 33], ["+", 15, 666, 0, 206, 206, 657, 31, 657, 31, 22], ["+", 15, 666, 0, 206,... | 5 | 127 |
#include <bits/stdc++.h>
using namespace std;
bool ispalin(string s) {
string ss = s;
reverse(s.begin(), s.end());
if (ss == s)
return true;
else
return false;
}
int main() {
string s, s1 = "", s2 = "";
cin >> s;
int n = s.length();
int n1 = (n - 1) / 2;
int n2 = (n + 3) / 2;
for (int i ... | #include <bits/stdc++.h>
using namespace std;
bool ispalin(string s) {
string ss = s;
reverse(s.begin(), s.end());
if (ss == s)
return true;
else
return false;
}
int main() {
string s, s1 = "", s2 = "";
cin >> s;
int n = s.length();
int n1 = (n - 1) / 2;
int n2 = (n + 3) / 2;
for (int i ... | [["+", 51, 16, 31, 16, 31, 2, 3, 4, 0, 22], ["+", 51, 16, 31, 16, 31, 2, 3, 4, 0, 25], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 17, 98], ["+", 15, 339, 51, 16, 31, 16, 12, 2, 63, 22], ["+", 51, 16, 31, 16, 12, 2, 3, 4, 0, 24]] | 1 | 181 |
#include <bits/stdc++.h>
using namespace std;
#define what_is(x) cerr << #x << " is " << x << endl;
#define ll long long
#define gcd(a, b) __gcd(a, b)
#define pi 2 * acos(0.0)
// use emplace_back() instead of push_back()
template <typename T> void print(T t) {
for (const auto &e : t)
cout << e << " ";
cout << e... | #include <bits/stdc++.h>
using namespace std;
#define what_is(x) cerr << #x << " is " << x << endl;
#define ll long long
#define gcd(a, b) __gcd(a, b)
#define pi 2 * acos(0.0)
// use emplace_back() instead of push_back()
template <typename T> void print(T t) {
for (const auto &e : t)
cout << e << " ";
cout << e... | [["-", 0, 57, 64, 1, 0, 16, 12, 5, 0, 6], ["+", 0, 57, 64, 1, 0, 16, 12, 5, 0, 6], ["-", 64, 9, 0, 1, 0, 16, 12, 5, 0, 6], ["+", 64, 9, 0, 1, 0, 16, 12, 5, 0, 6], ["-", 75, 76, 0, 1, 0, 16, 12, 5, 0, 6], ["+", 75, 76, 0, 1, 0, 16, 12, 5, 0, 6]] | 1 | 302 |
s = input()
n = len(s)
s1 = s[0:len(s)//2]
s2 = s[len(s)//2+1:len(s)]
def reverse(s):
return s[::-1]
def isPalindrome(s):
rev = reverse(s)
if (s == rev):
return True
return False
if isPalindrome(s):
if n % 2 == 0:
print("No")
elif isPalindrome(s1) and isPalindrome(s2):
... | s = input()
n = len(s)
s1 = s[0:len(s)//2]
s2 = s[len(s)//2+1:len(s)]
def reverse(s):
return s[::-1]
def isPalindrome(s):
rev = reverse(s)
if (s == rev):
return True
return False
if isPalindrome(s):
if n % 2 == 0:
print("No")
elif isPalindrome(s1) and isPalindrome(s2):
... | [["-", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6], ["+", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6]] | 5 | 131 |
#include <cmath>
#include <iostream>
#include <queue>
#include <stack>
#include <stdio.h>
#include <string.h>
using namespace std;
int main() {
int a, b, c, d, j, o, p, r, q, i;
char s[100], n[100];
while (~scanf("%s", s)) {
a = strlen(s);
d = 0;
j = 0;
o = 0;
p = 0;
r = 0;
b = (a - 1)... | #include <cmath>
#include <iostream>
#include <queue>
#include <stack>
#include <stdio.h>
#include <string.h>
using namespace std;
int main() {
int a, b, c, d, j, o, p, r, q, i;
char s[100], n[100];
while (~scanf("%s", s)) {
a = strlen(s);
d = 0;
j = 0;
o = 0;
p = 0;
r = 0;
b = (a - 1)... | [["-", 64, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 64, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]] | 1 | 308 |
#include <bits/stdc++.h>
using namespace std;
#define endl '\n'
#define ll long long int
#define pb push_back
#define mk make_pair
#define ff first
#define ss second
bool find(string s) {
ll l = s.length();
for (int i = 0; i < l; i++) {
if (s[i] != s[l - i - 1])
return false;
}
return true;
}
int mai... | #include <bits/stdc++.h>
using namespace std;
#define endl '\n'
#define ll long long int
#define pb push_back
#define mk make_pair
#define ff first
#define ss second
bool find(string s) {
ll l = s.length();
for (int i = 0; i < l; i++) {
if (s[i] != s[l - i - 1])
return false;
}
return true;
}
int mai... | [["-", 0, 14, 8, 9, 0, 1, 0, 16, 31, 22], ["-", 0, 14, 8, 9, 0, 1, 0, 16, 17, 151], ["-", 0, 14, 8, 9, 0, 1, 0, 16, 12, 22], ["-", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35]] | 1 | 177 |
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define REP(i, a, b) for (int i = (int)(a); i < (int)(b); i++)
using ll = long long;
bool kaibun(string s) {
int sl = s.size();
for (int i = 0; i < (sl - 1) / 2; i++) {
if (s[i] != s[sl - i - 1]) {
return ... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define REP(i, a, b) for (int i = (int)(a); i < (int)(b); i++)
using ll = long long;
int kaibun(string s) {
int size = s.size();
for (int i = 0; i <= (size - 1) / 2; i++) {
if (s[i] != s[size - i - 1]) {
r... | [["-", 36, 36, 36, 36, 0, 30, 0, 14, 39, 40], ["+", 36, 36, 36, 36, 0, 30, 0, 14, 39, 40], ["-", 0, 14, 8, 9, 0, 43, 49, 50, 49, 22], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 49, 22], ["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19], ["-", 15, 16, 12, 16, 31, 23, 0, 16, 31, 22], ["+", 15, 16,... | 1 | 209 |
#include <bits/stdc++.h>
using namespace std;
bool pal(string s) {
int i, l = s.size();
// cout<<l<<endl;
string s1 = s;
for (i = 0; i < l / 2; i++)
swap(s[i], s[l - 1 - i]);
if (s1 == s)
return 1;
return 0;
}
int main() {
string s;
cin >> s;
int i, n = s.size();
string s1, s2;
for (i = 0;... | #include <bits/stdc++.h>
using namespace std;
bool pal(string s) {
int i, l = s.size();
string s1 = s;
for (i = 0; i < l / 2; i++)
swap(s[i], s[l - 1 - i]);
if (s1 == s)
return 1;
return 0;
}
int main() {
string s;
cin >> s;
int i, n = s.size();
string s1, s2;
for (i = 0; i < n / 2; i++)
... | [["-", 64, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 64, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6]] | 1 | 199 |
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define vi vector<int>
#define pb push_back
//#define unordered_map<int,int> um
int main() {
int f = 0;
string str;
cin >> str;
string temp2 = "";
string temp3 = "";
string s1 = "";
string temp1 = str;
reverse(str.begin(), str.end())... | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define vi vector<int>
#define pb push_back
//#define unordered_map<int,int> um
int main() {
int f = 0;
string str;
cin >> str;
string temp2 = "";
string temp3 = "";
string s1 = "";
string temp1 = str;
reverse(str.begin(), str.end())... | [["-", 64, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 64, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6]] | 1 | 248 |
#include <bits/stdc++.h>
#define REP(i, n) for (int i = 0; i < n; i++)
#define _GLIBCXX_DEBUG
using namespace std;
using ll = long long;
using Pi = pair<int, int>;
using Pl = pair<ll, ll>;
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
string S;
cin >> S;
int N = S.size();
string arr1 = S.substr(0, ... | #include <bits/stdc++.h>
#define REP(i, n) for (int i = 0; i < n; i++)
#define _GLIBCXX_DEBUG
using namespace std;
using ll = long long;
using Pi = pair<int, int>;
using Pl = pair<ll, ll>;
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
string S;
cin >> S;
int N = S.size();
// cout << N << endl;
... | [["-", 0, 57, 15, 339, 51, 16, 12, 16, 31, 22], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 31, 22]] | 1 | 214 |
# This file is a "Hello, world!" in Python language by CPython for wandbox.
import sys
s = input()
if s != s[::-1]:
print("No")
sys.exit()
index = (int)(len(s) - 1) // 2
s1 = s[0:index]
if s1 != s1[::-1]:
print("No1")
sys.exit()
index1 = (len(s)+3) // 2
s2 = s[index1:-1]
if s2 != s2[::-1]:
print("N... | # This file is a "Hello, world!" in Python language by CPython for wandbox.
import sys
s = input()
if s != s[::-1]:
print("No")
sys.exit()
index = (int)(len(s) - 1) // 2
s1 = s[0:index]
if s1 != s1[::-1]:
print("No")
sys.exit()
index1 = (len(s)+3) // 2
s2 = s[index1:-1]
if s2 != s2[::-1]:
print("No... | [["-", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6], ["+", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6]] | 5 | 124 |
#include <algorithm>
#include <bits/stdc++.h>
#include <iostream>
#include <string>
using namespace std;
int main() {
string S;
cin >> S;
int f;
f = (S.size() - 1) / 2;
string substr = S.substr(0, f);
string rsubstr;
rsubstr = substr;
string substr2 = S.substr(f + 1, f);
string rsubstr2;
rsubstr2... | #include <algorithm>
#include <bits/stdc++.h>
#include <iostream>
#include <string>
using namespace std;
int main() {
string S;
cin >> S;
int f;
f = (S.size() - 1) / 2;
string substr = S.substr(0, f);
string rsubstr;
rsubstr = substr;
string substr2 = S.substr(f + 1, f);
string rsubstr2;
rsubstr2... | [["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 98], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 31, 22], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 17, 60], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 12, 22]] | 1 | 124 |
s = str(input())
s_l = []
for i in range(len(s)):
s_l.append(s[i])
n = len(s) - 1
m = n // 2 - 1
Tsuyoi = True
i = 0
while i <= m // 2:
if s_l[i] != s_l[m - i]:
Tsuyoi = False
break
if s_l[m + i + 2] != s_l[n - i]:
Tsuyoi = False
break
if s_l[i] != s_l[n-i]:
t... | s = str(input())
s_l = []
for i in range(len(s)):
s_l.append(s[i])
n = len(s) - 1
m = n // 2 - 1
Tsuyoi = True
i = 0
while i <= m // 2:
if s_l[i] != s_l[m - i]:
Tsuyoi = False
break
if s_l[m + i + 2] != s_l[n - i]:
Tsuyoi = False
break
if s_l[i] != s_l[n-i]:
T... | [["-", 0, 57, 64, 196, 0, 1, 0, 662, 31, 22], ["+", 0, 57, 64, 196, 0, 1, 0, 662, 31, 22]] | 5 | 135 |
#include <algorithm>
#include <cstring>
#include <iostream>
#include <map>
using namespace std;
string a;
bool judge(string s) {
int len = s.length();
for (int i = 0; i < len / 2; i++) {
if (s[i] != s[len - 1 - i])
return false;
}
return true;
}
int main() {
int s;
cin >> a;
s = a.size();
stri... | #include <algorithm>
#include <cstring>
#include <iostream>
#include <map>
using namespace std;
string a;
bool judge(string s) {
int len = s.length();
for (int i = 0; i < len / 2; i++) {
if (s[i] != s[len - 1 - i])
return false;
}
return true;
}
int main() {
int s;
cin >> a;
s = a.size();
stri... | [["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 98], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 31, 22], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 17, 60], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 12, 22]] | 1 | 163 |
import sys
S=str(input())
N=len(S)
N1=int((N-1)/2)
N2=int((N+3)/2-1)
S1=list(S[:N1])
S2=list(S[N2:])
S3=list(reversed(S1))
S4=list(reversed(S2))
Sr=list(reversed(S))
if S==Sr:
if S1==S3:
if S2==S4:
print("Yes")
sys.exit()
print("No") | import sys
S=list(str(input()))
N=len(S)
N1=int((N-1)/2)
N2=int((N+3)/2-1)
S1=list(S[:N1])
S2=list(S[N2:])
S3=list(reversed(S1))
S4=list(reversed(S2))
Sr=list(reversed(S))
if S==Sr:
if S1==S3:
if S2==S4:
print("Yes")
sys.exit()
print("No")
| [["+", 0, 656, 0, 1, 0, 662, 12, 652, 63, 22], ["+", 0, 1, 0, 662, 12, 652, 3, 4, 0, 24], ["+", 0, 652, 3, 4, 0, 652, 3, 4, 0, 25]] | 5 | 121 |
#include <bits/stdc++.h>
using namespace std;
#define SZ(items) (int)items.size()
#define CLR(a) memset(a, 0, sizeof(a))
#define SET(a) memset(a, -1, sizeof(a))
#define nl "\n";
int dx[] = {0, 0, 1, -1, -1, -1, 1, 1};
int dy[] = {1, -1, 0, 0, -1, 1, 1, -1};
template <class T> inline T biton(T n, T pos) { return n | ... | #include <bits/stdc++.h>
using namespace std;
#define SZ(items) (int)items.size()
#define CLR(a) memset(a, 0, sizeof(a))
#define SET(a) memset(a, -1, sizeof(a))
#define nl "\n";
int dx[] = {0, 0, 1, -1, -1, -1, 1, 1};
int dy[] = {1, -1, 0, 0, -1, 1, 1, -1};
template <class T> inline T biton(T n, T pos) { return n | ... | [["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6]] | 1 | 604 |
S=input()
ans=1
for i in range((len(S)-1)//2):
if S[i]==S[len(S)-1-i]:
ans*=1
else:
ans*=2
for j in range((len(S)-1)//2):
if S[j]==S[(len(S)-1)//2-j-1]:
ans*=1
else:
ans*=3
if ans==1:
print("Yes")
else:
print("NO") | S=input()
ans=1
for i in range((len(S)-1)//2):
if S[i]==S[len(S)-1-i]:
ans*=1
else:
ans*=2
for j in range((len(S)-1)//2):
if S[j]==S[(len(S)-1)//2-j-1]:
ans*=1
else:
ans*=3
if ans==1:
print("Yes")
else:
print("No") | [["-", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6], ["+", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6]] | 5 | 119 |
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String str = sc.nextLine();
int strlength = str.length();
String str1 = str.substring(0, (strlength - 1) / 2);
String s... | import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String str = sc.nextLine();
int strlength = str.length();
String str1 = str.substring(0, (strlength - 1) / 2);
String s... | [["-", 3, 4, 0, 16, 31, 23, 0, 16, 17, 33], ["-", 3, 4, 0, 16, 31, 23, 0, 16, 12, 499]] | 3 | 319 |
S = input()
L = list(S)
N = len(L)
revS = list(reversed(L))
preS = L[:int((N - 1) / 2)]
revPreS = list(reversed(preS))
backS = L[int((N + 3) / 2):]
revBackS = list(reversed(backS))
if L != revS:
print("No")
elif preS != revPreS:
print("No")
elif backS != revBackS:
print("No")
else:
print("Yes")
| S = input()
L = list(S)
N = len(L)
revS = list(reversed(L))
preS = L[:int((N - 1) / 2)]
revPreS = list(reversed(preS))
backS = L[int((N + 2) / 2):]
revBackS = list(reversed(backS))
if L != revS:
print("No")
elif preS != revPreS:
print("No")
elif backS != revBackS:
print("No")
else:
print("Yes")
| [["-", 3, 4, 0, 657, 31, 23, 0, 657, 12, 612], ["+", 3, 4, 0, 657, 31, 23, 0, 657, 12, 612]] | 5 | 117 |
# coding: utf-8
import sys
import math
import collections
import itertools
from inspect import currentframe
INF = 10 ** 10
MOD = 10 ** 9 + 7
def input() : return sys.stdin.readline().strip()
def gcd(x, y) : return y if x % y == 0 else gcd(y, x % y)
def lcm(x, y) : return (x * y) // gcd(x, y)
def I() : return int(input... | # coding: utf-8
import sys
import math
import collections
import itertools
from inspect import currentframe
INF = 10 ** 10
MOD = 10 ** 9 + 7
def input() : return sys.stdin.readline().strip()
def gcd(x, y) : return y if x % y == 0 else gcd(y, x % y)
def lcm(x, y) : return (x * y) // gcd(x, y)
def I() : return int(input... | [["-", 36, 36, 0, 656, 0, 57, 15, 666, 0, 22], ["-", 36, 36, 0, 656, 0, 57, 15, 666, 667, 20], ["-", 36, 36, 0, 656, 0, 57, 15, 666, 0, 612], ["-", 36, 36, 36, 36, 0, 656, 0, 57, 0, 102], ["-", 0, 656, 0, 57, 64, 196, 0, 57, 0, 121]] | 5 | 330 |
# -*- coding: utf-8 -*-
import sys
S = input()
S_list = list(S)
tmp = S_list.copy()
N = len(S)
if N % 2 == 0:
print("No")
sys.exit()
else: #奇数個
S_list.reverse()
if S_list == tmp:
tmp_2 = int((len(tmp)-1) / 2)
tmp_2_list = tmp[:tmp_2]
t2=tmp_2_list.copy()
tmp_3 = int((len(tmp)+3) / 2)
tm... | # -*- coding: utf-8 -*-
import sys
S = input()
S_list = list(S)
tmp = S_list.copy()
N = len(S)
if N % 2 == 0:
print("No")
sys.exit()
else: #奇数個
S_list.reverse()
if S_list == tmp:
tmp_2 = int((len(tmp)-1) / 2)
tmp_2_list = tmp[:tmp_2]
t2=tmp_2_list.copy()
tmp_3 = int((len(tmp)+3) / 2)
tm... | [["-", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6], ["+", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6]] | 5 | 174 |
#include <algorithm>
#include <bits/stdc++.h>
#define _GLIBCXX_DEBUG
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define all(x) (x).begin(), (x).end()
#define PB(x) push_back(x)
#define MP(x, y) make_pair(x, y)
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
bool f(string s, int n, int k) {
... | #include <algorithm>
#include <bits/stdc++.h>
#define _GLIBCXX_DEBUG
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define all(x) (x).begin(), (x).end()
#define PB(x) push_back(x)
#define MP(x, y) make_pair(x, y)
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
bool f(string s, int n, int k) {
... | [["-", 12, 69, 341, 342, 0, 16, 31, 16, 31, 22], ["+", 12, 69, 341, 342, 0, 16, 31, 16, 31, 22]] | 1 | 197 |
# --*-coding:utf-8-*--
def f(s):
for i in range(len(s)//2):
if s[i] != s[-i-1]:
return False
return True
S = input()
N = len(S)
print('Yes' if f(S[:N//2]) and f(S[N//2+1:]) else 'No')
| # --*-coding:utf-8-*--
def f(s):
for i in range(len(s)//2):
if s[i] != s[-i-1]:
return False
return True
S = input()
N = len(S)
print('Yes' if f(S) and f(S[:N//2]) and f(S[N//2+1:]) else 'No')
| [["+", 0, 679, 31, 679, 31, 652, 3, 4, 0, 25], ["+", 3, 4, 0, 41, 0, 679, 31, 679, 17, 355], ["+", 0, 41, 0, 679, 31, 679, 12, 652, 63, 22], ["+", 0, 679, 31, 679, 12, 652, 3, 4, 0, 24], ["+", 31, 679, 12, 652, 3, 4, 0, 206, 51, 22]] | 5 | 83 |
s = [str(i) for i in input()]
n = len(s)
sa = s[0:(n-1)//2]
sb = s[(n+1)//2:n]
def palindrome(string):
for i in range(len(string)//2):
if string[i] != string[-i-1]:
return False
return True
if palindrome(sa) and palindrome(sb):
print("Yes")
else:
print("No") | s = [str(i) for i in input()]
n = len(s)
sa = s[0:(n-1)//2]
sb = s[(n+1)//2:n]
def palindrome(string):
for i in range(len(string)//2):
if string[i] != string[-i-1]:
return False
return True
if palindrome(s) and palindrome(sa) and palindrome(sb):
print("Yes")
else:
print("No")
| [["+", 15, 679, 31, 679, 31, 652, 3, 4, 0, 22], ["+", 15, 679, 31, 679, 31, 652, 3, 4, 0, 25], ["+", 0, 656, 0, 57, 15, 679, 31, 679, 17, 355], ["+", 0, 57, 15, 679, 31, 679, 12, 652, 63, 22], ["+", 15, 679, 31, 679, 12, 652, 3, 4, 0, 24]] | 5 | 110 |
#include <algorithm>
#include <cmath>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <utility>
#include <vector>
typedef long long ll;
using namespace std;
bool isPalindrome(string s) {
bool palindrome = true;
int n = s.length();
for (int i = 0; i... | #include <algorithm>
#include <cmath>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <utility>
#include <vector>
typedef long long ll;
using namespace std;
bool isPalindrome(string s) {
bool palindrome = true;
int n = s.length();
for (int i = 0; i... | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 60], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 79], ["+", 51, 16, 12, 69, 341, 342, 0, 16, 17, 33], ["+", 51, 16, 12, 69, 341, 342, 0, 16, 12, 13]] | 1 | 191 |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
string box, tes, tes2, rev1, rev2;
bool flag;
flag = false;
cin >> box;
for (int i = 0; i < box.size() / 2; i++) {
tes.push_back(box.at(i));
}
for (int i = 0; i < box.size() / 2; i++) {
tes2.push_back(box.at(i + (box... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
string box, tes, tes2, rev1, rev2;
bool flag;
flag = false;
cin >> box;
for (int i = 0; i < box.size() / 2; i++) {
tes.push_back(box.at(i));
}
for (int i = 0; i < box.size() / 2; i++) {
tes2.push_back(box.at(i + (box... | [["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 98], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 31, 22], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 17, 60], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 12, 22]] | 1 | 198 |
def check(s):
l = len(s)
c = 1
if l != 1:
if l % 2 == 1:
l -= 1
for i in range(int(l/2)):
if s[i] != s[0-1-i]:
c = 0
return c
if __name__ == '__main__':
S = input()
LEN = len(S)
l = int((LEN-1)/2)
r = l+1
s1 = S[0:l]
s2 = S[r:LEN]
c = check(s1) * check(s2)
if c == 1:
print('Yes')
el... | def check(s):
l = len(s)
c = 1
if l != 1:
if l % 2 == 1:
l -= 1
for i in range(int(l/2)):
if s[i] != s[0-1-i]:
c = 0
return c
if __name__ == '__main__':
S = input()
LEN = len(S)
l = int((LEN-1)/2)
r = l+1
s1 = S[0:l]
s2 = S[r:LEN]
c = check(s1) * check(s2) * check(S)
if c == 1:
print... | [["+", 64, 196, 0, 1, 0, 662, 12, 657, 17, 48], ["+", 0, 1, 0, 662, 12, 657, 12, 652, 63, 22], ["+", 0, 662, 12, 657, 12, 652, 3, 4, 0, 24], ["+", 0, 662, 12, 657, 12, 652, 3, 4, 0, 22], ["+", 0, 662, 12, 657, 12, 652, 3, 4, 0, 25]] | 5 | 144 |
#include <bits/stdc++.h>
#define ll long long
#define pb push_back
#define mp make_pair
#define sz(a) (int)(a).size()
#define all(x) (x).begin(), (x).end()
#define fore(i, a, b) for (int i = a; i < b; i += 1)
#define forr(i, a) for (int i = a; i >= 0; i--)
#define F first
#define S second
using namespace std;
typedef ... | #include <bits/stdc++.h>
#define ll long long
#define pb push_back
#define mp make_pair
#define sz(a) (int)(a).size()
#define all(x) (x).begin(), (x).end()
#define fore(i, a, b) for (int i = a; i < b; i += 1)
#define forr(i, a) for (int i = a; i >= 0; i--)
#define F first
#define S second
using namespace std;
typedef ... | [["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 98], ["+", 0, 57, 15, 339, 51, 16, 12, 2, 63, 22], ["+", 15, 339, 51, 16, 12, 2, 3, 4, 0, 24], ["+", 15, 339, 51, 16, 12, 2, 3, 4, 0, 22], ["+", 15, 339, 51, 16, 12, 2, 3, 4, 0, 25]] | 1 | 314 |
#include <bits/stdc++.h>
#include <iostream>
#include <string>
using namespace std;
bool check(string chkString) {
string strFront;
string strBack;
string backReverse;
int strSize = chkString.size();
if (strSize % 2 == 0) {
strFront = chkString.substr(0, strSize / 2);
strBack = chkString.substr(str... | #include <bits/stdc++.h>
#include <iostream>
#include <string>
using namespace std;
bool check(string chkString) {
string strFront;
string strBack;
string backReverse;
int strSize = chkString.size();
if (strSize % 2 == 0) {
strFront = chkString.substr(0, strSize / 2);
strBack = chkString.substr(str... | [["-", 64, 9, 0, 1, 0, 16, 12, 5, 0, 6], ["+", 64, 9, 0, 1, 0, 16, 12, 5, 0, 6], ["-", 0, 9, 0, 1, 0, 16, 12, 5, 0, 6], ["+", 0, 9, 0, 1, 0, 16, 12, 5, 0, 6]] | 1 | 301 |
#include <bits/stdc++.h>
using namespace std;
int main() {
string str;
int n, na, ans, num;
ans = 1;
cin >> str;
n = str.size();
na = (n - 1) / 2;
for (int i = 0; i < na; i++) {
num = na - i - 1;
if (str.at(i) == str.at(num)) {
} else {
ans = 0;
}
}
if (na % 2 == 0) {
int nn... | #include <bits/stdc++.h>
using namespace std;
int main() {
string str;
int n, na, ans, num;
ans = 1;
cin >> str;
n = str.size();
na = (n - 1) / 2;
for (int i = 0; i < na; i++) {
num = n - i - 1;
if (str.at(i) == str.at(num)) {
} else {
ans = 0;
}
}
if (na % 2 == 0) {
int nna... | [["-", 0, 1, 0, 11, 12, 16, 31, 16, 31, 22], ["+", 0, 1, 0, 11, 12, 16, 31, 16, 31, 22]] | 1 | 259 |
#include <bits/stdc++.h>
using namespace std;
int main() {
string s;
cin >> s;
int len1 = s.length();
int len2 = (len1 - 1) / 2;
int len3 = (len1 + 3) / 2;
int flag = 1;
for (int i = 0; i < len1; i++) {
if (s[i] != s[len1 - i - 1]) {
flag = 0;
break;
}
for (int i = 0; i < len2... | #include <bits/stdc++.h>
using namespace std;
int main() {
string s;
cin >> s;
int len1 = s.length();
int len2 = (len1 - 1) / 2;
int len3 = (len1 + 3) / 2;
int flag = 1;
for (int i = 0; i < len1; i++) {
if (s[i] != s[len1 - i - 1]) {
flag = 0;
break;
}
for (int i = 0; i < len2... | [["-", 64, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 64, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6]] | 1 | 192 |
/* NotQuiteMyTempo */
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define ld long double
#define io \
ios_base::sync_with_stdio(false); \
cin.tie(NULL)
int main() {
string s;
... | /* NotQuiteMyTempo */
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define ld long double
#define io \
ios_base::sync_with_stdio(false); \
cin.tie(NULL)
int main() {
string s;
... | [["-", 64, 9, 0, 1, 0, 16, 12, 5, 0, 6], ["+", 64, 9, 0, 1, 0, 16, 12, 5, 0, 6], ["-", 0, 9, 0, 1, 0, 16, 12, 5, 0, 6], ["+", 0, 9, 0, 1, 0, 16, 12, 5, 0, 6]] | 1 | 144 |
word = input()
n = len(word)
a = (n-1)//2
b = (n+3)//2
word2 = word[:a]
word3 = word[b-1:]
def kai1():
for i in range(a):
if(word[i] != word[-1*i]):
return False
else:
return True
def kai2():
wl = len(word2)
if(wl % 2 == 0):
wl = wl//2
else:
wl ... | word = input()
n = len(word)
a = (n-1)//2
b = (n+3)//2
word2 = word[:a]
word3 = word[b-1:]
def kai1():
for i in range(a):
if(word[i] != word[-1*(i+1)]):
return False
return True
def kai2():
wl = len(word2)
if(wl % 2 == 0):
wl = wl//2
else:
wl = (wl-1)//2
f... | [["+", 0, 666, 0, 206, 206, 657, 12, 23, 0, 24], ["+", 0, 206, 206, 657, 12, 23, 0, 657, 17, 72], ["+", 0, 206, 206, 657, 12, 23, 0, 657, 12, 612], ["+", 0, 666, 0, 206, 206, 657, 12, 23, 0, 25], ["-", 0, 7, 8, 196, 0, 57, 75, 76, 0, 95], ["-", 0, 7, 8, 196, 0, 57, 75, 76, 0, 102]] | 5 | 247 |
#!/usr/bin/env ruby
s = STDIN.gets.chomp
len = s.size
s1 = s[0, (len - 1) / 2]
s2 = s[(len + 3) / 2 - 1, len]
ans = (s == s.reverse and s1 == s1.reverse and s2 == s2.reverse) ? "YES" : "NO"
puts ans
| #!/usr/bin/env ruby
s = STDIN.gets.chomp
len = s.size
s1 = s[0, (len - 1) / 2]
s2 = s[(len + 3) / 2 - 1, len]
ans = (s == s.reverse and s1 == s1.reverse and s2 == s2.reverse) ? "Yes" : "No"
puts ans
| [["-", 0, 493, 0, 662, 12, 754, 64, 557, 0, 6], ["+", 0, 493, 0, 662, 12, 754, 64, 557, 0, 6], ["-", 0, 493, 0, 662, 12, 754, 75, 557, 0, 6], ["+", 0, 493, 0, 662, 12, 754, 75, 557, 0, 6]] | 4 | 74 |
#include <bits/stdc++.h>
#include <cstring>
#include <limits>
using namespace std;
#define lli long long int
int main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
char a[100000];
cin >> a;
lli n = strlen(a);
// cout << "N is" << n;
lli flag = 0;
if (n % 2 == 0) {
cout << "No" << endl;
retu... | #include <bits/stdc++.h>
#include <cstring>
#include <limits>
using namespace std;
#define lli long long int
int main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
char a[100000];
cin >> a;
lli n = strlen(a);
// cout << "N is" << n;
lli flag = 0;
if (n % 2 == 0) {
cout << "No" << endl;
retu... | [["+", 0, 9, 0, 7, 15, 16, 12, 23, 0, 24], ["-", 0, 9, 0, 7, 15, 16, 12, 16, 17, 33], ["-", 0, 9, 0, 7, 15, 16, 12, 16, 12, 13], ["+", 0, 9, 0, 7, 15, 16, 12, 23, 0, 25], ["-", 31, 23, 0, 16, 31, 23, 0, 16, 12, 22], ["+", 31, 23, 0, 16, 31, 23, 0, 16, 12, 13], ["-", 51, 16, 12, 69, 341, 342, 0, 16, 12, 13], ["+", 51, 1... | 1 | 175 |
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
string s;
cin >> s;
int N = s.length();
string t1 = s.substr(0, (N - 1) / 2);
string t2 = s.substr((N + 3) / 2 - 1, (N - (N + 3) / 2) + 1);
// cout<<t1<<" "<<t2<<endl;
function<bool(string)> ispal = [&](string t) {
fo... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
string s;
cin >> s;
int N = s.length();
string t1 = s.substr(0, (N - 1) / 2);
string t2 = s.substr((N + 3) / 2 - 1, (N - (N + 3) / 2) + 1);
// cout<<t1<<" "<<t2<<endl;
function<bool(string)> ispal = [&](string t) {
fo... | [["+", 51, 16, 31, 16, 31, 2, 3, 4, 0, 22], ["+", 51, 16, 31, 16, 31, 2, 3, 4, 0, 25], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 17, 98], ["+", 15, 339, 51, 16, 31, 16, 12, 2, 63, 22], ["+", 51, 16, 31, 16, 12, 2, 3, 4, 0, 24]] | 1 | 189 |
package main
import(
"fmt"
"os"
"bufio"
)
func main(){
in := bufio.NewReader(os.Stdin)
out := bufio.NewWriter(os.Stdout)
defer out.Flush()
var s string
fmt.Fscanf(in, "%s\n", &s)
n := len(s)
ok := true
for i := 0 ; i < n / 2 ; i ++ {
if s[i] != s[n - i - 1] {
ok = false
break
}
}
for i :... | package main
import(
"fmt"
"os"
"bufio"
)
func main(){
in := bufio.NewReader(os.Stdin)
out := bufio.NewWriter(os.Stdout)
defer out.Flush()
var s string
fmt.Fscanf(in, "%s\n", &s)
n := len(s)
ok := true
for i := 0 ; i < n / 2 ; i ++ {
if s[i] != s[n - i - 1] {
ok = false
break
}
}
for i :... | [["-", 64, 196, 0, 1, 0, 2, 3, 4, 0, 429], ["-", 0, 1, 0, 2, 3, 4, 0, 429, 0, 44], ["+", 64, 196, 0, 1, 0, 2, 3, 4, 0, 429], ["+", 0, 1, 0, 2, 3, 4, 0, 429, 0, 44], ["-", 75, 196, 0, 1, 0, 2, 3, 4, 0, 429], ["+", 75, 196, 0, 1, 0, 2, 3, 4, 0, 429]] | 7 | 258 |
#include <iostream>
#include <string>
//#include<vector>
//#include<math.h>
using namespace std;
bool isPalindrome(string s) {
int N = s.size();
int i;
if (N % 2 == 0)
i = N / 2 - 1;
else
i = N / 2;
while (i >= 0) {
if (s[i] != s[N - i - 1])
return false;
i--;
}
return true;
}
int ... | #include <iostream>
#include <string>
//#include<vector>
//#include<math.h>
using namespace std;
bool isPalindrome(string s) {
int N = s.size();
int i;
if (N % 2 == 0)
i = N / 2 - 1;
else
i = N / 2;
while (i >= 0) {
if (s[i] != s[N - i - 1])
return false;
i--;
}
return true;
}
int ... | [["+", 51, 16, 31, 16, 31, 2, 3, 4, 0, 22], ["+", 51, 16, 31, 16, 31, 2, 3, 4, 0, 25], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 17, 98], ["+", 15, 339, 51, 16, 31, 16, 12, 2, 63, 22], ["+", 51, 16, 31, 16, 12, 2, 3, 4, 0, 24]] | 1 | 189 |
#include <algorithm>
#include <bits/stdc++.h>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <map>
#include <string>
#include <utility>
#include <vector>
using namespace std;
typedef pair<long long, bool> Pair;
const long long INF = 1LL << 60;
int main() {
string S;
long long temp;
bool flg =... | #include <algorithm>
#include <bits/stdc++.h>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <map>
#include <string>
#include <utility>
#include <vector>
using namespace std;
typedef pair<long long, bool> Pair;
const long long INF = 1LL << 60;
int main() {
string S;
long long temp;
bool flg =... | [["-", 64, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 64, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6]] | 1 | 148 |
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <ctime>
#include <fstream>
#include <iostream>
#include <set>
#include <sstream>
#include <typeinfo>
#include <vector>
using namespace std;
bool palindromeCheck(string S);
int main() {
string S;
string S_first;
string S_last;
... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <ctime>
#include <fstream>
#include <iostream>
#include <set>
#include <sstream>
#include <typeinfo>
#include <vector>
using namespace std;
bool palindromeCheck(string S);
int main() {
string S;
string S_first;
string S_last;
... | [["-", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35], ["-", 0, 14, 8, 9, 0, 1, 0, 11, 31, 22], ["-", 0, 14, 8, 9, 0, 1, 0, 11, 17, 32], ["+", 0, 1, 0, 11, 12, 16, 31, 16, 17, 98], ["+", 8, 9, 0, 1, 0, 11, 12, 16, 17, 98]] | 1 | 225 |
# n,m = map(int, input().split())
s = input()
l = len(s)
f = int((l-1)/2)
b = int((l+3)/2) - 1
# print(f,b)
if s != s[::-1] or s[:f] != s[:f:-1] or s[b:] != s[b:][::-1]:
# print(s[::-1])
print("No")
# if :
# print(s[:f:-1])
# print("No")
# if :
# print(b,":",s[b:][::-1])
# print("No")
print("Yes")
| # n,m = map(int, input().split())
s = input()
l = len(s)
f = int((l-1)/2)
b = int((l+3)/2) - 1
# print(f,b)
if s != s[::-1] or s[:f] != s[:f:-1] or s[b:] != s[b:][::-1]:
# print(s[::-1])
print("No")
else:
print("Yes")
# if :
# print(s[:f:-1])
# print("No")
# if :
# print(b,":",s[b:][::-1])
# print(... | [["+", 36, 36, 0, 656, 0, 57, 75, 76, 0, 95], ["+", 36, 36, 0, 656, 0, 57, 75, 76, 0, 102]] | 5 | 102 |
S=str(input())
N=len(S)
p=0
a=0
c=0
for i in range(int((N-1)/2)):
if S[i]==S[-i-1]:
p+=1
if p==(N-1)/2:
for i in range(int((N-1)/4)):
T=S[:int((N-1)/2)]
if T[i]==T[-i-1]:
a+=1
if a==int((N-1)/4):
for y in range(int((N-(N+3)/2)/2)):
F=S[... | S=str(input())
N=len(S)
p=0
a=0
c=0
for i in range(int((N-1)/2)):
if S[i]==S[-i-1]:
p+=1
if p==(N-1)/2:
for i in range(int((N-1)/4)):
T=S[:int((N-1)/2)]
if T[i]==T[-i-1]:
a+=1
if a==int((N-1)/4):
for y in range(int((N-(N+3)/2)/2)):
F=S[int(... | [["-", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6], ["+", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6]] | 5 | 242 |
s = input()
n = len(s)
def is_kai(s):
for i in range(int((len(s)-1)/2)):
if s[i] != s[-i-1]:
return False
return True
if is_kai(s) and is_kai(s[:int((n-1)/2)]):
print('Yes')
else:
print('No') | s = input()
n = len(s)
def is_kai(s):
for i in range(int((len(s))/2)):
if s[i] != s[-i-1]:
return False
return True
if is_kai(s) and is_kai(s[:int((n-1)/2)]):
print('Yes')
else:
print('No') | [["-", 3, 4, 0, 657, 31, 23, 0, 657, 17, 33], ["-", 3, 4, 0, 657, 31, 23, 0, 657, 12, 612]] | 5 | 93 |
package main
import (
"fmt"
)
func main() {
var s string
fmt.Scanf("%s", &s)
n := len(s)
if isPalindrome(s) && isPalindrome(s[0:(n-1)/2]) && isPalindrome(s[(n+3)/2-1:n]) {
fmt.Println("Yes")
} else {
fmt.Println("No")
}
}
func isPalindrome(s string) bool {
r := []rune(s)
n := len(r)
var mid int
var f,... | package main
import (
"fmt"
)
func main() {
var s string
fmt.Scanf("%s", &s)
n := len(s)
if isPalindrome(s) && isPalindrome(s[0:(n-1)/2]) && isPalindrome(s[(n+3)/2-1:n]) {
fmt.Println("Yes")
} else {
fmt.Println("No")
}
}
func isPalindrome(s string) bool {
r := []rune(s)
n := len(r)
var mid int
var f,... | [["-", 8, 196, 0, 57, 64, 196, 0, 431, 0, 466], ["+", 8, 196, 0, 57, 64, 196, 0, 436, 17, 32], ["-", 8, 196, 0, 57, 75, 196, 0, 431, 0, 466], ["+", 8, 196, 0, 57, 75, 196, 0, 436, 17, 32]] | 7 | 285 |
def isKaibun(s):
for a, b in zip(s, reversed(s)):
if a != b:
return False
return True
S = list(input())
N = len(S)
if isKaibun(S[:(N-1)//2]) and isKaibun(S[(N+3)//2:]):
print("Yes")
else:
print("No")
| def isKaibun(s):
for a, b in zip(s, reversed(s)):
if a != b:
return False
return True
S = list(input())
N = len(S)
if isKaibun(S) and isKaibun(S[:(N-1)//2]) and isKaibun(S[(N+1)//2:]):
print("Yes")
else:
print("No")
| [["+", 15, 679, 31, 679, 31, 652, 3, 4, 0, 25], ["+", 0, 656, 0, 57, 15, 679, 31, 679, 17, 355], ["+", 0, 57, 15, 679, 31, 679, 12, 652, 63, 22], ["+", 15, 679, 31, 679, 12, 652, 3, 4, 0, 24], ["+", 31, 679, 12, 652, 3, 4, 0, 206, 51, 22], ["-", 206, 663, 0, 657, 31, 23, 0, 657, 12, 612], ["+", 206, 663, 0, 657, 31, 23... | 5 | 89 |
S=list(input())
res='Yes'
N=len(S)
def ispalindrome(s):
h = len(s) // 2
if (len(s)==2) & (h==1):
if s[0]==s[1]:
return 1
else: return 0
else:
for a, b in zip(s[:h], reversed(s[h+1:])):
if a != b: return 0
return 1
if ispalindrome(S)==0:
res=... | S=list(input())
res='Yes'
N=len(S)
def ispalindrome(s):
h = len(s) // 2
if (len(s)==2) & (h==1):
if s[0]==s[1]:
return 1
else: return 0
else:
for a, b in zip(s[:h], reversed(s[h+1:])):
if a != b: return 0
return 1
if ispalindrome(S)==0:
res=... | [["-", 206, 663, 0, 657, 31, 23, 0, 657, 12, 612], ["+", 206, 663, 0, 657, 31, 23, 0, 657, 12, 612]] | 5 | 187 |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int maxn = 250;
char a[maxn];
int judge(int f, int r) {
while (f < r)
if (a[f] != a[r - f])
return 0;
else
f++;
return 1;
}
int main() {
scanf("%s", a + 1);
int len = 0, i = 1;
while (a[i] != '\0') {
len++;
i... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int maxn = 250;
char a[maxn];
int judge(int f, int r) {
while (f <= r)
if (a[f] != a[r - f + 1])
return 0;
else
f++;
return 1;
}
int main() {
scanf("%s", a + 1);
int len = 0, i = 1;
while (a[i] != '\0') {
len++;
... | [["-", 8, 9, 0, 52, 15, 339, 51, 16, 17, 18], ["+", 8, 9, 0, 52, 15, 339, 51, 16, 17, 19], ["+", 51, 16, 12, 69, 341, 342, 0, 16, 17, 72], ["+", 51, 16, 12, 69, 341, 342, 0, 16, 12, 13]] | 1 | 155 |
str = list(input())
def isKaibun(src):
rev = src[:]
rev.reverse()
return src == rev
N = len(str)
def num(N):
return N-1
s1 = num(1)
e1 = (num(N)-1) // 2 + 1
s2 = (num(N) + 3) // 2
e2 = num(N) + 1
if isKaibun(str[s1:e1]) and isKaibun(str[s2:e2]):
print('Yes')
else:
print('No')
| str = list(input())
def isKaibun(src):
rev = src[:]
rev.reverse()
return src == rev
N = len(str)
def num(N):
return N-1
s1 = num(1)
e1 = (num(N)-1) // 2 + 1
s2 = (num(N) + 3) // 2
e2 = num(N) + 1
if isKaibun(str) and isKaibun(str[s1:e1]) and isKaibun(str[s2:e2]):
print('Yes')
else:
print('No')
| [["+", 15, 679, 31, 679, 31, 652, 3, 4, 0, 25], ["+", 0, 656, 0, 57, 15, 679, 31, 679, 17, 355], ["+", 0, 57, 15, 679, 31, 679, 12, 652, 63, 22], ["+", 15, 679, 31, 679, 12, 652, 3, 4, 0, 24], ["+", 31, 679, 12, 652, 3, 4, 0, 206, 51, 22]] | 5 | 120 |
#include <algorithm>
#include <cmath>
#include <cstdlib>
#include <functional>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <stdio.h>
#include <string>
#include <vector>
#define rep(i, n) for (int i = 0; i < n; i++)
#define all(x) (x).begin(), (x).end()
#define sz(x) ((int)(x).size())... | #include <algorithm>
#include <cmath>
#include <cstdlib>
#include <functional>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <stdio.h>
#include <string>
#include <vector>
#define rep(i, n) for (int i = 0; i < n; i++)
#define all(x) (x).begin(), (x).end()
#define sz(x) ((int)(x).size())... | [["+", 3, 4, 0, 2, 3, 4, 0, 16, 17, 98], ["+", 0, 2, 3, 4, 0, 16, 12, 2, 63, 22], ["+", 3, 4, 0, 16, 12, 2, 3, 4, 0, 24], ["+", 3, 4, 0, 16, 12, 2, 3, 4, 0, 22], ["+", 3, 4, 0, 16, 12, 2, 3, 4, 0, 25]] | 1 | 387 |
#include <bits/stdc++.h>
using namespace std;
typedef long long int lo;
string str;
int main() {
cin >> str;
if (str.size() <= 2) {
cout << "Yes";
return 0;
}
string str1 = "";
for (lo i = str.size() - 1; i >= 0; i--)
str1 += str[i];
// cout << str << " " << str1 << endl;
if (str != str1) {
... | #include <bits/stdc++.h>
using namespace std;
typedef long long int lo;
string str;
int main() {
cin >> str;
if (str.size() <= 2) {
cout << "Yes";
return 0;
}
string str1 = "";
for (lo i = str.size() - 1; i >= 0; i--)
str1 += str[i];
// cout << str << " " << str1 << endl;
if (str != str1) {
... | [["-", 8, 9, 0, 1, 0, 16, 12, 5, 0, 6], ["+", 8, 9, 0, 1, 0, 16, 12, 5, 0, 6]] | 1 | 287 |
#include <iostream>
using namespace std;
typedef long long ll;
int main() {
string s, ss, sss;
int k = 0, i;
cin >> s;
for (i = 0; i < s.size() / 2; i++)
if (s[i] != s[s.size() - 1 - i])
k = 1;
for (i = 0; i < s.size() / 2; i++)
ss = ss + s[i];
for (i = s.size() / 2 + 1; i < s.size(); i++)
... | #include <iostream>
using namespace std;
typedef long long ll;
int main() {
string s, ss, sss;
int k = 0, i;
cin >> s;
for (i = 0; i < s.size() / 2; i++)
if (s[i] != s[s.size() - 1 - i])
k = 1;
for (i = 0; i < s.size() / 2; i++)
ss = ss + s[i];
for (i = s.size() / 2 + 1; i < s.size(); i++)
... | [["-", 0, 7, 8, 57, 15, 339, 51, 16, 17, 60], ["+", 0, 7, 8, 57, 15, 339, 51, 16, 17, 79]] | 1 | 245 |
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
using ll = long long;
int mod = 1000000000 + 7;
int check(string s) {
int ans = 0;
rep(i, s.size() / 2) {
if (s[i] != s[s.size() - 1 - i])
ans = 1;
}
return ans;
}
int main() {
string s;
cin >> ... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
using ll = long long;
int mod = 1000000000 + 7;
int check(string s) {
int ans = 0;
rep(i, s.size() / 2) {
if (s[i] != s[s.size() - 1 - i])
ans = 1;
}
return ans;
}
int main() {
string s;
cin >> ... | [["+", 3, 4, 0, 2, 3, 4, 0, 16, 17, 33], ["+", 3, 4, 0, 2, 3, 4, 0, 16, 12, 13]] | 1 | 180 |
# frozen_string_literal: true
s = gets.chomp.split('')
n = s.size
a = []
check = 0
p n/2
(n/2).times do |i|
check += 1 if s[i] == s[-(i+1)]
end
if check != (n / 2)
puts :No
exit
end
(0...(n-1)/2).each do |i|
a << s[i]
end
check = 0
(a.size / 2).times do |i|
check += 1 if a[i] == a[a.size - 1 - i]
end
if chec... | # frozen_string_literal: true
s = gets.chomp.split('')
n = s.size
a = []
check = 0
(n/2).times do |i|
check += 1 if s[i] == s[-(i+1)]
end
if check != (n / 2)
puts :No
exit
end
(0...(n-1)/2).each do |i|
a << s[i]
end
check = 0
(a.size / 2).times do |i|
check += 1 if a[i] == a[a.size - 1 - i]
end
if check != ... | [["-", 36, 36, 36, 36, 0, 493, 0, 652, 735, 22], ["-", 0, 493, 0, 652, 3, 4, 0, 738, 31, 22], ["-", 0, 493, 0, 652, 3, 4, 0, 738, 17, 85], ["-", 0, 493, 0, 652, 3, 4, 0, 738, 12, 612]] | 4 | 224 |
#include <bits/stdc++.h>
using namespace std;
const int mod = 1007050321;
const int base = 521;
const int N = 2e5 + 5;
const int MOD = 1e9 + 7;
const int inf = 2e9;
string s, l, r;
int n;
bool check(string t) {
string S = t;
reverse(S.begin(), S.end());
for (int i = 0; i < S.size(); ++i)
if (t[i] != S[i])... | #include <bits/stdc++.h>
using namespace std;
const int mod = 1007050321;
const int base = 521;
const int N = 2e5 + 5;
const int MOD = 1e9 + 7;
const int inf = 2e9;
string s, l, r;
int n;
bool check(string t) {
string S = t;
reverse(S.begin(), S.end());
for (int i = 0; i < S.size(); ++i)
if (t[i] != S[i])... | [["-", 0, 57, 64, 1, 0, 16, 12, 5, 0, 6], ["+", 0, 57, 64, 1, 0, 16, 12, 5, 0, 6], ["-", 75, 76, 0, 1, 0, 16, 12, 5, 0, 6], ["+", 75, 76, 0, 1, 0, 16, 12, 5, 0, 6]] | 1 | 271 |
#include <bits/stdc++.h>
using namespace std;
int main() {
string s;
cin >> s;
cin.ignore();
int n = s.length();
// 回文?
bool ans = true;
for (int i = 0; i < n / 2; i++) {
// cout << "i = " << i << " s[i] = " << s[i] << " s[n-1-i] = " << s[n-1-i]
// << flush;
if (s[i] != s[n - 1 - i]) {
... | #include <bits/stdc++.h>
using namespace std;
int main() {
string s;
cin >> s;
cin.ignore();
int n = s.length();
// 回文?
bool ans = true;
for (int i = 0; i < n / 2; i++) {
// cout << "i = " << i << " s[i] = " << s[i] << " s[n-1-i] = " << s[n-1-i]
// << flush;
if (s[i] != s[n - 1 - i]) {
... | [["-", 0, 7, 15, 16, 12, 16, 31, 23, 0, 24], ["-", 15, 16, 12, 16, 31, 23, 0, 16, 17, 33], ["-", 15, 16, 12, 16, 31, 23, 0, 16, 12, 13], ["-", 0, 7, 15, 16, 12, 16, 31, 23, 0, 25]] | 1 | 163 |
#include <iostream>
#include <string>
using namespace std;
int main() {
string message;
cin >> message;
int l = message.length();
for (int i = 0; i < l / 2; i++) {
if (message[i] != message[l - i - 1]) {
cout << "No" << endl;
return 0;
}
}
l = (l - 1) / 2;
for (int i = 0; i < l / 2; i+... | #include <iostream>
#include <string>
using namespace std;
int main() {
string message;
cin >> message;
int l = message.length();
for (int i = 0; i < l / 2; i++) {
if (message[i] != message[l - i - 1]) {
cout << "No" << endl;
return 0;
}
}
l = (l - 1) / 2;
for (int i = 0; i < l / 2; i+... | [["-", 12, 69, 341, 342, 0, 16, 31, 16, 31, 22], ["+", 0, 16, 31, 16, 31, 2, 63, 118, 28, 22], ["+", 0, 16, 31, 16, 31, 2, 63, 118, 17, 131], ["+", 0, 16, 31, 16, 31, 2, 63, 118, 119, 120], ["+", 0, 16, 31, 16, 31, 2, 3, 4, 0, 24], ["+", 0, 16, 31, 16, 31, 2, 3, 4, 0, 25]] | 1 | 207 |
#include <bits/stdc++.h>
using namespace std;
bool slv(string a) {
int An = a.size();
bool Ans = true;
for (int i = 0; i < An / 2; i++) {
if (a.at(i) != a.at(An - i - 1))
Ans = false;
}
return Ans;
}
int main() {
string S;
cin >> S;
int N = S.size();
string m = "";
string n = "";
fo... | #include <bits/stdc++.h>
using namespace std;
bool slv(string a) {
int An = a.size();
bool Ans = true;
for (int i = 0; i < An / 2; i++) {
if (a.at(i) != a.at(An - i - 1))
Ans = false;
}
return Ans;
}
int main() {
string S;
cin >> S;
int N = S.size();
string m = "";
string n = "";
fo... | [["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 98], ["+", 0, 57, 15, 339, 51, 16, 12, 2, 63, 22], ["+", 15, 339, 51, 16, 12, 2, 3, 4, 0, 24], ["+", 15, 339, 51, 16, 12, 2, 3, 4, 0, 22], ["+", 15, 339, 51, 16, 12, 2, 3, 4, 0, 25]] | 1 | 208 |
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char *argv[]) {
string S;
cin >> S;
int N = S.size();
string orig = S;
reverse(S.begin(), S.end());
bool ok(true);
if (orig == S) {
string n1 = orig.substr(0, (N - 1) / 2);
string n1orig = n1;
reverse(n1.begin(), n1.end());
... | #include <bits/stdc++.h>
using namespace std;
int main(int argc, char *argv[]) {
string S;
cin >> S;
int N = S.size();
string orig = S;
reverse(S.begin(), S.end());
bool ok(true);
if (orig == S) {
string n1 = orig.substr(0, (N - 1) / 2);
string n1orig = n1;
reverse(n1.begin(), n1.end());
... | [["-", 31, 16, 12, 23, 0, 41, 64, 5, 0, 6], ["+", 31, 16, 12, 23, 0, 41, 64, 5, 0, 6], ["-", 31, 16, 12, 23, 0, 41, 75, 5, 0, 6], ["+", 31, 16, 12, 23, 0, 41, 75, 5, 0, 6]] | 1 | 201 |
package main
import (
"fmt"
)
func main() {
var s string
fmt.Scanf("%s", &s)
answer := isStrongParlindrome(s)
if answer {
fmt.Println("Yes")
} else {
fmt.Println("No")
}
}
func isStrongParlindrome(s string) bool {
return isConditionA(s) && isConditionB(s)
}
func isConditionA(s string) bool {
start := 0... | package main
import (
"fmt"
)
func main() {
var s string
fmt.Scanf("%s", &s)
answer := isStrongParlindrome(s)
if answer {
fmt.Println("Yes")
} else {
fmt.Println("No")
}
}
func isStrongParlindrome(s string) bool {
return isParlindrome(s) && isConditionA(s) && isConditionB(s)
}
func isConditionA(s string... | [["+", 0, 432, 0, 16, 31, 16, 31, 2, 63, 22], ["+", 0, 16, 31, 16, 31, 2, 3, 4, 0, 24], ["+", 0, 16, 31, 16, 31, 2, 3, 4, 0, 22], ["+", 0, 16, 31, 16, 31, 2, 3, 4, 0, 25], ["+", 0, 37, 0, 432, 0, 16, 31, 16, 17, 98]] | 7 | 226 |
#include <algorithm>
#include <cmath>
#include <iostream>
#include <numeric>
#include <string>
#include <vector>
using namespace std;
int main() {
string a;
string f, b;
int sum = 1;
cin >> a;
if (a.length() % 2 == 0) {
cout << "NO" << endl;
return 0;
}
f = a.substr(0, (a.length()) / 2);
b = ... | #include <algorithm>
#include <cmath>
#include <iostream>
#include <numeric>
#include <string>
#include <vector>
using namespace std;
int main() {
string a;
string f, b;
int sum = 1;
cin >> a;
if (a.length() % 2 == 0) {
cout << "No" << endl;
return 0;
}
f = a.substr(0, (a.length()) / 2);
b = ... | [["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6]] | 1 | 142 |
s = input()
n = len(s)
num = int((n-1)/2)-1
for i in range(num):
if s[i] != s[n-1-i]:
print("No")
exit()
num = int(num /2 -1)
for i in range(num):
if s[i] != s[n-1-i]:
print("No")
exit()
num = len(s) * 0.5 - 1.5
index = int((n + 3) /2 )
for i in range(num):
if s[index+i] != s[n-1-i]:
pri... | s = input()
n = len(s)
num = int((n-1)/2)-1
for i in range(num):
if s[i] != s[n-1-i]:
print("No")
exit()
num = int(num /2 -1)
for i in range(num):
if s[i] != s[n-1-i]:
print("No")
exit()
num = int(len(s) * 0.5 - 1.5)
index = int((n + 3) /2 -1 )
for i in range(num):
if s[index+i] != s[n-1-i]:... | [["+", 0, 656, 0, 1, 0, 662, 12, 652, 63, 22], ["+", 0, 1, 0, 662, 12, 652, 3, 4, 0, 24], ["+", 0, 1, 0, 662, 12, 652, 3, 4, 0, 25], ["+", 0, 662, 12, 652, 3, 4, 0, 657, 17, 33], ["+", 0, 662, 12, 652, 3, 4, 0, 657, 12, 612]] | 5 | 161 |
S=(input())
N = len(S)
one = S[0:((N-1)//2)]
two = S[(N+3)//2-1:N]
def check_kai(text):
left = len(text)//2
for i in range(left):
if text[i] != text[len(text)-1-i]:
print('No')
exit(0)
check_kai(one)
check_kai(two)
print('Yes') | S=(input())
N = len(S)
one = S[0:((N-1)//2)]
two = S[(N+3)//2-1:N]
def check_kai(text):
left = len(text)//2
for i in range(left):
if text[i] != text[len(text)-1-i]:
print('No')
exit(0)
check_kai(S)
check_kai(one)
check_kai(two)
print('Yes') | [["+", 0, 656, 0, 1, 0, 652, 3, 4, 0, 22], ["+", 0, 656, 0, 1, 0, 652, 3, 4, 0, 25], ["+", 36, 36, 0, 656, 0, 1, 0, 652, 63, 22], ["+", 0, 656, 0, 1, 0, 652, 3, 4, 0, 24]] | 5 | 109 |
stra = input()
def hantei(s):
for i in range(int(len(s) / 2)):
print(i)
if (s[i] != s[len(s) - 1 - i]):
# print("A")
return False
if (int((len(s) + 3) / 2) - 1 + i < len(s) and s[(int((len(s) + 3) / 2)) - 1 + i] != s[len(s) - 1 - i]):
# print("B")
... | stra = input()
def hantei(s):
for i in range(int(len(s) / 2)):
if (s[i] != s[len(s) - 1 - i]):
# print("A")
return False
if (int((len(s) + 3) / 2) - 1 + i < len(s) and s[(int((len(s) + 3) / 2)) - 1 + i] != s[len(s) - 1 - i]):
# print("B")
return Fal... | [["-", 0, 7, 8, 196, 0, 1, 0, 652, 63, 22], ["-", 8, 196, 0, 1, 0, 652, 3, 4, 0, 24], ["-", 8, 196, 0, 1, 0, 652, 3, 4, 0, 22], ["-", 8, 196, 0, 1, 0, 652, 3, 4, 0, 25]] | 5 | 186 |
s= input()
z=len(s)//2
flag=0
sd=s[0:z-1]
if len(s)==3:
if s[0]==s[2]:
flag=1
else:
if sd==s[z+1:len(s)-1]:
if sd==sd[::-1]:
flag=1
if flag==1:
print("Yes")
else:
print("No") | s= input()
z=len(s)//2
flag=0
sd=s[0:z]
if len(s)==3:
if s[0]==s[2]:
flag=1
else:
if sd==s[z+1:len(s)]:
if sd==sd[::-1]:
flag=1
if flag==1:
print("Yes")
else:
print("No") | [["-", 0, 662, 12, 206, 206, 663, 0, 657, 17, 33], ["-", 0, 662, 12, 206, 206, 663, 0, 657, 12, 612], ["-", 15, 666, 0, 206, 206, 663, 0, 657, 17, 33], ["-", 15, 666, 0, 206, 206, 663, 0, 657, 12, 612]] | 5 | 100 |
#include <bits/stdc++.h>
using namespace std;
int main() {
string S;
int N;
int M = 0;
cin >> S;
N = S.size();
for (int i = 0; i < (N - 1) / 2; i++) {
if (S.at(i) != S.at((N + 3) / 2 + i)) {
M = 1;
}
}
if (M == 1) {
cout << "No" << endl;
} else {
cout << "Yes" << endl;
}
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
string S;
int N;
int M = 0;
cin >> S;
N = S.size();
for (int i = 0; i < (N - 1) / 2; i++) {
if (S.at(i) != S.at((N - 1) / 2 + 1 + i)) {
M = 1;
}
}
if (M == 1) {
cout << "No" << endl;
} else {
cout << "Yes" << endl;
}
}
| [["-", 0, 16, 31, 16, 31, 23, 0, 16, 17, 72], ["-", 0, 16, 31, 16, 31, 23, 0, 16, 12, 13], ["+", 31, 16, 31, 16, 31, 23, 0, 16, 17, 33], ["+", 31, 16, 31, 16, 31, 23, 0, 16, 12, 13], ["+", 12, 2, 3, 4, 0, 16, 31, 16, 17, 72], ["+", 12, 2, 3, 4, 0, 16, 31, 16, 12, 13]] | 1 | 114 |
"""
"""
def int_as_array(num): return list(map(int, [y for y in str(num)]))
def array_as_int(arr): return int(''.join(map(str, arr)))
def read_int(): return int(input())
def read_array(): return list(map(int, input().split(' ')))
def array_to_string(arr, sep=' '): return sep.join(map(str, arr))
def matrix_t... | """
"""
def int_as_array(num): return list(map(int, [y for y in str(num)]))
def array_as_int(arr): return int(''.join(map(str, arr)))
def read_int(): return int(input())
def read_array(): return list(map(int, input().split(' ')))
def array_to_string(arr, sep=' '): return sep.join(map(str, arr))
def matrix_t... | [["-", 0, 1, 0, 662, 12, 206, 206, 663, 0, 612], ["-", 0, 1, 0, 662, 12, 206, 206, 663, 0, 102], ["-", 206, 663, 0, 657, 31, 23, 0, 657, 12, 612], ["+", 206, 663, 0, 657, 31, 23, 0, 657, 12, 612], ["+", 0, 1, 0, 662, 12, 206, 206, 663, 0, 102]] | 5 | 263 |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main() {
char str[105];
scanf("%s", str);
int len = strlen(str);
int i = 0, j = len - 1;
int mid = len / 2;
int flag = 0;
int flagi = 0;
for (i = 0, j = len - 1; i<mid, j> mid; i++, j--) {
if (str[i] != str[j])
flag = 1;
}
int ... | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main() {
char str[105];
scanf("%s", str);
int len = strlen(str);
int i = 0, j = len - 1;
int mid = len / 2;
int flag = 0;
int flagi = 0;
for (i = 0, j = len - 1; i<mid, j> mid; i++, j--) {
if (str[i] != str[j])
flag = 1;
}
int ... | [["-", 8, 9, 0, 57, 15, 23, 0, 16, 12, 13], ["+", 8, 9, 0, 57, 15, 23, 0, 16, 12, 13]] | 0 | 200 |
#include <bits/stdc++.h>
using namespace std;
int isPalindrome(string str) {
int l = 0;
int h = str.length();
while (h > l) {
if (str[l++] != str[h--]) {
return 0;
}
}
return 1;
}
int main() {
string s;
cin >> s;
int n = s.length();
string str1 = s.substr(0, (n - 1) / 2);
string str2 =... | #include <bits/stdc++.h>
using namespace std;
int isPalindrome(string str) {
int l = 0;
int h = str.length() - 1;
while (h > l) {
if (str[l++] != str[h--]) {
return 0;
}
}
return 1;
}
int main() {
string s;
cin >> s;
int n = s.length();
string str1 = s.substr(0, (n - 1) / 2);
string st... | [["+", 8, 9, 0, 43, 49, 50, 51, 16, 17, 33], ["+", 8, 9, 0, 43, 49, 50, 51, 16, 12, 13]] | 1 | 159 |
def main():
S = input()
len_s = len(S)
flag = False
if S == S[::-1]:
if S[len_s // 2] == S[len_s // 2:-1:-1]:
if S[len_s // 2:] == S[-1:len_s // 2:-1]:
flag = True
if flag:
print('Yes')
else:
print('No')
if __name__ == '__main__':
main() | def main():
S = input()
len_s = len(S)
flag = False
if S == S[::-1]:
if S[0:len_s // 2] == S[len_s // 2 - 1::-1]:
if S[len_s // 2 + 1:] == S[-1:len_s // 2:-1]:
flag = True
# print(S[0:len_s // 2], S[len_s // 2 - 1::-1])
# print(S[len_s // 2 + 1:], S[-1:len_s /... | [["+", 0, 57, 15, 666, 0, 206, 206, 663, 0, 612], ["+", 0, 57, 15, 666, 0, 206, 206, 663, 0, 102], ["-", 0, 57, 15, 666, 0, 206, 206, 663, 0, 102], ["+", 15, 666, 0, 206, 206, 663, 0, 657, 17, 72], ["+", 15, 666, 0, 206, 206, 663, 0, 657, 12, 612]] | 5 | 103 |
def parindrome(s):
print(s)
if s[::] == s[::-1]:
return True
return False
def string_parindrome(s):
if parindrome(s):
N = len(s)
if parindrome(s[:((N-1)//2):]) and parindrome(s[((N+3)//2)-1::]):
return "Yes"
return "No"
S = input()
print(string_parindrome(S... | def parindrome(s):
if s[::] == s[::-1]:
return True
return False
def string_parindrome(s):
if parindrome(s):
N = len(s)
if parindrome(s[:((N-1)//2):]) and parindrome(s[((N+3)//2)-1::]):
return "Yes"
return "No"
S = input()
print(string_parindrome(S))
| [["-", 0, 14, 8, 196, 0, 1, 0, 652, 63, 22], ["-", 8, 196, 0, 1, 0, 652, 3, 4, 0, 24], ["-", 8, 196, 0, 1, 0, 652, 3, 4, 0, 22], ["-", 8, 196, 0, 1, 0, 652, 3, 4, 0, 25]] | 5 | 106 |
def isPalin(s):
return s[::-1]==s
s=input()
n=len(s)
n1,n2=(n-1)//2,(n+3)//2
a,b=s[:n1],s[n2-1:]
#print(a,b)
if isPalin(a) and isPalin(b) and len(s)%2!=0:
print("Yes")
else:
print("No") | def isPalin(s):
return s[::-1]==s
s=input()
n=len(s)
n1,n2=(n-1)//2,(n+3)//2
a,b=s[:n1],s[n2-1:]
#print(a,b)
if isPalin(a) and isPalin(b) and len(s)%2!=0 and isPalin(s):
print("Yes")
else:
print("No") | [["+", 36, 36, 0, 656, 0, 57, 15, 679, 17, 355], ["+", 0, 656, 0, 57, 15, 679, 12, 652, 63, 22], ["+", 0, 57, 15, 679, 12, 652, 3, 4, 0, 24], ["+", 0, 57, 15, 679, 12, 652, 3, 4, 0, 22], ["+", 0, 57, 15, 679, 12, 652, 3, 4, 0, 25]] | 5 | 98 |
#include <iostream>
#include <string>
using namespace std;
int main(int argc, const char *argv[]) {
bool possible = true;
string target;
cin >> target;
int i = 0;
int str_size = int(target.length());
int moving_index = ((str_size - 1) / 2) - 1;
while (moving_index >= 0 && possible) {
if (target[i] !... | #include <iostream>
#include <string>
using namespace std;
int main(int argc, const char *argv[]) {
bool possible = true;
string target;
cin >> target;
int i = 0;
int str_size = int(target.length());
int moving_index = ((str_size - 1) / 2) - 1;
while (moving_index >= 0 && possible) {
if (target[i] !... | [["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6]] | 1 | 267 |
def kaibun(s):
N = len(s)
flag = True
for i in range(N // 2):
if s[i] != s[N - i - 1]:
flag = False
return flag
string = input()
N = len(string)
if kaibun(string) and kaibun(string[:(N - 3) // 2]) and kaibun(string[(N + 1) // 2:N - 1]):
print('Yes')
else:
print('No')
| def kaibun(s):
N = len(s)
flag = True
for i in range(N // 2):
if s[i] != s[N - i - 1]:
flag = False
return flag
string = input()
N = len(string)
if kaibun(string) and kaibun(string[:(N - 1) // 2]) and kaibun(string[(N + 1) // 2:N]):
print('Yes')
else:
print('No')
| [["-", 206, 663, 0, 657, 31, 23, 0, 657, 12, 612], ["+", 206, 663, 0, 657, 31, 23, 0, 657, 12, 612], ["-", 3, 4, 0, 206, 206, 663, 0, 657, 17, 33], ["-", 3, 4, 0, 206, 206, 663, 0, 657, 12, 612]] | 5 | 109 |
S = input()
N = len(S)
flag = True
for i in range(int(len(S)/2)):
if S[i]!=S[-1-i]:
flag = False
breakat
if flag==True:
right = int((N-1) / 2)
subS = S[0:right]
for i in range(int(len(subS)/2)):
if subS[i]!=subS[-1-i]:
flag = False
break
if flag==True:
left = int((N+3) / 2)
subS ... | S = input()
N = len(S)
flag = True
for i in range(int(len(S)/2)):
if S[i]!=S[-1-i]:
flag = False
break
if flag==True:
right = int((N-1) / 2)
subS = S[0:right]
for i in range(int(len(subS)/2)):
if subS[i]!=subS[-1-i]:
flag = False
break
if flag==True:
left = int((N+3) / 2)
subS = ... | [["-", 8, 196, 0, 57, 64, 196, 0, 1, 0, 22], ["+", 8, 196, 0, 57, 64, 196, 0, 93, 0, 94]] | 5 | 184 |
#include <iostream>
#include <stack>
#include <string>
using namespace std;
bool isParindrome(string input) {
auto left = input.begin();
auto right = input.end() - 1;
while (left < right) {
if (*left++ != *right--)
return false;
}
return true;
}
int main() {
string input = "";
cin >> input;
... | #include <iostream>
#include <stack>
#include <string>
using namespace std;
bool isParindrome(string input) {
auto left = input.begin();
auto right = input.end() - 1;
while (left < right) {
if (*left++ != *right--)
return false;
}
return true;
}
int main() {
string input = "";
cin >> input;
... | [["+", 51, 16, 31, 16, 31, 2, 3, 4, 0, 22], ["+", 51, 16, 31, 16, 31, 2, 3, 4, 0, 25], ["+", 0, 43, 49, 50, 51, 16, 31, 16, 17, 98], ["+", 49, 50, 51, 16, 31, 16, 12, 2, 63, 22], ["+", 51, 16, 31, 16, 12, 2, 3, 4, 0, 24]] | 1 | 156 |
s=input()
n=len(s)+1
a=s[0:int((n-1)/2)]
b=s[int((n+3)/2)-1:n-1]
print(a,b)
if a==b:
print('Yes')
else:
print('No') | s=input()
n=len(s)+1
a=s[0:int((n-1)/2)]
b=s[int((n+3)/2)-1:n-1]
if a==b:
print('Yes')
else:
print('No') | [["-", 36, 36, 0, 656, 0, 1, 0, 652, 63, 22], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 24], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 22], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 21], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 25]] | 5 | 76 |
s=list(input())
N=len(s)
if N==3:
if s[0]==s[2]:
print("Yes")
else:
print("No")
else:
tmp=s[0:int((N-1)/2)+1]
tmp_rev=tmp[::-1]
tmp2=s[int((N+3)/2)-1:]
tmp2_rev=tmp2[::-1]
if tmp==tmp_rev and tmp2==tmp2_rev and s==s[::-1]:
print("Yes")
else:
print("No") | s=list(input())
N=len(s)
if N==3:
if s[0]==s[2]:
print("Yes")
else:
print("No")
else:
tmp=s[0:int((N-1)/2)]
tmp_rev=tmp[::-1]
tmp2=s[int((N+3)/2)-1:]
tmp2_rev=tmp2[::-1]
if tmp==tmp_rev and tmp2==tmp2_rev and s==s[::-1]:
print("Yes")
else:
print("No") | [["-", 0, 662, 12, 206, 206, 663, 0, 657, 17, 72], ["-", 0, 662, 12, 206, 206, 663, 0, 657, 12, 612]] | 5 | 134 |
import sys
input = sys.stdin.readline
S = input()
Sr=''.join(list(reversed(S)))
N=len(S)
S1=S[:int((N-1)/2)]
S1r=''.join(list(reversed(S1)))
S2=S[int((N+3)/2)-1:]
S2r=''.join(list(reversed(S2)))
if S==Sr and S1 ==S1r and S2==S2r:
print('Yes')
else:
print('No') | import sys
input = sys.stdin.readline
S = input().strip()
Sr=''.join(list(reversed(S)))
N=len(S)
S1=S[:int((N-1)/2)]
S1r=''.join(list(reversed(S1)))
S2=S[int((N+3)/2)-1:]
S2r=''.join(list(reversed(S2)))
if S==Sr and S1 ==S1r and S2==S2r:
print('Yes')
else:
print('No') | [["+", 0, 1, 0, 662, 12, 652, 63, 319, 0, 131], ["+", 0, 1, 0, 662, 12, 652, 63, 319, 319, 22], ["+", 0, 1, 0, 662, 12, 652, 3, 4, 0, 24], ["+", 0, 1, 0, 662, 12, 652, 3, 4, 0, 25]] | 5 | 126 |
#include <algorithm>
#include <cmath> //abs()かfabs()で少数絶対値
#include <cstdlib> //abs()で整数絶対値
#include <iomanip> //cout<<setw(数字) で空白による桁揃え
#include <iostream> //cout<<right で右揃え
#include <queue>
#include <string>
#include <vector>
using namespace std;
using ll = long long int;
int main(void) {
string S;
cin >... | #include <algorithm>
#include <cmath> //abs()かfabs()で少数絶対値
#include <cstdlib> //abs()で整数絶対値
#include <iomanip> //cout<<setw(数字) で空白による桁揃え
#include <iostream> //cout<<right で右揃え
#include <queue>
#include <string>
#include <vector>
using namespace std;
using ll = long long int;
int main(void) {
string S;
cin >... | [["-", 49, 50, 51, 2, 3, 4, 0, 16, 17, 33], ["-", 49, 50, 51, 2, 3, 4, 0, 16, 12, 13]] | 1 | 225 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.