Tên đăng nhập Điểm ▾ Bài tập Giới thiệu
25801 301 1
25801 301 1
25801 301 1
25801 301 1
25801 301 1

xâu con

25801 301 1
25801
nguyentrong17
Nguyễn Đình Minh Trọng
301 1
25801
leo17112005
phanphucthinh
301 1
25801 301 1
25801 301 1
25801 301 1
25801 301 1
25801 301 1
25801 301 1
25801 301 1
25801 301 1
25801 301 1

Linh Trung - Thủ Đức

25801 301 1
25801 301 1
25801 301 1
25801 301 1
25801 301 1

include <bits/stdc++.h>

define task ""

define for(i, a, b) for(int i = (a); i <= (b); i++)

define pii pair<int, int>

using namespace std;
int const N = 1e7+2;

int a[N];
int n,m,x,y;
pii sum[N];

int main()
{
//freopen(task".inp","r",stdin);
//freopen(task".out","w",stdout);
cin>>n>>m;
cout<<n-(m-2n)/2<<" "<<(m-2n)/2;

return 0;

}

25801 301 1
25801 301 1
25801 301 1
25801 301 1
25801 301 1
25801 301 1
25801 301 1
25801 301 1
25801 301 1
25801 301 1
25801 301 1
25801 301 1
25801 301 1

nothing

25801 301 1
25801 301 1
25801 301 1
25801 301 1
25801 301 1
25801 301 1
25801 301 1
25801 301 1
25801 301 1
25801 301 1
25801 301 1
25801 301 1
25801 301 1
25801 301 1
25801 301 1

~\color{#F20745}{\text{ ◖♪_♪◗}}~

~\color{#00F5FF}{\text{✪‿}}~~\color{#FF0000}{\text{haonodeptrai}{{}~}^{{}^{v5G✿}}}}

25801 301 1
25801 301 1
25801 301 1
25801 301 1
25801 301 1
25801 301 1
25801 301 1

Muốn tham gia để học hỏi bồi dưỡng thêm kiến thức và tìm hiểu về cách thức tổ chức thi tin học trẻ Online

25801 301 1
25801 301 1
25801 301 1
25801 301 1
25801 301 1
25801 301 1
25801 301 1
25801 301 1
25801 301 1
25801 301 1

L

25801 301 1

include <bits/stdc++.h>

using namespace std;
int n, m, a[1000005], res, d[1000005];
int main() {
cin >> n >> m;
for ( int i = 1; i <= n; i++ ) {
cin >> a[i];
d[a[i]]++;
}
sort ( a + 1, a + 1 + n );
for ( int i = n; i >1; i-- ) {
res=res+ upper_bound ( a + 1, a + i, m - a[i] )-a-1;
}
cout<<res;
}

25801 301 1
25801 301 1
25801 301 1
25801 301 1
25801 301 1
25801 301 1
25801 301 1
25801 301 1
25801 301 1
25801 301 1
25801 301 1
25801 301 1
25801 301 1
25801 301 1
25801 301 1
25801 301 1
25801 301 1
25801 301 1
25801 301 1
25801 301 1
25801 301 1
25801 301 1
25801 301 1
25801 301 1
25801 301 1
25801 301 1
25801 301 1
25801 301 1
25801 301 1
25801 301 1
25801 301 1
25801 301 1