Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #pragma GCC optimize("O3")
- #include <bits/stdc++.h>
- using namespace std;
- #define int long long
- #define double long double
- #define _FastIO ios_base::sync_with_stdio(0); cin.tie(0)
- #define F first
- #define S second
- const int mod = 998244353; // 1e9 + 7
- bool pal(string a){
- string b = a;
- reverse(a.begin() , a.end());
- return a == b;
- }
- signed main()
- {
- _FastIO;
- /*
- // H
- int n;
- cin >> n;
- int a[n + 5];
- int x = 0 , y = 0 , s = 0;
- for(int i = 0; i < n; i++){
- cin >> a[i];
- s += a[i];
- }
- int ans = LLONG_MAX;
- for(int i = 0; i + 1 < n; i++){
- x += a[i];
- y = s - x;
- ans = min(ans , abs(x - y));
- }
- cout << ans << '\n';
- */
- /*
- // I
- string s;
- cin >> s;
- int n = s.size();
- string x = s.substr(0 , n / 2);
- string y = s.substr((n + 1) / 2);
- if(pal(s) && pal(x) && pal(y))
- cout << "Yes";
- else
- cout << "No";
- */
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement