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 pb push_back
- const int mod = 1e9 + 7;
- signed main()
- {
- ios_base::sync_with_stdio(0);
- cin.tie(0);
- int n;
- cin >> n;
- multiset<int> ms;
- for(int i = 0; i < n; i++){
- int x;
- cin >> x;
- ms.insert(x);
- }
- for(int i = 1; i <= 5; i++){
- cout << i << "-den " << ms.count(i) << " dene var\n";
- }
- //ms.erase(4);
- ms.erase(ms.find(4));
- cout << '\n';
- for(int i = 1; i <= 5; i++){
- cout << i << "-den " << ms.count(i) << " dene var\n";
- }
- /*
- multiset<int> ms;
- ms.size(); // olcusu
- ms.empty(); // bosdurmu?
- ms.insert(x); // elave ele amma sorted
- ms.count(x); // x-in sayi
- ms.erase(x); // butun x leri sil
- ms.erase(ms.find(x)); // 1 dene x sil
- set<int> s;;
- */
- /*
- 2
- 4
- 5
- 3 2 4 5 1
- {1 ,
- 2 , 3 , 4 , 5}
- log(1000) = 10
- 2^10 = 1024~1000
- 2^5 * 2^5 = 2^10 = 32 * 32 = 1024
- 2^10 * 2^10 = 2^20 = 10^6
- log(10^3) = 10
- log(10^12) = 40
- log(10^9) = 30
- log(10^18) = 60
- */
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement