CARVIEW |
Select Language
HTTP/2 200
date: Wed, 15 Oct 2025 21:56:28 GMT
content-type: text/html; charset=UTF-8
server: cloudflare
x-frame-options: DENY
x-content-type-options: nosniff
x-xss-protection: 1;mode=block
vary: accept-encoding
cf-cache-status: DYNAMIC
content-encoding: gzip
set-cookie: _csrf-frontend=270a60ecbd58c182ad1d1a138f528a5b4e3989ec6fe88d6ce3b3821df672215aa%3A2%3A%7Bi%3A0%3Bs%3A14%3A%22_csrf-frontend%22%3Bi%3A1%3Bs%3A32%3A%22alY-V0ftUUlKY6SOpybN59v17-wzybph%22%3B%7D; HttpOnly; Path=/
cf-ray: 98f2910d5ac41eef-BLR
#include <iostream>#include <iomanip>#include <vector>#include <string># - Pastebin.com
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <iomanip>
- #include <vector>
- #include <string>
- #include <queue>
- #include <map>
- #include <set>
- #include <string>
- #include <algorithm>
- #include <cmath>
- #include <unordered_map>
- using namespace std;
- #define ll long long
- #define nl endl
- #define cy cout << "YES\n"
- #define cn cout << "NO\n"
- #define sz s.size()
- void sherry()
- {
- ios_base::sync_with_stdio(false), cin.tie(nullptr), cout.tie(nullptr);
- #ifndef ONLINE_JUDGE
- freopen("input.txt", "r", stdin), freopen("output.txt", "w", stdout);
- #endif
- }
- int main()
- {
- sherry();
- ll n, sum = 0, c = 0;
- cin >> n;
- vector<ll> v(0);
- for (int i = 0; i < n; i++)
- {
- ll num;
- cin >> num;
- if (num > 0 && num % 2 == 0)
- {
- sum += num;
- }
- else if (num % 2 != 0)
- {
- v.push_back(num);
- if (num > 0)
- {
- c++;
- }
- }
- }
- sort(v.begin(), v.end(), greater<ll>());
- if (c % 2 == 0)
- {
- c--;
- }
- for (int i = 0; i < v.size(); i++)
- {
- sum += v[i];
- c--;
- if (c <= 0)
- {
- break;
- }
- }
- cout << sum;
- }
Advertisement
Add Comment
Please, Sign In to add comment
-
🔥 Exchange profit method
JavaScript | 7 sec ago | 0.24 KB
-
💡 EASY MONEY GUIDE ✅ Working
JavaScript | 17 sec ago | 0.24 KB
-
💡 Instant BTC Profit Method ✅ Working
JavaScript | 27 sec ago | 0.24 KB
-
🚀 Swapzone +37% glitch
JavaScript | 37 sec ago | 0.24 KB
-
📝 MAKE $2500 IN 15 MIN ✅ Working
JavaScript | 48 sec ago | 0.24 KB
-
⚡ Crypto Swap Glitch ✅ Working ⚡
JavaScript | 57 sec ago | 0.24 KB
-
💎 ChangeNOW Exploit
JavaScript | 1 min ago | 0.24 KB
-
⚡ Crypto Swap Glitch ✅ Working ⚡
JavaScript | 1 min ago | 0.24 KB
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand