Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ////////////////////////////////////////// PROBLEM - A //////////////////////////////////////////
- #include <bits/stdc++.h>
- #define ll long long
- using namespace std;
- void solve()
- {
- int n, m;
- cin >> n >> m;
- if (n == m) cout << "Yes";
- else cout << "No";
- }
- int main()
- {
- int t = 1;
- // cin >> t;
- for (int i = 1; i <= t; i++)
- {
- solve();
- }
- return 0;
- }
- ////////////////////////////////////////// PROBLEM - B //////////////////////////////////////////
- #include <bits/stdc++.h>
- #define ll long long
- using namespace std;
- void solve()
- {
- int n, r;
- cin >> n >> r;
- if (n > 10) cout << r;
- else cout << r + 100 * (10 - n);
- }
- int main()
- {
- int t = 1;
- // cin >> t;
- for (int i = 1; i <= t; i++)
- {
- solve();
- }
- return 0;
- }
- ////////////////////////////////////////// PROBLEM - C //////////////////////////////////////////
- #include <bits/stdc++.h>
- #define ll long long
- using namespace std;
- void solve()
- {
- ll a, b, c, d;
- cin >> a >> b >> c >> d;
- if (b * log(a) > d * log(c)) cout << "YES";
- else cout << "NO";
- }
- int main()
- {
- int t = 1;
- // cin >> t;
- for (int i = 1; i <= t; i++)
- {
- solve();
- }
- return 0;
- }
- ////////////////////////////////////////// PROBLEM - D //////////////////////////////////////////
- #include <bits/stdc++.h>
- #define ll long long
- using namespace std;
- void solve()
- {
- int x;
- cin >> x;
- if (x < -4) cout << x + 5;
- else if (x <= 7) cout << x * x - 3 * x;
- else cout << x * x * x + 2 * x;
- }
- int main()
- {
- int t = 1;
- // cin >> t;
- for (int i = 1; i <= t; i++)
- {
- solve();
- }
- return 0;
- }
- ////////////////////////////////////////// PROBLEM - E //////////////////////////////////////////
- #include <bits/stdc++.h>
- #define ll long long
- using namespace std;
- void solve()
- {
- int x, y, z;
- cin >> x >> y >> z;
- if (x + y > z && x + z > y && y + z > x) cout << "YES";
- else cout << "NO";
- }
- int main()
- {
- int t = 1;
- // cin >> t;
- for (int i = 1; i <= t; i++)
- {
- solve();
- }
- return 0;
- }
- ////////////////////////////////////////// PROBLEM - F //////////////////////////////////////////
- #include <bits/stdc++.h>
- #define ll long long
- using namespace std;
- void solve()
- {
- int n;
- cin >> n;
- cout << n * (n + 1) / 2;
- }
- int main()
- {
- int t = 1;
- // cin >> t;
- for (int i = 1; i <= t; i++)
- {
- solve();
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment