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 a , b , c;
- cin >> a >> b >> c;
- if(a <= c && c <= b) // a <= c <= b
- cout << "Yes" << '\n';
- else
- cout << "No" << '\n';
- */
- /*
- // B
- char a , b;
- cin >> a >> b;
- if(a == b)
- cout << "H" << '\n';
- else
- cout << "D" << '\n';
- */
- /*
- // C
- int a , b;
- char op;
- cin >> a >> op >> b;
- if(op == '+')
- cout << a + b << '\n';
- else
- cout << a - b << '\n';
- */
- /*
- // D
- string s;
- cin >> s;
- int n = s.size();
- for(int i = 0; i < n; i++)
- cout << 'x';
- for(char i : s)
- cout << 'x';
- */
- /*
- // E
- string s;
- cin >> s;
- for(int i = 0; i < s.size(); i++){
- if(s[i] == ',')
- s[i] = ' ';
- }
- for(char& i : s)
- if(i == ',')
- i = ' ';
- cout << s;
- */
- /*
- // F
- string a , b , c;
- cin >> a >> b >> c;
- a[0] = toupper(a[0]);
- b[0] = toupper(b[0]);
- c[0] = toupper(c[0]);
- cout << a[0] << b[0] << c[0];
- */
- /*
- // G
- int n , p , x;
- cin >> n >> p;
- int cnt = 0;
- while(n--){
- cin >> x;
- cnt += x < p;
- // if(x < p) cnt++;
- }
- cout << cnt << '\n';
- */
- /*
- // H
- int n , x , s = 0;
- cin >> n;
- while(n--){
- cin >> x;
- if(x > 10)
- s += x - 10;
- //s += max(0LL , x - 10);
- }
- cout << s << '\n';
- */
- /*
- // I
- string s;
- cin >> s;
- reverse(s.begin() , s.end());
- for(char& i : s){
- if(i == '6')
- i = '9';
- else if(i == '9')
- i = '6';
- }
- cout << s;
- */
- /*
- // J
- int t;
- cin >> t;
- while(t--){
- int n;
- cin >> n;
- int a[n + 5];
- int cnt = 0;
- for(int i = 0; i < n; i++){
- cin >> a[i];
- if(a[i] % 2)
- cnt++;
- }
- cout << cnt << '\n';
- }
- */
- /*
- // K
- 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 = 0; i < n; i++){
- if(a[i] != (i + 1)){
- cout << "No" << '\n';
- return 0;
- }
- }
- cout << "Yes" << '\n';
- */
- /*
- // L
- int n , x;
- cin >> n;
- set<int> s;
- while(n--){
- cin >> x;
- s.insert(x);
- }
- cout << s.size() << '\n';
- */
- // M
- /*
- int n;
- cin >> n;
- int a[n + 5];
- for(int i = 0; i < n; i++){
- cin >> a[i];
- }
- sort(a , a + n);
- reverse(a , a + n);
- for(int i = 0; i < n; i++){
- if(a[i] != a[0]){
- cout << a[i] << '\n';
- }
- }*/
- /*
- int n , x;
- cin >> n;
- set<int> s;
- while(n--){
- cin >> x;
- s.insert(x);
- }
- auto it = s.end();
- it--;
- it--;
- cout << *it << '\n';
- // 1 2 3 4 .end
- */
- /*
- // N
- int n , a , x;
- cin >> n >> x;
- while(n--){
- cin >> a;
- if(a != x)
- cout << a << " ";
- }
- cout << '\n';
- */
- /*
- // O
- int n;
- cin >> n;
- int a[n + 5] , b[n + 5];
- for(int i = 0; i < n; i++){
- cin >> a[i];
- }
- int sum = 0;
- for(int i = 0; i < n; i++){
- cin >> b[i];
- sum += a[i] * b[i];
- }
- if(!sum) // sum == 0
- cout << "Yes" << '\n';
- else
- cout << "No" << '\n';
- */
- /*
- // P
- int n;
- cin >> n;
- int a = n / 500;
- int b = (n % 500) / 5;
- cout << a * 1000 + b * 5 << '\n';
- */
- /*
- // Q
- int n;
- cin >> n;
- int a[n + 5];
- for(int i = 0; i < n; i++){
- cin >> a[i];
- }
- for(int i = 0; i < n - 1; i++){
- if(a[i] >= a[i + 1]){
- cout << a[i] << '\n';
- return 0;
- }
- }
- cout << a[n - 1] << '\n';
- */
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement