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 endl '\n'
- #define fastio ios_base::sync_with_stdio(0); cin.tie(0)
- signed main()
- {
- fastio;
- /*
- // A
- int n;
- cin >> n;
- int a[n + 5];
- for(int i = 0; i < n; i++){
- cin >> a[i];
- }
- for(int i = 0; i < n; i++){
- cout << a[i] << '\n';
- }
- */
- /*
- // B
- int n;
- cin >> n;
- int a[n + 5];
- for(int i = 0; i < n; i++){
- cin >> a[i];
- }
- reverse(a , a + n);
- for(int i = 0; i < n; i++){
- cout << a[i] << " ";
- }
- cout << '\n';
- */
- /*
- // C
- int n;
- cin >> n;
- int a[n + 5];
- int cnt = 0;
- for(int i = 0; i < n; i++){
- cin >> a[i];
- if(a[i] > 0)
- cnt++;
- }
- cout << cnt << '\n';
- */
- /*
- // D
- int n;
- cin >> n;
- int a[n + 5];
- int sum = 0;
- for(int i = 0; i < n; i++){
- cin >> a[i];
- if(a[i] < 0)
- sum += a[i];
- }
- cout << sum << '\n';
- */
- /*
- // E
- int n;
- cin >> n;
- int a[n + 5];
- for(int i = 0; i < n; i++){
- cin >> a[i];
- }
- for(int i = 1; i < n; i++){
- if(a[i] > a[i - 1])
- cout << a[i] << " ";
- }
- cout << '\n';
- */
- /*
- // F
- int n;
- cin >> n;
- int a[n + 5];
- for(int i = 0; i < n; i++){
- cin >> a[i];
- }
- reverse(a , a + n);
- for(int i = 0; i < n; i++){
- cout << a[i] << " ";
- }
- cout << '\n';
- */
- /*
- // G
- 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++){
- cout << a[i] << " ";
- }
- cout << '\n';
- */
- /*
- // H
- int n;
- cin >> n;
- int a[n + 5];
- for(int i = 0; i < n; i++){
- cin >> a[i];
- }
- sort(a , a + n);
- cout << a[0] + a[n - 1] << '\n';
- */
- /*
- // I
- int n;
- cin >> n;
- int a[n + 5];
- for(int i = 0; i < n; i++){
- cin >> a[i];
- }
- sort(a , a + n);
- cout << a[n - 1] + a[n - 2] << '\n';
- */
- /*
- // J
- int n;
- cin >> n;
- int a[n + 5];
- for(int i = 0; i < n; i++){
- cin >> a[i];
- }
- sort(a , a + n);
- int cnt = 1;
- for(int i = 1; i < n; i++){
- if(a[i] != a[i - 1])
- cnt++;
- }
- cout << cnt << '\n';
- */
- /*
- // K
- 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++){
- if(a[i] != a[i - 1])
- cout << a[i] << " ";
- }
- cout << '\n';
- */
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement