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
#include <bits/stdc++.h> #define pb push_back #define mp make_pair #define rall(s) (s).rbegin(), (s).rend() #define bs(x) (bitset<18>(x)).to_string() #define sep ios::sync_with_stdio(0), cin.tie(0) using namespace std; typedef long long ll; int main() { sep; string s; cin >> s; if (s != string(rall(s))) ret...
#include <bits/stdc++.h> #define pb push_back #define mp make_pair #define rall(s) (s).rbegin(), (s).rend() #define bs(x) (bitset<18>(x)).to_string() #define sep ios::sync_with_stdio(0), cin.tie(0) using namespace std; typedef long long ll; int main() { sep; string s; cin >> s; if (s != string(rall(s))) ret...
[["-", 64, 37, 0, 34, 31, 16, 12, 5, 0, 6], ["+", 64, 37, 0, 34, 31, 16, 12, 5, 0, 6], ["-", 8, 9, 0, 1, 0, 16, 12, 5, 0, 6], ["+", 8, 9, 0, 1, 0, 16, 12, 5, 0, 6]]
1
163
s = input().split()[0] n = len(s) l = s[:n//2] r = s[n//2+1:] cnt = 0 for i in range(n//2): if l[i] == l[n//2 - 1 - i]: cnt += 1 if r[i] == r[n//2 - 1 - i]: cnt += 1 if cnt == n - 1: print('Yes') else: print('No')
s = input().split()[0] n = len(s) l = s[:n//2] r = s[n//2+1:] cnt = 0 for i in range(n//2): if l[i] == l[n//2 - 1 - i]: cnt += 1 if r[i] == r[n//2 - 1 - i]: cnt += 1 if l == r and cnt == n - 1: print('Yes') else: print('No')
[["+", 0, 656, 0, 57, 15, 679, 31, 666, 0, 22], ["+", 0, 656, 0, 57, 15, 679, 31, 666, 667, 60], ["+", 36, 36, 0, 656, 0, 57, 15, 679, 17, 355]]
5
112
#include <algorithm> #include <cstdio> #include <cstdlib> #include <cstring> #include <iostream> #include <string.h> using namespace std; char s[105]; int judge(int a, int b) { for (int i = a; i <= a + (b - a) / 2; i++) { if (s[i] != s[b - (i - a)]) { return 0; } } return 1; } int main() { cin >> ...
#include <algorithm> #include <cstdio> #include <cstdlib> #include <cstring> #include <iostream> #include <string.h> using namespace std; char s[105]; int judge(int a, int b) { for (int i = a; i <= a + (b - a) / 2; i++) { if (s[i] != s[b - (i - a)]) { return 0; } } return 1; } int main() { cin >> ...
[["+", 12, 16, 31, 2, 3, 4, 0, 16, 17, 33], ["+", 12, 16, 31, 2, 3, 4, 0, 16, 12, 13]]
1
165
#include <algorithm> #include <deque> #include <iomanip> #include <iostream> #include <map> #include <math.h> #include <queue> #include <string> #include <vector> const int MOD = 1e9 + 7; typedef long long ll; using namespace std; bool kaibun(string str) { for (int i = 0; i < str.length(); i++) { if (str[i] != s...
#include <algorithm> #include <deque> #include <iomanip> #include <iostream> #include <map> #include <math.h> #include <queue> #include <string> #include <vector> const int MOD = 1e9 + 7; typedef long long ll; using namespace std; bool kaibun(string str) { for (int i = 0; i < str.length(); i++) { if (str[i] != s...
[["+", 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
191
#include <bits/stdc++.h> #include <string> using namespace std; int main() { string S; cin >> S; int flag1 = 0, flag2 = 0, flag3 = 0; for (int i = 0; i < (S.length() - 1) / 2; i++) { if (S[i] != S[S.length() - i - 1]) flag1 = 1; } for (int i = 0; i < (S.length() - 1) / 2; i++) { if (S[i] != S...
#include <bits/stdc++.h> #include <string> using namespace std; int main() { string S; cin >> S; int flag1 = 0, flag2 = 0, flag3 = 0; for (int i = 0; i < (S.length() - 1) / 2; i++) { if (S[i] != S[S.length() - i - 1]) flag1 = 1; } for (int i = 0; i < (S.length() - 1) / 2; i++) { if (S[i] != S...
[["-", 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
222
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> #pragma GCC target("avx2") #pragma GCC optimization("O3") #pragma GCC optimization("unroll-loops") #pragma comment(linker, "/stack:200000000") #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=nati...
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> #pragma GCC target("avx2") #pragma GCC optimization("O3") #pragma GCC optimization("unroll-loops") #pragma comment(linker, "/stack:200000000") #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=nati...
[["+", 15, 339, 51, 16, 31, 16, 31, 2, 63, 22], ["+", 51, 16, 31, 16, 31, 2, 3, 4, 0, 24], ["+", 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]]
1
948
s=input() def kaibun(aa) : for i in range(len(aa)): if aa[i]!=aa[-i-1] : return False return True b=int((len(s)-1)/2) c=int((len(s)+3)/2) mae=s[:b] ato=s[c:] if kaibun(s) and kaibun(mae) and kaibun(ato) : print ('Yes') else : print('No')
s=input() def kaibun(aa) : for i in range(len(aa)): if aa[i]!=aa[-i-1] : return False return True b=int((len(s)-1)/2) c=int((len(s)+3)/2) mae=s[:b] ato=s[c-1:] if kaibun(s) and kaibun(mae) and kaibun(ato) : 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]]
5
114
#include <bits/stdc++.h> using namespace std; long long a, b, c, d, i, e, f, g, n, m, k, l; pair<long long, long long> A[200005]; long long B[200005], maxx; string s; int main() { cin >> s; for (long long i = 0; i < s.size() / 2; i++) { if (s[i] != s[s.size() - 1 - i]) { l = 1; break; } } if...
#include <bits/stdc++.h> using namespace std; long long a, b, c, d, i, e, f, g, n, m, k, l; pair<long long, long long> A[200005]; long long B[200005], maxx; string s; int main() { cin >> s; for (long long i = 0; i < s.size() / 2; i++) { if (s[i] != s[s.size() - 1 - i]) { l = 1; break; } } if...
[["-", 64, 9, 0, 1, 0, 16, 12, 5, 0, 6], ["+", 64, 9, 0, 1, 0, 16, 12, 5, 0, 6], ["-", 8, 9, 0, 1, 0, 16, 12, 5, 0, 6], ["+", 8, 9, 0, 1, 0, 16, 12, 5, 0, 6]]
1
219
import sys S = input() # S = 'akasaka' N = len(S) S_rev = S[::-1] if S != S_rev: print('No') sys.exit(1) sub_S = S[:int((N - 1)/2)+1] sub_S_rev = S[int((N + 3)/2)-1:] if sub_S != sub_S_rev: print('No') sys.exit(1) print('Yes')
import sys S = input() # S = 'akasaka' N = len(S) S_rev = S[::-1] if S != S_rev: print('No') sys.exit(0) sub_S = S[:int((N - 1)/2)] sub_S_rev = S[int((N + 3)/2)-1:] if sub_S != sub_S_rev: print('No') sys.exit(0) print('Yes')
[["-", 64, 196, 0, 1, 0, 652, 3, 4, 0, 612], ["+", 64, 196, 0, 1, 0, 652, 3, 4, 0, 612], ["-", 0, 662, 12, 206, 206, 663, 0, 657, 17, 72], ["-", 0, 662, 12, 206, 206, 663, 0, 657, 12, 612]]
5
99
S = input() left = ((len(S) - 1) // 2) right = ((len(S) + 3) // 2) - 1 l_s = S[0:left] r_s = S[right:len(S)] if(S == S[::1] and l_s == l_s[::-1] and r_s == r_s[::-1]): print("Yes") else: print("No")
S = input() left = ((len(S) - 1) // 2) right = ((len(S) + 3) // 2) - 1 l_s = S[0:left] r_s = S[right:len(S)] if(S == S[::-1] and l_s == l_s[::-1] and r_s == r_s[::-1]): print("Yes") else: print("No")
[["+", 31, 666, 0, 206, 206, 663, 0, 664, 17, 33]]
5
100
#include <algorithm> #include <cstdio> #include <iostream> using namespace std; bool huiwen(string s) { int len = s.size(); for (int i = 0; i < len / 2; i++) { if (s[i] != s[len - i - 1]) return false; } return true; } int main() { string s; cin >> s; int n = s.size(); int l1 = (n - 1) / 2, l2...
#include <algorithm> #include <cstdio> #include <iostream> using namespace std; bool huiwen(string s) { int len = s.size(); for (int i = 0; i < len / 2; i++) { if (s[i] != s[len - i - 1]) return false; } return true; } int main() { string s; cin >> s; int n = s.size(); int l1 = (n - 1) / 2, l2...
[["+", 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
171
#include <bits/stdc++.h> using namespace std; #define pb push_back #define mp make_pair #define ll long long #define debug(x) cout << x << endl; const ll INF = 1e18; const ll mod = 1e9 + 7; const ll N = 1010; bool isPal(string str) { size_t len = str.length(); for (int i = 0; i < len / 2; i++) { if (str[i] != ...
#include <bits/stdc++.h> using namespace std; #define pb push_back #define mp make_pair #define ll long long #define debug(x) cout << x << endl; const ll INF = 1e18; const ll mod = 1e9 + 7; const ll N = 1010; bool isPal(string str) { size_t len = str.length(); for (int i = 0; i < len / 2; i++) { if (str[i] != ...
[["-", 15, 339, 51, 16, 12, 2, 3, 4, 0, 22], ["+", 15, 339, 51, 16, 12, 2, 3, 4, 0, 22]]
1
158
# -*- coding: utf-8 -*- s = list(input()) fl = True sf = list(s) sf.reverse() if sf != s: fl = False else: s1 = s[:len(s)//2] s1r = list(s1) s1r.reverse() if s1 != s1r: fl = False else: s2 = s[:(len(s) + 3) // 2] s2r = list(s2) s2r.reverse() if s2r != s...
# -*- coding: utf-8 -*- s = list(input()) fl = True sf = list(s) sf.reverse() if sf != s: fl = False else: s1 = s[:len(s)//2] s1r = list(s1) s1r.reverse() if s1 != s1r: fl = False else: s2 = s[(len(s) + 3) // 2 - 1:] s2r = list(s2) s2r.reverse() if s2r ...
[["-", 0, 1, 0, 662, 12, 206, 206, 663, 0, 102], ["+", 0, 662, 12, 206, 206, 663, 0, 657, 17, 33], ["+", 0, 662, 12, 206, 206, 663, 0, 657, 12, 612], ["+", 0, 1, 0, 662, 12, 206, 206, 663, 0, 102]]
5
118
#include <algorithm> #include <bitset> #include <cmath> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <tuple> #include <vector> using namespace std; typedef long long ll; #define MAX_N 1000000 #define INF 1000000 int a[MAX_N]; int b[...
#include <algorithm> #include <bitset> #include <cmath> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <tuple> #include <vector> using namespace std; typedef long long ll; #define MAX_N 1000000 #define INF 1000000 int a[MAX_N]; int b[...
[["+", 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
271
#define _CRT_SECURE_NO_WARNINGS #include <bits/stdc++.h> #define fi first #define se second #define pb push_back #define E "\n" using namespace std; const long long MOD = (long long)1e9 + 7; int n; string s; bool fun(int l, int r) { while (l < r) { if (s[l] != s[r]) return false; l++; r--; } ...
#define _CRT_SECURE_NO_WARNINGS #include <bits/stdc++.h> #define fi first #define se second #define pb push_back #define E "\n" using namespace std; const long long MOD = (long long)1e9 + 7; int n; string s; bool fun(int l, int r) { r--; while (l < r) { if (s[l] != s[r]) return false; l++; r--;...
[["+", 0, 14, 8, 9, 0, 1, 0, 27, 28, 22], ["+", 0, 14, 8, 9, 0, 1, 0, 27, 17, 68], ["+", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35]]
1
187
#include <bits/stdc++.h> #define int long long using namespace std; string s; bool isPallindrome(int ind1, int ind2) { for (int i = ind1; i < (ind1 + ind2) / 2; i++) { if (s[i] != s[ind2 - 1 - i]) return false; } return true; } main() { cin >> s; string ans = "NO"; if (isPallindrome(0, s.size())) ...
#include <bits/stdc++.h> #define int long long using namespace std; string s; bool isPallindrome(int ind1, int ind2) { for (int i = ind1; i < (ind1 + ind2) / 2; i++) { if (s[i] != s[ind2 - 1 - i]) return false; } return true; } main() { cin >> s; string ans = "No"; if (isPallindrome(0, s.size())) ...
[["-", 8, 9, 0, 43, 49, 50, 51, 5, 0, 6], ["+", 8, 9, 0, 43, 49, 50, 51, 5, 0, 6], ["-", 0, 57, 64, 1, 0, 11, 12, 5, 0, 6], ["+", 0, 57, 64, 1, 0, 11, 12, 5, 0, 6]]
1
154
//* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //* vamsicool007 You are never wrong to do the right thing vamsicool007 * //* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * #include <bits/stdc++.h> using namespace std; #define flash ...
//* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //* vamsicool007 You are never wrong to do the right thing vamsicool007 * //* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * #include <bits/stdc++.h> using namespace std; #define flash ...
[["-", 0, 14, 8, 9, 0, 1, 0, 2, 63, 22], ["-", 8, 9, 0, 1, 0, 2, 3, 4, 0, 24], ["-", 8, 9, 0, 1, 0, 2, 3, 4, 0, 25], ["-", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35]]
1
756
letter = str(input()) N = len(letter) l_1 = letter[:int((N-1)/2)] l_2 = letter[int((N+3)/2-1):] if(l == l[::-1] and l_1 == l_1[::-1] and l_2 == l_2[::-1]): ans = "Yes" else: ans = "No" # print(l_1) # print(l_2) print(ans)
letter = str(input()) N = len(letter) l_1 = letter[:int((N-1)/2)] l_2 = letter[int((N+3)/2-1):] if(letter == letter[::-1] and l_1 == l_1[::-1] and l_2 == l_2[::-1]): ans = "Yes" else: ans = "No" # print(l_1) # print(l_2) print(ans)
[["-", 15, 23, 0, 679, 31, 679, 31, 666, 0, 22], ["+", 15, 23, 0, 679, 31, 679, 31, 666, 0, 22], ["-", 0, 679, 31, 679, 31, 666, 0, 206, 51, 22], ["+", 0, 679, 31, 679, 31, 666, 0, 206, 51, 22]]
5
99
#include <algorithm> #include <iostream> #include <map> #include <math.h> #include <queue> #include <stack> #include <stdio.h> #include <string.h> using namespace std; #define inf 1000000007 char s[105]; int i, w = 0, n, d; int main() { scanf("%s", s); int n = strlen(s); for (i = 0; i < n / 2; i++) { if (s[i]...
#include <algorithm> #include <iostream> #include <map> #include <math.h> #include <queue> #include <stack> #include <stdio.h> #include <string.h> using namespace std; #define inf 1000000007 char s[105]; int i, w = 0, n, d; int main() { scanf("%s", s); int n = strlen(s); for (i = 0; i < n / 2; i++) { if (s[i]...
[["+", 51, 16, 12, 69, 341, 342, 0, 16, 17, 33], ["+", 51, 16, 12, 69, 341, 342, 0, 16, 12, 13]]
1
179
n=input() s=len(n) d=int((s-1)/2) p=int(s+3)/2 m=n[::-1] n1=n[0:d-1] n2=n1[::-1] n3=n[p-1:] n4=n3[::-1] if n==m and n1==n2 and n3==n4: print("Yes") else: print("No")
n=input() s=len(n) d=int((s-1)/2) p=int((s+3)/2) m=n[::-1] n1=n[0:d] n2=n1[::-1] n3=n[p-1:] n4=n3[::-1] if n==m and n1==n2 and n3==n4: print("Yes") else: print("No")
[["+", 12, 652, 3, 4, 0, 657, 31, 23, 0, 24], ["+", 0, 1, 0, 662, 12, 652, 3, 4, 0, 25], ["-", 0, 662, 12, 206, 206, 663, 0, 657, 17, 33], ["-", 0, 662, 12, 206, 206, 663, 0, 657, 12, 612]]
5
106
#include <bits/stdc++.h> using namespace std; #define ll long long #define mod 1000000007 #define inf 1e18 + 9 #define fr first #define sc second #define pb push_back #define pf push_front #define mp make_pair #define pll pair<ll, ll> #define vll vector<ll> #define umap unordered_map<ll, ll> #define lpq priority_queue...
#include <bits/stdc++.h> using namespace std; #define ll long long #define mod 1000000007 #define inf 1e18 + 9 #define fr first #define sc second #define pb push_back #define pf push_front #define mp make_pair #define pll pair<ll, ll> #define vll vector<ll> #define umap unordered_map<ll, ll> #define lpq priority_queue...
[["-", 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
300
#include <algorithm> #include <array> #include <climits> #include <cmath> #include <deque> #include <iostream> #include <limits> #include <map> #include <numeric> #include <queue> #include <set> #include <stack> #include <string> #include <unordered_map> #include <unordered_set> #include <utility> #include <vector> us...
#include <algorithm> #include <array> #include <climits> #include <cmath> #include <deque> #include <iostream> #include <limits> #include <map> #include <numeric> #include <queue> #include <set> #include <stack> #include <string> #include <unordered_map> #include <unordered_set> #include <utility> #include <vector> us...
[["+", 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], ["+", 12, 2, 3, 4, 0, 2, 63, 118, 28, 22]]
1
194
n = input() m = len(n) if n == n[::-1]: k = n[0:(m-1)//2] l = n[(m+3)//2-1:m] print(k,l) if k == k[::-1]: if l == l[::-1]: print('Yes') exit() print('No')
n = input() m = len(n) if n == n[::-1]: k = n[0:(m-1)//2] l = n[(m+3)//2-1:m] if k == k[::-1]: if l == l[::-1]: print('Yes') exit() print('No')
[["-", 0, 57, 64, 196, 0, 1, 0, 652, 63, 22], ["-", 64, 196, 0, 1, 0, 652, 3, 4, 0, 24], ["-", 64, 196, 0, 1, 0, 652, 3, 4, 0, 22], ["-", 64, 196, 0, 1, 0, 652, 3, 4, 0, 21], ["-", 64, 196, 0, 1, 0, 652, 3, 4, 0, 25]]
5
95
#include <bits/stdc++.h> //#include <boost/multiprecision/cpp_int.hpp> //#include <ext/pb_ds/assoc_container.hpp> //#include <ext/pb_ds/tree_policy.hpp> #pragma GCC optimize("O3") #define REP(i, n) for (int i = 0; i < n; i++) #define REPP(i, n) for (int i = 1; i <= n; i++) #define ALL(obj) (obj).begin(), (obj).end() #d...
#include <bits/stdc++.h> //#include <boost/multiprecision/cpp_int.hpp> //#include <ext/pb_ds/assoc_container.hpp> //#include <ext/pb_ds/tree_policy.hpp> #pragma GCC optimize("O3") #define REP(i, n) for (int i = 0; i < n; i++) #define REPP(i, n) for (int i = 1; i <= n; i++) #define ALL(obj) (obj).begin(), (obj).end() #d...
[["-", 3, 4, 0, 16, 31, 23, 0, 16, 12, 13], ["+", 3, 4, 0, 16, 31, 23, 0, 16, 12, 13]]
1
530
s = input() res = 'Yes' if s != s[::-1]: res = 'No' t = s[:(len(s)-1)//2] if t != t[::-1]: res = 'Yes' u = s[((len(s)+3)//2)-1:len(s)] if u != u[::-1]: res = 'No' print(res)
s = input() res = 'Yes' if s != s[::-1]: res = 'No' t = s[:(len(s)-1)//2] if t != t[::-1]: res = 'No' u = s[((len(s)+3)//2)-1:len(s)] if u != u[::-1]: res = 'No' print(res)
[["-", 64, 196, 0, 1, 0, 662, 12, 557, 0, 6], ["+", 64, 196, 0, 1, 0, 662, 12, 557, 0, 6]]
5
102
string = str(input()) N = len(string) zenhan = string[:int((N-1)/2)] kouhan = string[int((N-1)/2)+1:] def IsKaibun(string): if string == string[::-1]: return True else: return False if IsKaibun(zenhan) and IsKaibun(kouhan): print("Yes") else: print("No")
string = str(input()) N = len(string) zenhan = string[:int((N-1)/2)] kouhan = string[int((N-1)/2)+1:] def IsKaibun(string): if string == string[::-1]: return True else: return False if IsKaibun(string) and IsKaibun(zenhan) and IsKaibun(kouhan): 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
96
/// wa ^3^ #pragma GCC optimize("O3") #include <bits/stdc++.h> #define x first #define y second #define pb push_back #define sz(x) (int)x.size() using namespace std; using ll = long long; using pii = pair<int, int>; const int MOD = 1e9 + 7; const int INF32 = 1e9 + 1e2; void stndrtn() { #ifdef accepted freopen(...
/// wa ^3^ #pragma GCC optimize("O3") #include <bits/stdc++.h> #define x first #define y second #define pb push_back #define sz(x) (int)x.size() using namespace std; using ll = long long; using pii = pair<int, int>; const int MOD = 1e9 + 7; const int INF32 = 1e9 + 1e2; void stndrtn() { #ifdef accepted freopen(...
[["+", 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
226
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace std; using namespace __gnu_pbds; #define INF (1LL << 57) #define MV 200001 #define LMV 21 #define ff first #define ss second #define pb push_back #define eb emplace_back #define emp emplace #define who...
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace std; using namespace __gnu_pbds; #define INF (1LL << 57) #define MV 200001 #define LMV 21 #define ff first #define ss second #define pb push_back #define eb emplace_back #define emp emplace #define who...
[["-", 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
753
#include <bits/stdc++.h> using namespace std; int n; string s; bool check(int L, int R) { while (L < R) { if (s[L] != s[R]) { return false; } L++; R--; } return true; } int main() { ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0); cin >> s; n = s.length(); s = " " +...
#include <bits/stdc++.h> using namespace std; int n; string s; bool check(int L, int R) { while (L < R) { if (s[L] != s[R]) { return false; } L++; R--; } return true; } int main() { ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0); cin >> s; n = s.length(); s = " " +...
[["-", 0, 16, 12, 23, 0, 41, 64, 5, 0, 6], ["+", 0, 16, 12, 23, 0, 41, 64, 5, 0, 6], ["-", 0, 16, 12, 23, 0, 41, 75, 5, 0, 6], ["+", 0, 16, 12, 23, 0, 41, 75, 5, 0, 6]]
1
152
#include <cstdio> #include <cstring> using namespace std; char ps[233]; int main() { scanf("%s", ps); int l = strlen(ps); bool flag = true; for (int i = 0; i < l / 2; i++) if (ps[i] != ps[l - i - 1]) { flag = false; break; } for (int i = 0; i < (l - 1) / 2; i++) if (ps[i] != ps[(l - ...
#include <cstdio> #include <cstring> using namespace std; char ps[233]; int main() { scanf("%s", ps); int l = strlen(ps); bool flag = true; for (int i = 0; i < l / 2; i++) if (ps[i] != ps[l - i - 1]) { flag = false; break; } for (int i = 0; i < (l - 1) / 2; i++) if (ps[i] != ps[(l - ...
[["-", 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
210
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; #define F first #define S second bool is_pal(string t) { string l = t; reverse(l.begin(), l.end()); if (l == t) return true; return false; } int main() { string s; cin >> s; if (is_pal(s) && is_pal(s.substr...
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; #define F first #define S second bool is_pal(string t) { string l = t; reverse(l.begin(), l.end()); if (l == t) return true; return false; } int main() { string s; cin >> s; if (is_pal(s) && is_pal(s.substr...
[["-", 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
115
/****************************************************************************** Online C++ Compiler. Code, Compile, Run and Debug C++ program online. Write your code in this editor and press "Run" button to compile and execute it. ******************************************...
/****************************************************************************** Online C++ Compiler. Code, Compile, Run and Debug C++ program online. Write your code in this editor and press "Run" button to compile and execute it. ******************************************...
[["-", 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
127
#include <algorithm> #include <iomanip> #include <iostream> #include <queue> #include <set> #include <string> #include <vector> using namespace std; int main() { string s; cin >> s; bool flg = true; int n = s.size(); for (int i = 0; i < (n - 1) / 2; i++) { cerr << s[i] << s[n - i - 1] << endl; if (s...
#include <algorithm> #include <iomanip> #include <iostream> #include <queue> #include <set> #include <string> #include <vector> using namespace std; int main() { string s; cin >> s; bool flg = true; int n = s.size(); for (int i = 0; i < (n - 1) / 2; i++) { cerr << s[i] << s[n - i - 1] << endl; if (s...
[["-", 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
265
#include <bits/stdc++.h> using namespace std; bool check(string s) { int n = s.size(); for (int i = 0; i < n / 2; i++) if (s[i] != s[n - i - 1]) return false; return true; } int main() { string s; cin >> s; int n = s.size(); bool fl = check(s.substr(0, (n - 1) / 2)) and check(s.substr(...
#include <bits/stdc++.h> using namespace std; bool check(string s) { int n = s.size(); for (int i = 0; i < n / 2; i++) if (s[i] != s[n - i - 1]) return false; return true; } int main() { string s; cin >> s; int n = s.size(); bool fl = check(s) and check(s.substr(0, (n - 1) / 2)) and ...
[["+", 51, 16, 31, 16, 31, 2, 3, 4, 0, 25], ["+", 0, 43, 49, 50, 51, 16, 31, 16, 17, 355], ["+", 49, 50, 51, 16, 31, 16, 12, 2, 63, 22], ["+", 51, 16, 31, 16, 12, 2, 3, 4, 0, 24], ["+", 12, 2, 3, 4, 0, 2, 63, 118, 28, 22]]
1
140
#include <bits/stdc++.h> using namespace std; #define pb push_back #define mp make_pair #define mod 1000000007 #define INF 1e9 + 5 typedef long long ll; #define IOS \ ios_base::sync_with_stdio(false); \ cin...
#include <bits/stdc++.h> using namespace std; #define pb push_back #define mp make_pair #define mod 1000000007 #define INF 1e9 + 5 typedef long long ll; #define IOS \ ios_base::sync_with_stdio(false); \ cin...
[["-", 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
238
#include <bits/stdc++.h> using namespace std; int main() { string s; cin >> s; string t = s.substr(0, s.size() / 2); string m = s.substr(s.size() / 2 + 1); if (t != m) { cout << "NO\n"; return 0; } for (int i = 0; i < t.size(); i++) { if (t[i] != t[t.size() - 1 - i]) { cout << "NO\n"; ...
#include <bits/stdc++.h> using namespace std; int main() { string s; cin >> s; string t = s.substr(0, s.size() / 2); string m = s.substr(s.size() / 2 + 1); if (t != m) { cout << "No\n"; return 0; } for (int i = 0; i < t.size(); i++) { if (t[i] != t[t.size() - 1 - i]) { cout << "No\n"; ...
[["-", 64, 9, 0, 1, 0, 16, 12, 5, 0, 6], ["+", 64, 9, 0, 1, 0, 16, 12, 5, 0, 6], ["-", 8, 9, 0, 1, 0, 16, 12, 5, 0, 6], ["+", 8, 9, 0, 1, 0, 16, 12, 5, 0, 6]]
1
135
s = gets.chomp if s != s.reverse print "No\n" else ss = s.slice(0, (s.length-1)/2) p ss if ss != ss.reverse print "No\n" else print "Yes\n" end end
s = gets.chomp if s != s.reverse print "No\n" else ss = s.slice(0, (s.length-1)/2) if ss != ss.reverse print "No\n" else print "Yes\n" end end
[["-", 0, 493, 0, 121, 75, 95, 0, 652, 735, 22], ["-", 0, 121, 75, 95, 0, 652, 3, 4, 0, 22]]
4
56
#coding:utf-8 import sys,os from collections import defaultdict, deque from math import gcd from math import ceil, floor sys.setrecursionlimit(10**6) write = sys.stdout.write dbg = (lambda *something: print(*something)) if 'TERM_PROGRAM' in os.environ else lambda *x: 0 def main(given=sys.stdin.readline): input = la...
#coding:utf-8 import sys,os from collections import defaultdict, deque from math import gcd from math import ceil, floor sys.setrecursionlimit(10**6) write = sys.stdout.write dbg = (lambda *something: print(*something)) if 'TERM_PROGRAM' in os.environ else lambda *x: 0 def main(given=sys.stdin.readline): input = la...
[["+", 0, 679, 31, 679, 31, 652, 3, 4, 0, 25], ["+", 0, 652, 3, 4, 0, 679, 31, 679, 17, 355], ["+", 3, 4, 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
232
import sys S = input() def is_palindrome(S): P = S[::-1] print(P) if S == P: return True return False if is_palindrome(S): N = len(S) if is_palindrome(S[0:(N-1)//2]) and is_palindrome(S[(N+3)//2-1:N]): print('Yes') sys.exit(0) print('No')
import sys S = input() def is_palindrome(S): P = S[::-1] if S == P: return True return False if is_palindrome(S): N = len(S) if is_palindrome(S[0:(N-1)//2]) and is_palindrome(S[(N+3)//2-1:N]): print('Yes') sys.exit(0) print('No')
[["-", 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
100
s = input() n = len(s) def f(x): return x == x[::-1] if f(s[:(n-1)//2]) and f(s[(n+3)//2-1:]): print("Yes") else: print("No")
s = input() n = len(s) def f(x): return x == x[::-1] if f(s) and f(s[:(n-1)//2]) and f(s[(n+3)//2-1:]): 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
74
s = input() n = len(s) cnt = 0 if s == s[::-1]: cnt += 1 idx = (n-1)//2 if s[:idx] == s[:idx][::-1]: cnt += 1 idx = (n+3)//2 if s[idx:] == s[idx:][::-1]: cnt += 1 print("Yes" if cnt == 3 else "No")
s = input() n = len(s) cnt = 0 if s == s[::-1]: cnt += 1 idx = (n-1)//2 if s[:idx] == s[:idx][::-1]: cnt += 1 idx = (n+3)//2-1 if s[idx:] == s[idx:][::-1]: cnt += 1 print("Yes" if cnt == 3 else "No")
[["+", 0, 656, 0, 1, 0, 662, 12, 657, 17, 33], ["+", 0, 656, 0, 1, 0, 662, 12, 657, 12, 612]]
5
104
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace std; using namespace __gnu_pbds; #define ordered_set \ tree<ll, null_type, less<ll>, rb_tree_tag, tree_order_statistics_node_update> #define...
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace std; using namespace __gnu_pbds; #define ordered_set \ tree<ll, null_type, less<ll>, rb_tree_tag, tree_order_statistics_node_update> #define...
[["-", 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
297
#include <bits/stdc++.h> #define pb push_back #define mp make_pair #define lli long long int #define llu long long unsigned int #define IOS \ ios_base::sync_with_stdio(false); \ cin.tie(NULL); ...
#include <bits/stdc++.h> #define pb push_back #define mp make_pair #define lli long long int #define llu long long unsigned int #define IOS \ ios_base::sync_with_stdio(false); \ cin.tie(NULL); ...
[["-", 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
220
#include <bits/stdc++.h> using namespace std; string s; bool ch(int l, int r) { while (l < r && s[l] == s[r]) { l++; r--; } return l >= r; } int main() { cin >> s; int n = s.length(); if (ch(0, n - 1) && ch(0, (n - 1) / 2 - 1), ch((n + 3) / 2 - 1, n - 1)) cout << "Yes"; else cout << "No";...
#include <bits/stdc++.h> using namespace std; string s; bool ch(int l, int r) { while (l < r && s[l] == s[r]) { l++; r--; } return l >= r; } int main() { cin >> s; int n = s.length(); if (ch(0, n - 1) && ch(0, (n - 1) / 2 - 1) && ch((n + 3) / 2 - 1, n - 1)) cout << "Yes"; else cout << "No...
[["-", 8, 9, 0, 57, 15, 339, 51, 34, 0, 21], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 98]]
1
124
#include <bits/stdc++.h> using namespace std; #define ll long long #define VV vector #define pb push_back #define bitc __builtin_popcountll #define m_p make_pair #define inf 1e18 + 1 #define eps 0.000000000001 #define fastio \ ios_base::sync_with_stdio(f...
#include <bits/stdc++.h> using namespace std; #define ll long long #define VV vector #define pb push_back #define bitc __builtin_popcountll #define m_p make_pair #define inf 1e18 + 1 #define eps 0.000000000001 #define fastio \ ios_base::sync_with_stdio(f...
[["-", 64, 9, 0, 1, 0, 16, 12, 5, 0, 6], ["+", 64, 9, 0, 1, 0, 16, 12, 5, 0, 6], ["-", 8, 9, 0, 1, 0, 16, 12, 5, 0, 6], ["+", 8, 9, 0, 1, 0, 16, 12, 5, 0, 6]]
1
355
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> #pragma GCC omodtimize("unroll-loops,no-stack-protector") #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native") using namespace __gnu_pbds; using namespace std; template <typename T> using or...
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> #pragma GCC omodtimize("unroll-loops,no-stack-protector") #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native") using namespace __gnu_pbds; using namespace std; template <typename T> using or...
[["+", 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
279
#include <bits/stdc++.h> using namespace std; #define endl "\n" #define watch(x) cout << #x << " is " << x << endl; #define print(a, l, r) \ for (int i = l; i < r; i++) \ cout << a[i] << (i == (r - 1) ? endl :...
#include <bits/stdc++.h> using namespace std; #define endl "\n" #define watch(x) cout << #x << " is " << x << endl; #define print(a, l, r) \ for (int i = l; i < r; i++) \ cout << a[i] << (i == (r - 1) ? endl :...
[["+", 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], ["+", 12, 2, 3, 4, 0, 2, 63, 118, 28, 22]]
1
206
#include <bits/stdc++.h> using namespace std; /* data type, special numbers, defines */ //#define int ll //use if ded #define ll long long #define ld long double const ll inf = LLONG_MAX; // const ll mod=1e9+7; const ll mod = 998244353; const ld pi = acos(-1.0); #define all(v) v.begin(), v.end() /* end data type and s...
#include <bits/stdc++.h> using namespace std; /* data type, special numbers, defines */ //#define int ll //use if ded #define ll long long #define ld long double const ll inf = LLONG_MAX; // const ll mod=1e9+7; const ll mod = 998244353; const ld pi = acos(-1.0); #define all(v) v.begin(), v.end() /* end data type and s...
[["-", 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
907
#include <bits/stdc++.h> #include <math.h> #include <tuple> #include <unordered_map> #include <unordered_set> #define io \ ios::sync_with_stdio(0); \ cin.tie(0); ...
#include <bits/stdc++.h> #include <math.h> #include <tuple> #include <unordered_map> #include <unordered_set> #define io \ ios::sync_with_stdio(0); \ cin.tie(0); ...
[["+", 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], ["+", 12, 2, 3, 4, 0, 2, 63, 118, 28, 22]]
1
4,054
#include <bits/stdc++.h> using namespace std; bool isPalindrome(const string &A) { string B = A; reverse(B.begin(), B.end()); return A == B; } int main() { string S; cin >> S; int N = S.length(); string A = S.substr(0, (N - 1) / 2); string B = S.substr((N - 1) / 2 + 1); if (isPalindrome(A) && isPa...
#include <bits/stdc++.h> using namespace std; bool isPalindrome(const string &A) { string B = A; reverse(B.begin(), B.end()); return A == B; } int main() { string S; cin >> S; int N = S.length(); string A = S.substr(0, (N - 1) / 2); string B = S.substr((N - 1) / 2 + 1); if (isPalindrome(S) && isPa...
[["+", 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
135
def palindrome(s): return s == s[::-1] def judge(s): return palindrome(s) and palindrome(s[0:len(s)-1//2]) and palindrome(s[len(s)-1//2:]) S = input() print('Yes' if judge(S) else 'No')
def palindrome(s): return s == s[::-1] def judge(s): return palindrome(s) and palindrome(s[0:(len(s)-1)//2]) and palindrome(s[(len(s)-1)//2+1:]) S = input() print('Yes' if judge(S) else 'No')
[["+", 0, 206, 206, 663, 0, 657, 31, 23, 0, 24], ["+", 0, 206, 206, 663, 0, 657, 31, 23, 0, 25], ["+", 206, 663, 0, 657, 31, 657, 31, 23, 0, 24], ["+", 206, 663, 0, 657, 31, 657, 31, 23, 0, 25], ["+", 3, 4, 0, 206, 206, 663, 0, 657, 17, 72], ["+", 3, 4, 0, 206, 206, 663, 0, 657, 12, 612]]
5
80
#include <bits/stdc++.h> #define int long long int #define inf 100000000000 #define hell (int)(998244353) using namespace std; bool ispal(string s) { string s1 = s; reverse(begin(s1), end(s1)); return s == s1; } void solve() { string s; cin >> s; int l = s.length(); if (ispal(s.substr(0, l / 2)) && isp...
#include <bits/stdc++.h> #define int long long int #define inf 100000000000 #define hell (int)(998244353) using namespace std; bool ispal(string s) { string s1 = s; reverse(begin(s1), end(s1)); return s == s1; } void solve() { string s; cin >> s; int l = s.length(); if (ispal(s) && ispal(s.substr(0, l ...
[["+", 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], ["+", 12, 2, 3, 4, 0, 2, 63, 118, 28, 22]]
1
160
// " --- IN THE NAME OF ALLAH --- " // ;) // ------------sphr_agz------------ // ;) //#pragma GCC optimize("Ofast,no-stack-protector,unroll-loops") //#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native") //#include <ext/pb_ds/assoc_container.hpp> //#include <ext/pb_ds/tree_policy.hpp> #include ...
// " --- IN THE NAME OF ALLAH --- " // ;) // ------------sphr_agz------------ // ;) //#pragma GCC optimize("Ofast,no-stack-protector,unroll-loops") //#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native") //#include <ext/pb_ds/assoc_container.hpp> //#include <ext/pb_ds/tree_policy.hpp> #include ...
[["-", 64, 37, 0, 34, 31, 16, 12, 5, 0, 6], ["+", 64, 37, 0, 34, 31, 16, 12, 5, 0, 6], ["-", 8, 9, 0, 1, 0, 16, 12, 5, 0, 6], ["+", 8, 9, 0, 1, 0, 16, 12, 5, 0, 6]]
1
287
#include <bits/stdc++.h> using namespace std; using ll = long long int; string text; string t1, t2; bool ispalin(string a) { int n = a.size(); for (int i = 0; i < n / 2; i++) { if (a[i] != a[n - i - 1]) return false; } return true; } int main() { cin >> text; bool ans = true; int n = text.size...
#include <bits/stdc++.h> using namespace std; using ll = long long int; string text; string t1, t2; bool ispalin(string a) { int n = a.size(); for (int i = 0; i < n / 2; i++) { if (a[i] != a[n - i - 1]) return false; } return true; } int main() { cin >> text; bool ans = true; int n = text.size...
[["+", 0, 9, 0, 57, 15, 339, 51, 16, 17, 354], ["+", 0, 57, 15, 339, 51, 16, 12, 91, 17, 111], ["+", 15, 339, 51, 16, 12, 91, 28, 2, 63, 22], ["+", 51, 16, 12, 91, 28, 2, 3, 4, 0, 24], ["+", 51, 16, 12, 91, 28, 2, 3, 4, 0, 22], ["+", 51, 16, 12, 91, 28, 2, 3, 4, 0, 25]]
1
214
#include <algorithm> #include <array> #include <bitset> #include <cassert> #include <cmath> #include <complex> #include <functional> #include <iomanip> #include <iostream> #include <list> #include <map> #include <memory> #include <numeric> #include <queue> #include <random> #include <set> #include <stack> #include <str...
#include <algorithm> #include <array> #include <bitset> #include <cassert> #include <cmath> #include <complex> #include <functional> #include <iomanip> #include <iostream> #include <list> #include <map> #include <memory> #include <numeric> #include <queue> #include <random> #include <set> #include <stack> #include <str...
[["-", 31, 16, 12, 23, 0, 41, 75, 5, 0, 6], ["+", 31, 16, 12, 23, 0, 41, 75, 5, 0, 6]]
1
899
// Catchharsh #include <bits/stdc++.h> #define ll long long int #define ld long double #define IOS \ ios_base::sync_with_stdio(false); \ cin.tie(NULL); ...
// Catchharsh #include <bits/stdc++.h> #define ll long long int #define ld long double #define IOS \ ios_base::sync_with_stdio(false); \ cin.tie(NULL); ...
[["+", 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
304
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<ll, ll> P; #define DUMP(x) cout << #x << " = " << (x) << endl; #define FOR(i, m, n) for (ll i = m; i < n; i++) #define IFOR(i, m, n) for (ll i = n - 1; i >= m; i--) #define REP(i, n) FOR(i, 0, n) #define IREP(i, n) IFOR(i, 0, n) #define FO...
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<ll, ll> P; #define DUMP(x) cout << #x << " = " << (x) << endl; #define FOR(i, m, n) for (ll i = m; i < n; i++) #define IFOR(i, m, n) for (ll i = n - 1; i >= m; i--) #define REP(i, n) FOR(i, 0, n) #define IREP(i, n) IFOR(i, 0, n) #define FO...
[["+", 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], ["+", 12, 2, 3, 4, 0, 2, 63, 118, 28, 22]]
1
223
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<ll, ll> pll; typedef pair<int, int> pii; #define fi first #define se second #define endl '\n' #define y1 holyshit const int inf = 0x3f3f3f3f; string str; bool chk(int l, int r) { while (l <= r) { if (str[l] != str[r]) return ...
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<ll, ll> pll; typedef pair<int, int> pii; #define fi first #define se second #define endl '\n' #define y1 holyshit const int inf = 0x3f3f3f3f; string str; bool chk(int l, int r) { while (l <= r) { if (str[l] != str[r]) return ...
[["-", 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
185
#include <memory.h> #include <algorithm> #include <bitset> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <deque> #include <iomanip> #include <iostream> #include <list> #include <map> #include <numeric> #include <queue> #include <set> #include <sstream> #include <stack> #include <uti...
#include <memory.h> #include <algorithm> #include <bitset> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <deque> #include <iomanip> #include <iostream> #include <list> #include <map> #include <numeric> #include <queue> #include <set> #include <sstream> #include <stack> #include <uti...
[["+", 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
188
def isparin(t): #print(t) M=len(t) for i in range(M): if t[i]!=t[M-1-i]: return False return True S=input() N=len(S) res=isparin(S[:(N-1)//2]) and isparin(S[(N+1)//2:]) print("Yes" if res else "No")
def isparin(t): #print(t) M=len(t) for i in range(M): if t[i]!=t[M-1-i]: return False return True S=input() N=len(S) res=isparin(S) and isparin(S[:(N-1)//2]) and isparin(S[(N+1)//2:]) print("Yes" if res else "No")
[["+", 12, 679, 31, 679, 31, 652, 3, 4, 0, 25], ["+", 0, 1, 0, 662, 12, 679, 31, 679, 17, 355], ["+", 0, 662, 12, 679, 31, 679, 12, 652, 63, 22], ["+", 12, 679, 31, 679, 12, 652, 3, 4, 0, 24], ["+", 31, 679, 12, 652, 3, 4, 0, 206, 51, 22]]
5
94
import java.io.*; import java.util.*; public class Main { public static boolean isP(String s) { int i = 0, j = s.length() - 1; while (i < j) { if (s.charAt(i) != s.charAt(j)) return false; i++; j--; } return true; } public static void main(String[] args) throws Except...
import java.io.*; import java.util.*; public class Main { public static boolean isP(String s) { int i = 0, j = s.length() - 1; while (i < j) { if (s.charAt(i) != s.charAt(j)) return false; i++; j--; } return true; } public static void main(String[] args) throws Except...
[["-", 0, 492, 3, 4, 0, 510, 64, 5, 0, 491], ["+", 0, 492, 3, 4, 0, 510, 64, 5, 0, 491], ["-", 0, 492, 3, 4, 0, 510, 75, 5, 0, 491], ["+", 0, 492, 3, 4, 0, 510, 75, 5, 0, 491]]
3
395
#define _CRT_SECURE_NO_WARNINGS #pragma comment(linker, "/stack:512000000") #include <algorithm> #include <array> #include <bitset> #include <cassert> #include <ccomplex> #include <climits> #include <cmath> #include <cstdio> #include <cstring> #include <ctime> #include <deque> #include <fstream> #include <functional> #...
#define _CRT_SECURE_NO_WARNINGS #pragma comment(linker, "/stack:512000000") #include <algorithm> #include <array> #include <bitset> #include <cassert> #include <ccomplex> #include <climits> #include <cmath> #include <cstdio> #include <cstring> #include <ctime> #include <deque> #include <fstream> #include <functional> #...
[["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 355], ["+", 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
464
s = input() n = len(s) t = s[:(n - 1) // 2] u = s[(n + 3) // 2 - 1:] print(t, u) if s == s[::-1] and t == t[::-1] and u == u[::-1]: print('Yes') else: print('No')
s = input() n = len(s) t = s[:(n - 1) // 2] u = s[(n + 3) // 2 - 1:] if s == s[::-1] and t == t[::-1] and u == u[::-1]: 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
90
#include <bits/stdc++.h> #include <iostream> using namespace std; string s, t, u; int n; int f(string tt) { string ss = tt; reverse(ss.begin(), ss.end()); for (int i = 0; i < tt.size(); i++) { if (tt[i] != ss[i]) return 0; } return 1; } int main(void) { cin >> s; n = s.size(); t = s.substr(0, ...
#include <bits/stdc++.h> #include <iostream> using namespace std; string s, t, u; int n; int f(string tt) { string ss = tt; reverse(ss.begin(), ss.end()); for (int i = 0; i < tt.size(); i++) { if (tt[i] != ss[i]) return 0; } return 1; } int main(void) { cin >> s; n = s.size(); t = s.substr(0, ...
[["+", 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
169
/*input atcoder */ #include <bits/stdc++.h> #define ll long long using namespace std; bool check(string s) { int i, n = s.size(); for (i = 0; i < n / 2; i++) { if (s[i] != s[n - 1 - i]) return false; } return true; } void run() { string s; cin >> s; int n = s.size(); // cout << s.substr(0,...
/*input dedaded */ #include <bits/stdc++.h> #define ll long long using namespace std; bool check(string s) { int i, n = s.size(); for (i = 0; i < n / 2; i++) { if (s[i] != s[n - 1 - i]) return false; } return true; } void run() { string s; cin >> s; int n = s.size(); // cout << s.substr(0,...
[["+", 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], ["+", 12, 2, 3, 4, 0, 2, 63, 118, 28, 22]]
1
184
#include <bits/stdc++.h> using namespace std; #define fi first #define se second #define mp make_pair #define pb push_back #define all(x) (x).begin(), (x).end() #define MOD 1000000007 typedef long long ll; typedef pair<int, int> ii; typedef pair<ll, ll> pll; typedef vector<int> vi; typedef vector<ll> vll; typedef lo...
#include <bits/stdc++.h> using namespace std; #define fi first #define se second #define mp make_pair #define pb push_back #define all(x) (x).begin(), (x).end() #define MOD 1000000007 typedef long long ll; typedef pair<int, int> ii; typedef pair<ll, ll> pll; typedef vector<int> vi; typedef vector<ll> vll; typedef lo...
[["-", 8, 9, 0, 57, 15, 339, 51, 16, 12, 13], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 12, 13]]
1
249
#include <bits/stdc++.h> using namespace std; #define ll long long #define ld long double #define db double #define str string #define pb push_back #define nl '\n' #define X first #define Y second #define nimble \ ios::sync_with_stdio(0); ...
#include <bits/stdc++.h> using namespace std; #define ll long long #define ld long double #define db double #define str string #define pb push_back #define nl '\n' #define X first #define Y second #define nimble \ ios::sync_with_stdio(0); ...
[["-", 49, 50, 51, 2, 3, 4, 0, 16, 17, 72], ["-", 49, 50, 51, 2, 3, 4, 0, 16, 12, 13]]
1
401
#include <bits/stdc++.h> #define sci(a) scanf("%d", &a) #define scii(a, b) scanf("%d %d", &a, &b) #define pri(a) printf("%d ", a) #define pril(a) printf("%d\n", a) #define fto(i, a, b) for (int i = a; i <= b; ++i) #define fdto(i, a, b) for (int i = a; i >= b; --i) #define pb(a) push_back(a) #define ll long long #define...
#include <bits/stdc++.h> #define sci(a) scanf("%d", &a) #define scii(a, b) scanf("%d %d", &a, &b) #define pri(a) printf("%d ", a) #define pril(a) printf("%d\n", a) #define fto(i, a, b) for (int i = a; i <= b; ++i) #define fdto(i, a, b) for (int i = a; i >= b; --i) #define pb(a) push_back(a) #define ll long long #define...
[["-", 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
#include <bits/stdc++.h> #define ull unsigned long long #define ll long long #define pb push_back #define endl '\n' #define mod 1000000007 #define mod1 1000000009 #define line cout << "----------------------" << endl #define mp make_pair #define fast \ ...
#include <bits/stdc++.h> #define ull unsigned long long #define ll long long #define pb push_back #define endl '\n' #define mod 1000000007 #define mod1 1000000009 #define line cout << "----------------------" << endl #define mp make_pair #define fast \ ...
[["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6]]
1
231
#include <bits/stdc++.h> using namespace std; #define int long long int f(string s) { string t = s; reverse(t.begin(), t.end()); return (t == s); } signed main() { string s; cin >> s; int n = s.size(); string t1 = s.substr(0, (n - 1) / 2); string t2 = s.substr((n + 3) / 2 - 1); // cout<<t1<<" "<<t2; ...
#include <bits/stdc++.h> using namespace std; #define int long long int f(string s) { string t = s; reverse(t.begin(), t.end()); return (t == s); } signed main() { string s; cin >> s; int n = s.size(); string t1 = s.substr(0, (n - 1) / 2); string t2 = s.substr((n + 3) / 2 - 1); // cout<<t1<<" "<<t2; ...
[["+", 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
131
#include <bits/stdc++.h> using namespace std; typedef long long ll; const int N = 1e6 + 10; const ll MOD = 1e9 + 7; char a[N]; bool q(int x, int y) { while (x <= y) { if (a[x] != a[y]) return false; x++; y--; } return true; } int main() { scanf("%s", a + 1); int len = strlen(a); int mi...
#include <bits/stdc++.h> using namespace std; typedef long long ll; const int N = 1e6 + 10; const ll MOD = 1e9 + 7; char a[N]; bool q(int x, int y) { while (x <= y) { if (a[x] != a[y]) return false; x++; y--; } return true; } int main() { scanf("%s", a + 1); int len = strlen(a + 1); in...
[["+", 49, 50, 51, 2, 3, 4, 0, 16, 17, 72], ["+", 49, 50, 51, 2, 3, 4, 0, 16, 12, 13]]
1
163
#include <bits/stdc++.h> using namespace std; int main() { string s, a, b, x, y; cin >> s; a = s.substr(0, (s.size() - 1) / 2); b = s.substr((s.size() + 1) / 2, (s.size() - 1) / 2); x = a; y = b; sort(x.begin(), x.end()); sort(y.begin(), y.end()); if (a == x && b == y && a == b) cout << "Yes" << e...
#include <bits/stdc++.h> using namespace std; int main() { string s, a, b, x, y; cin >> s; a = s.substr(0, (s.size() - 1) / 2); b = s.substr((s.size() + 1) / 2, (s.size() - 1) / 2); x = a; y = b; reverse(x.begin(), x.end()); reverse(y.begin(), y.end()); if (a == x && b == y && a == b) cout << "Yes...
[["-", 0, 14, 8, 9, 0, 1, 0, 2, 63, 22], ["+", 0, 14, 8, 9, 0, 1, 0, 2, 63, 22]]
1
148
#include <bits/stdc++.h> #define tm tm228 #define hash hash228 #define matr vector<vector<int>> #define int long long #define pii pair<int, int> #define tri pair<pair<int, int>, int> #define all(v) v.begin(), v.end() #define endl "\n" using namespace std; void solve() { string s, tmp; cin >> s; tmp = s; reve...
#include <bits/stdc++.h> #define tm tm228 #define hash hash228 #define matr vector<vector<int>> #define int long long #define pii pair<int, int> #define tri pair<pair<int, int>, int> #define all(v) v.begin(), v.end() #define endl "\n" using namespace std; void solve() { string s, tmp; cin >> s; tmp = s; reve...
[["-", 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
227
#include <bits/stdc++.h> #define sc second #define fr first #define ll long long #define pi pair<int, int> #define ppi pair<pi, pi> #define mp make_pair using namespace std; string s; bool ispal(int i, int j) { while (i < j) { if (s[i] != s[j]) return 0; i++, j--; } return 1; } int main() { io...
#include <bits/stdc++.h> #define sc second #define fr first #define ll long long #define pi pair<int, int> #define ppi pair<pi, pi> #define mp make_pair using namespace std; string s; bool ispal(int i, int j) { while (i < j) { if (s[i] != s[j]) return 0; i++, j--; } return 1; } int main() { io...
[["-", 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
171
/*input atcoder */ #include <bits/stdc++.h> using namespace std; #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace __gnu_pbds; typedef tree<long long, null_type, less_equal<long long>, rb_tree_tag, tree_order_statistics_node_update> indexed_set; #pragma GCC o...
/*input atcoder */ #include <bits/stdc++.h> using namespace std; #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace __gnu_pbds; typedef tree<long long, null_type, less_equal<long long>, rb_tree_tag, tree_order_statistics_node_update> indexed_set; #pragma GCC o...
[["+", 51, 16, 31, 16, 31, 2, 3, 4, 0, 25], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 17, 355], ["+", 15, 339, 51, 16, 31, 16, 12, 2, 63, 22], ["+", 51, 16, 31, 16, 12, 2, 3, 4, 0, 24], ["+", 12, 2, 3, 4, 0, 2, 63, 118, 28, 22]]
1
434
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef vector<ll> vll; typedef vector<vll> vvll; typedef pair<ll, ll> pll; const ll N = 200001; const ll MOD = 1000000007; const ll INF = LLONG_MAX; #define all(a) a.begin(), a.end() #define rall(a) a.rbegin(), a.rend() #define pb push_back #define...
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef vector<ll> vll; typedef vector<vll> vvll; typedef pair<ll, ll> pll; const ll N = 200001; const ll MOD = 1000000007; const ll INF = LLONG_MAX; #define all(a) a.begin(), a.end() #define rall(a) a.rbegin(), a.rend() #define pb push_back #define...
[["+", 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
289
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace std; using namespace __gnu_pbds; #define ll long long #define uint unsigned int #define ull unsigned long long #define pb push_back #define mk make_pair #define ins insert #define all(x) (x).begin(),...
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace std; using namespace __gnu_pbds; #define ll long long #define uint unsigned int #define ull unsigned long long #define pb push_back #define mk make_pair #define ins insert #define all(x) (x).begin(),...
[["+", 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
289
def kai(s): n = len(s) for i in range(n): if s[i]!=s[n-i-1]: return False else: return True s = input() n = len(s) if kai(s) and kai(s[:(n-1)//2]) and kai(s[(n+3)//2:]): print('Yes') else: print('No')
def kai(s): n = len(s) for i in range(n): if s[i]!=s[n-i-1]: return False else: return True s = input() n = len(s) if kai(s) and kai(s[:(n-1)//2]) and kai(s[(n+1)//2]): print('Yes') else: print('No')
[["-", 206, 663, 0, 657, 31, 23, 0, 657, 12, 612], ["+", 0, 206, 206, 657, 31, 23, 0, 657, 12, 612], ["-", 12, 652, 3, 4, 0, 206, 206, 663, 0, 102]]
5
102
S = input() N = len(S) def p(T): for i in range(len(T)): if T[i] != T[-i-1]: return False return True if p(S[:(N-1)//2]) and p(S[(N+3)//2-1:]): print("Yes") else: print("No")
S = input() N = len(S) def p(T): for i in range(len(T)): if T[i] != T[-i-1]: return False return True if p(S) and p(S[:(N-1)//2]) and p(S[(N+3)//2-1:]): 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
93
#include <bits/stdc++.h> using namespace std; bool isP(string s) { string t = s; reverse(t.begin(), t.end()); return s == t; } int main() { string s; cin >> s; int n = s.size(); int i = (n - 1) / 2; int j = (n + 3) / 2 - 1; bool Ok = isP(s.substr(0, i)) && isP(s.substr(j, n - j)); puts(Ok ? "...
#include <bits/stdc++.h> using namespace std; bool isP(string s) { string t = s; reverse(t.begin(), t.end()); return s == t; } int main() { string s; cin >> s; int n = s.size(); int i = (n - 1) / 2; int j = (n + 3) / 2 - 1; bool Ok = isP(s) && isP(s.substr(0, i)) && isP(s.substr(j, n - j)); p...
[["+", 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], ["+", 12, 2, 3, 4, 0, 2, 63, 118, 28, 22]]
1
127
#include <bits/stdc++.h> using namespace std; using ll = long long; int main() { ll a; cout << fixed << setprecision(16); double b = a / 3.0; cout << b * b * b << endl; }
#include <bits/stdc++.h> using namespace std; using ll = long long; int main() { ll a; cin >> a; cout << fixed << setprecision(16); double b = a / 3.0; cout << b * b * b << endl; }
[["+", 0, 14, 8, 9, 0, 1, 0, 16, 31, 22], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 17, 152], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 12, 22], ["+", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35]]
1
47
#include <bits/stdc++.h> using namespace std; using ll = long long; int main() { double a; cout << fixed << setprecision(16); double b = a / 3; cout << b * b * b << endl; }
#include <bits/stdc++.h> using namespace std; using ll = long long; int main() { double a; cin >> a; cout << fixed << setprecision(16); double b = a / 3; cout << b * b * b << endl; }
[["+", 0, 14, 8, 9, 0, 1, 0, 16, 31, 22], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 17, 152], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 12, 22], ["+", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35]]
1
47
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < n; i++) using namespace std; using ll = long long; using P = pair<int, int>; int main() { int L; cin >> L; double volum = 0; volum = L / 3 * L / 3 * L / 3; printf("%.7f\n", volum); return 0; }
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < n; i++) using namespace std; using ll = long long; using P = pair<int, int>; int main() { double L; cin >> L; double volum = 0; volum = L / 3 * L / 3 * L / 3; printf("%.7f\n", volum); return 0; }
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40]]
1
75
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); i++) using namespace std; using ll = long long; using P = pair<int, int>; const int MAX = 1000; const int INF = 1e9; const int dx[] = {-1, 0, 1, 0}; const int dy[] = {0, -1, 0, 1}; #define PI 3.14159265358979323846264338327950L // setprecision(15) int...
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); i++) using namespace std; using ll = long long; using P = pair<int, int>; const int MAX = 1000; const int INF = 1e9; const int dx[] = {-1, 0, 1, 0}; const int dy[] = {0, -1, 0, 1}; #define PI 3.14159265358979323846264338327950L // setprecision(15) int...
[["+", 0, 43, 49, 50, 51, 16, 12, 74, 0, 24], ["+", 49, 50, 51, 16, 12, 74, 39, 77, 39, 40], ["+", 0, 43, 49, 50, 51, 16, 12, 74, 0, 25]]
1
113
#include <bits/stdc++.h> using namespace std; int main() { int l; cin >> l; cout << fixed << setprecision(100) << (long double)(l * l * l / 27) << endl; }
#include <bits/stdc++.h> using namespace std; int main() { int l; cin >> l; cout << fixed << setprecision(100) << (long double)(l * l * l / 27.0) << endl; }
[["-", 31, 16, 12, 74, 51, 23, 0, 16, 12, 13], ["+", 31, 16, 12, 74, 51, 23, 0, 16, 12, 13]]
1
44
/* author : nishi5451 created : 14.08.2020 21:36:40 */ #include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < n; i++) typedef long long ll; int main() { int l; cin >> l; double a = l / 3.0; printf("%12.lf\n", a * a * a); return 0; }
/* author : nishi5451 created : 14.08.2020 21:36:40 */ #include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < n; i++) typedef long long ll; int main() { int l; cin >> l; double a = l / 3.0; printf("%.12lf\n", a * a * a); return 0; }
[["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]]
1
57
print((int(input))**3/27)
print(int(input())**3/27)
[["-", 3, 4, 0, 657, 31, 657, 31, 23, 0, 24], ["+", 31, 652, 3, 4, 0, 652, 3, 4, 0, 24]]
5
13
L = int(input()) A = int(L/3) B = int((L-A)/2) C = L - A - B print(A * B * C)
L = int(input()) A = L/3 B = (L-A)/2 C = L - A - B print(A * B * C)
[["-", 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]]
5
43
#include <bits/stdc++.h> using namespace std; #pragma GCC optimize("O3") #pragma GCC optimize("unroll-loops") #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> #define int long long #define fr(i, a, b) for (int i = a; i <= b; ++i) #define rep(i, a, b) for (int i = a; i < (b); ++i) #define tr...
#include <bits/stdc++.h> using namespace std; #pragma GCC optimize("O3") #pragma GCC optimize("unroll-loops") #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> #define int long long #define fr(i, a, b) for (int i = a; i <= b; ++i) #define rep(i, a, b) for (int i = a; i < (b); ++i) #define tr...
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 78]]
1
420
#include <bits/stdc++.h> using namespace std; int main() { int l; cin >> l; long long V27 = l * l * l; double v = V27 / 27; printf("%.10lf", v); }
#include <bits/stdc++.h> using namespace std; int main() { int l; cin >> l; long long V27 = l * l * l; double v = V27 / 27.0; printf("%.10lf", v); }
[["-", 8, 9, 0, 43, 49, 50, 51, 16, 12, 13], ["+", 8, 9, 0, 43, 49, 50, 51, 16, 12, 13]]
1
45
n=gets.to_i puts format("%.12f",((n**3)/27))
n=gets.to_f puts format("%.12f",((n**3)/27))
[["-", 36, 36, 0, 493, 0, 662, 12, 652, 735, 22], ["+", 36, 36, 0, 493, 0, 662, 12, 652, 735, 22]]
4
22
#include <bits/stdc++.h> using namespace std; typedef long long lol; //マクロ // forループ関係 //引数は、(ループ内変数,動く範囲)か(ループ内変数,始めの数,終わりの数)、のどちらか // Dがついてないものはループ変数は1ずつインクリメントされ、Dがついてるものはループ変数は1ずつデクリメントされる #define REP(i, n) for (lol i = 0; i < lol(n); i++) #define REPD(i, n) for (lol i = n - 1; i >= 0; i--) #define FOR(i, a, b) fo...
#include <bits/stdc++.h> using namespace std; typedef long long lol; //マクロ // forループ関係 //引数は、(ループ内変数,動く範囲)か(ループ内変数,始めの数,終わりの数)、のどちらか // Dがついてないものはループ変数は1ずつインクリメントされ、Dがついてるものはループ変数は1ずつデクリメントされる #define REP(i, n) for (lol i = 0; i < lol(n); i++) #define REPD(i, n) for (lol i = n - 1; i >= 0; i--) #define FOR(i, a, b) fo...
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 78], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40]]
1
231
print((int(input())/12)**3)
print((int(input())/3)**3)
[["-", 3, 4, 0, 657, 31, 23, 0, 657, 12, 612], ["+", 3, 4, 0, 657, 31, 23, 0, 657, 12, 612]]
5
15
L = input() returnVal = (L/3)**3 print(returnVal)
L = float(input()) returnVal = (L/3)**3 print(returnVal)
[["+", 0, 656, 0, 1, 0, 662, 12, 652, 63, 22], ["+", 0, 1, 0, 662, 12, 652, 3, 4, 0, 24], ["+", 12, 652, 3, 4, 0, 652, 3, 4, 0, 25]]
5
18
//インクルード(アルファベット順) #include <algorithm> //sort,二分探索,など #include <bitset> //固定長bit集合 #include <chrono> //実行時間計測 #include <cmath> //pow,logなど #include <complex> //複素数 #include <deque> //両端アクセスのキュー #include <functional> //sortのgreater #include <iomanip> //setprecision(浮動小数点...
//インクルード(アルファベット順) #include <algorithm> //sort,二分探索,など #include <bitset> //固定長bit集合 #include <chrono> //実行時間計測 #include <cmath> //pow,logなど #include <complex> //複素数 #include <deque> //両端アクセスのキュー #include <functional> //sortのgreater #include <iomanip> //setprecision(浮動小数点...
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 1, 0, 11, 12, 16, 31, 23, 0, 24], ["+", 0, 1, 0, 11, 12, 16, 31, 23, 0, 25], ["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]]
1
487
/* h s, d't skp th si tll i's sved * ABC141 E * ABC145 D * ABC147 F * ABC174 F */ #include <bits/stdc++.h> #define ll long long #define mod 1000000007 using namespace std; int main() { std::cout << std::setprecision(5); cout << std::fixed; ll mx = 0; ll l; cin >> l; double ans = (double)l / 3; ans = (...
/* h s, d't skp th si tll i's sved * ABC141 E * ABC145 D * ABC147 F * ABC174 F */ #include <bits/stdc++.h> #define ll long long #define mod 1000000007 using namespace std; int main() { std::cout << std::setprecision(6); cout << std::fixed; ll mx = 0; ll l; cin >> l; double ans = (double)l / 3; ans = (...
[["-", 0, 1, 0, 16, 12, 2, 3, 4, 0, 13], ["+", 0, 1, 0, 16, 12, 2, 3, 4, 0, 13]]
1
74
L = int(input()) print((L//3)**3)
L = int(input()) print((L/3)**3)
[["-", 3, 4, 0, 657, 31, 23, 0, 657, 17, 676], ["+", 3, 4, 0, 657, 31, 23, 0, 657, 17, 85]]
5
18
L = int(input()) a = L // 3 b = L // 3 c = L - a - b print(a * b * c)
L = int(input()) a = L / 3 b = L / 3 c = L - a - b print(a * b * c)
[["-", 0, 656, 0, 1, 0, 662, 12, 657, 17, 676], ["+", 0, 656, 0, 1, 0, 662, 12, 657, 17, 85]]
5
33
#include <bits/stdc++.h> using namespace std; using ll = long long; using ld = long double; using ull = unsigned long long; using uint = unsigned; using pcc = pair<char, char>; using pii = pair<int, int>; using pll = pair<ll, ll>; using pdd = pair<double, double>; using tuplis = array<ll, 3>; template <class T> using p...
#include <bits/stdc++.h> using namespace std; using ll = long long; using ld = long double; using ull = unsigned long long; using uint = unsigned; using pcc = pair<char, char>; using pii = pair<int, int>; using pll = pair<ll, ll>; using pdd = pair<double, double>; using tuplis = array<ll, 3>; template <class T> using p...
[["-", 0, 14, 8, 9, 0, 1, 0, 2, 63, 22], ["+", 0, 14, 8, 9, 0, 1, 0, 2, 63, 22]]
1
3,135
#include <math.h> #include <stdio.h> int main(void) { int L; scanf("%d", &L); printf("%f\n", pow(L / 3, 3)); return 0; }
#include <math.h> #include <stdio.h> int main(void) { double L; scanf("%lf", &L); printf("%f\n", pow(L / 3.0, 3)); return 0; }
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["-", 3, 4, 0, 2, 3, 4, 0, 16, 12, 13], ["+", 3, 4, 0, 2, 3, 4, 0, 16, 12, 13]]
0
44