CARVIEW |
Select Language
HTTP/2 200
date: Sun, 12 Oct 2025 08:50:15 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=5facc4dfafdb1c2effac0acdbe34d54f40b60f6dfc55724328dab34374b8644ba%3A2%3A%7Bi%3A0%3Bs%3A14%3A%22_csrf-frontend%22%3Bi%3A1%3Bs%3A32%3A%22h2PnQzcmfRuE-SVl0cnwuEL-3-wUHHig%22%3B%7D; HttpOnly; Path=/
cf-ray: 98d559399a35741b-BLR
#include <iostream>#include <sstream>#include <cstdlib>#include <algorithm - Pastebin.com
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <sstream>
- #include <cstdlib>
- #include <algorithm>
- #include <cmath>
- #include <iomanip>
- #include <numeric>
- #include <vector>
- using namespace std;
- #define ll long long
- 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;
- cin >> n;
- ll arr[2]{};
- string s;
- cin >> s;
- for (ll i = 0; i < n; i++)
- {
- arr[s[i] - '0']++;
- }
- ll ones;
- arr[1] % 2 == 0 ? ones = (arr[1] / 2) - 1 : ones = arr[1] / 2;
- if (arr[1] > 0)
- cout << "1";
- for (ll i = 0; i < arr[0]; i++)
- {
- cout << "0";
- }
- for (ll i = 0; i < ones; i++)
- {
- cout << "1";
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
-
✅ Make $2500 in 20 minutes⭐⭐⭐ Z
JavaScript | 2 sec ago | 0.25 KB
-
📌 Swapzone +37% glitch ⭐ P
JavaScript | 11 sec ago | 0.25 KB
-
✅⭐ Make huge profits on trading ⭐⭐ R
JavaScript | 19 sec ago | 0.25 KB
-
⭐⭐⭐Make $15OO in 2O minutesV G⭐⭐
Java | 26 sec ago | 0.10 KB
-
⭐✅ Marketplace Glitch ✅ Working ✅ NEVER SEEN...
JavaScript | 28 sec ago | 0.25 KB
-
⭐✅ Exploit 2500$ in 15 Minutes⭐⭐⭐ L
JavaScript | 37 sec ago | 0.25 KB
-
⭐⭐⭐Crypto Accounts⭐⭐
Java | 38 sec ago | 0.10 KB
-
Free Crypto Method (NEVER SEEN BEFORE)⭐⭐ S
JavaScript | 46 sec ago | 0.25 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