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 , x , cnt = 0;
- cin >> n;
- for(int i = 1; i <= n; i++){
- cin >> x;
- if(i % 2 && x % 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] << " ";
- }
- cout << '\n';
- */
- /*
- // E
- string a[3];
- set<string> s;
- for(int i = 0; i < 3; i++){
- cin >> a[i];
- s.insert(a[i]);
- }
- vector<string> v = {"ABC", "ARC", "AGC", "AHC"};
- for(string i : v){
- if(!s.count(i))
- cout << 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';
- */
- /*
- map<char , int> cnt;
- cnt['A'] = 0;
- cnt['B'] = 3;
- cnt['C'] = 4;
- cnt['D'] = 8;
- cnt['E'] = 9;
- cnt['F'] = 14;
- cnt['G'] = 23;
- char a , b;
- cin >> a >> b;
- cout << abs(cnt[a] - cnt[b]) << '\n';
- */
- /*
- // I
- int l , r;
- cin >> l >> r;
- l--; r--;
- string s;
- cin >> s;
- reverse(s.begin() + l , s.begin() + r + 1);
- 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