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

Not good at code, But i will try my best.

27801 60 1
27801
STR54Hai
Lê Hoàng Hải
60 1
27801 60 1

include <iostream>

using namespace std;
const int nm = 1e6 + 1;
int n, a[nm], i, dem, j;
int main () {
freopen("TONGBANGKHONG.INP","r",stdin);
freopen("TONGBANGKHONG.OUT","w",stdout);
cin >> n;
for (i = 0; i < n; i++)
cin >> a[i];
dem = 0;
for(i=0; i<n-1; i++)
for (j=i+1;j<n;j++)
if(a[i] + a[j] == 0)
dem++;
if (dem == 0)
cout << 0;
else
cout << dem << endl;
return 0;
}

27801 60 1
27801 60 1
27801 60 1
27801 60 1
27801 60 1
27801 60 1
27801 60 1
27801
mttn053cb
CB BDi-LQD Nguyen Quang Huy
60 1
27801 60 1
27801 60 1

2023 - n : YOU-TM

27801
nghiaducvu
Vũ Đức Nghĩa
60 1
27801 60 1
27801 60 1
27801 60 1
27801 60 1
27801 60 1

ủa alo bạn ơi

27801 60 1
27801 60 1
27801 60 1
27801 60 1
27801
doanchem1
Đoàn Nguyễn Nam Phong
60 1
27801 60 1
27801 60 1
27801 60 1
27801 60 1
27801 60 1
27801 60 1
27801 60 1
27801 60 1
27801 60 1
27801 60 1
27801 60 1
27801 60 1

include <bits/stdc++.h>

define ll long long

define N 1000005

using namespace std;
ll n,k;
ll a[N3],c[N3];
int main()
{
ios_base::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
// freopen("STEP.INP","r",stdin);
// freopen("STEP.OUT","w",stdout);
cin>>n>>k;
for(ll i=1;i<=k;i++){
cin>>a[0];
a[a[0]]=1;
}
c[0]=1;
c[1]=1;
for(ll i=2;i<=n;i++){
if(a[1]==1) c[1]=0;
if(a[i]==0) c[i]=(c[i-1]+c[i-2])%13051984;
}
cout<<c[n];
return 0;
}

27842
mttn070cb
CB DNa Huynh Minh Khang
60 2
27843 58 1
27843 58 1
27845 57 6
27846 57 1
27847
mttn062cb
CB DT-NQD Nguyen Le Thanh Huy
56 3
27848
maihuybao
Mai Huy Bảo
56 1
27849 55 1
27849 55 1
27849 55 1
27852 55 1
27853
mttn081cb
CB LD-CBL Vo Ngoc Anh Linh
55 4
27854 54 1
27855 54 2
27856 53 1
27857 53 2
27858 52 2
27859 52 1
27860 52 1
27860 52 1
27860 52 1
27860
ttdh357
Tommmmm
52 1
27864 51 1
27865 51 1
27865 51 1
27865 51 1
27865 51 1
27865 51 1
27865 51 1
27865 51 1
27865 51 1
27865
24ASTR35
Tô Đăng Khôi
51 1
27865
24BSTR03
Nguyễn Thế Anh
51 1
27865 51 1
27865
ICT24A00123
Trần Minh Kiệt
51 1
27865
ICT24A00132
Nguyễn Hữu Hồng Quân
51 1
27865
ICT24A00217
Nguyễn Huỳnh Chấn Phong
51 1
27865
ICT24B00109
Hoàng Nghĩa Hưng
51 1
27865
ICT24B00304
Nguyễn Đức Anh Khoa
51 1
27865
ICT24B00411
Nguyễn Tâm Thảo Nhi
51 1
27865
ICT24C20142
Nguyễn Văn Trường
51 1
27865 51 1
27865 51 1
27865 51 1
27865
phong208 1144
Nguyễn Bá Phong
51 1
27865 51 1
27865 50 1
27865 50 1
27865 50 1
27865 50 1
27865 50 1
27865 50 1
27865 50 1
27865 50 1
27865 50 1
27865 50 1
27865 50 1
27865 50 1
27865 50 1