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
- signed main()
- {
- _FastIO;
- /*
- // A
- string a , b;
- cin >> a >> b;
- int cnt = 0;
- for(int i = 0; i < a.size(); i++){
- if(a[i] != b[i])
- cnt++;
- }
- cout << cnt << '\n';
- */
- /*
- // B
- int n;
- cin >> n;
- int a[n + 5];
- for(int i = 1; i <= n; i++){
- cin >> a[i];
- }
- int cnt = 0;
- for(int i = 1; i <= n; i += 2){ // tek indexler
- if(a[i] % 2)
- cnt++;
- }
- cout << cnt << '\n';
- */
- /*
- // C
- int n;
- cin >> n;
- int a[n + 5];
- for(int i = 0; i < n; i++){
- cin >> a[i];
- }
- sort(a , a + n);
- for(int i = 1; i < n; i++){
- if(a[i] > a[i - 1] + 1)
- cout << a[i] - 1 << '\n';
- }
- */
- /*
- // D
- int n;
- cin >> n;
- int a[n + 5];
- for(int i = 0; i < n; i++)
- cin >> a[i];
- cout << a[0] << " ";
- for(int i = 1; i < n; i++){
- cout << a[i] - a[i - 1] << " ";
- }
- */
- /*
- string s;
- map<string , bool> used;
- for(int i = 0; i < 3; i++){
- cin >> s;
- used[s] = 1;
- }
- string a[] = {"ABC" , "ARC" , "AGC" , "AHC"};
- for(int i = 0; i < 4; i++){
- if(!used[a[i]])
- cout << a[i] << '\n';
- }*/
- /*
- // F
- int n , k;
- cin >> n >> k;
- int a[n + 5];
- for(int i = 0; i < n; i++){
- cin >> a[i];
- }
- sort(a , a + n);
- int sum = 0;
- for(int i = 0; i < k; i++){
- sum += a[i];
- }
- cout << sum << '\n';
- */
- /*
- // F
- int n , k;
- cin >> n >> k;
- vector<int> a(n);
- for(int& i : a)
- cin >> i;
- sort(a.begin() , a.end());
- cout << accumulate(a.begin() , a.begin() + k , 0ll);
- */
- /*
- // G
- // k >= s.size() s
- // k < s.size() s.substr(0 , k)...
- int k;
- cin >> k;
- string s;
- cin >> s;
- int n = s.size();
- cout << s.substr(0 , k);
- if(k < n)
- cout << "...";
- */
- /*
- map<char , int> m;
- m['A'] = 0;
- m['B'] = 3;
- m['C'] = 4;
- m['D'] = 8;
- m['E'] = 9;
- m['F'] = 14;
- m['G'] = 23;
- char a , b;
- cin >> a >> b;
- cout << abs(m[a] - m[b]) << '\n';
- */
- // 1 <= i <= n
- //sort(a + 1 , a + n + 1)
- /*
- // I
- int l , r;
- cin >> l >> r;
- string s;
- cin >> s;
- reverse(s.begin() + l, s.begin() + r);
- cout << s << '\n';
- */
- /*
- // J
- string a , b;
- cin >> a >> b;
- if(b.substr(0 , a.size()) == a)
- cout << "Yes";
- else
- cout << "No";
- */
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement