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
- int n;
- cin >> n;
- int x = n / 10;
- if(n < 0 && n % 10)
- x--;
- cout << x << '\n';
- */
- /*
- // B
- string s;
- cin >> s;
- int sum = 0;
- for(char i : s)
- sum += i - '0';
- if(sum % 9 == 0)
- cout << "Yes" << '\n';
- else
- cout << "No" << '\n';
- */
- /*
- string s;
- int x;
- cin >> s >> x;
- int n = 0;
- for(char i : s){
- n = 10 * n + i - '0';
- n %= x;
- }
- if(n == 0)
- cout << "Yes\n";
- else
- cout << "No\n";
- // 154 7
- // 3465 5
- */
- /*
- // C
- int n;
- string s; // s = t + t;
- cin >> n >> s;
- string t = s.substr(0 , n / 2);
- if(s == t + t)
- cout << "Yes" << '\n';
- else
- cout << "No" << '\n';
- */
- /*
- // D
- string s;
- cin >> s;
- while(s.back() == '0')
- s.pop_back();
- string h = s;
- reverse(h.begin() , h.end());
- if(s == h)
- cout << "Yes";
- else
- cout << "No";
- */
- /*
- // E
- int n , m;
- cin >> n >> m;
- int a[n + 5][m + 5];
- for(int i = 1; i <= n; i++){
- for(int j = 1; j <= m; j++){
- cin >> a[i][j];
- }
- }
- for(int j = 1; j <= m; j++){
- for(int i = 1; i <= n; i++){
- cout << a[i][j] << " ";
- }
- cout << '\n';
- }
- */
- /*
- // F
- string a = "HDCS";
- string b = "A23456789TJQK";
- int n;
- cin >> n;
- set<string> s;
- string ans = "Yes";
- for(int i = 0; i < n; i++){
- string card;
- cin >> card;
- s.insert(card);
- if(a.find(card[0]) < a.size() && b.find(card[1]) < b.size())
- continue;
- else
- ans = "No";
- }
- if(s.size() != n)
- ans = "No";
- cout << ans << '\n';
- */
- /*
- // G
- int n , x , y;
- cin >> n;
- map<int , int> cnt;
- int m = n - 1;
- while(m--){ // n - 1 defe
- cin >> x >> y;
- cnt[x]++;
- cnt[y]++;
- }
- string ans = "No";
- for(int i = 1; i <= n; i++){
- if(cnt[i] == n - 1)
- ans = "Yes";
- }
- cout << ans << '\n';
- */
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement