•
9:41 p.m. 28 Tháng 3, 2025
i'm gayy
i'm gayyy
...Xem thêm
•
9:27 p.m. 28 Tháng 3, 2025
8===D
...Xem thêm
•
9:24 p.m. 28 Tháng 3, 2025
bún cua : test: bun cua
include <bits/stdc++.h>
using namespace std;
string s;
long i;
int main()
{getline(cin,s);if (s[s.size()]!=' ') s=s+' ';for (i=0;i<s.size();i++){if (s[i]!=' '&&s[i+1]==' ') s.erase(i,1);}cout<<s;}
...Xem thêm
•
9:24 p.m. 28 Tháng 3, 2025
bai lich su
include<bits/stdc++.h>
using namespace std;
long long n,count_result=0;
int main(){
cin>>n;
vector<pair\<long long,long long>> events(n);
for(long long i=0;i<n;i++)cin>>events[i].first>>events[i].second;
sort(events.begin(),events.end());
multiset<long long> b_values;
for(auto event:events){
long long b=event.second;
auto it=b_values.upper_bound(b);
count_result+=distance(it,b_values.end());
b_values.insert(b);
}
cout<<count_result;
}
...Xem thêm