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

t hoc ams

23701 301 1
23701 301 1
23701 301 1
23701 301 1
23701 301 1
23701 301 1
23701 301 1
23701 301 1
23701 301 1

This is Souta!

23701 301 1
23701 301 1
23701 301 1
23701 301 1
23701 301 1
23701
olp23psa14
PSA - Huỳnh Nguyễn Quốc Hưng
301 1
23701 301 1
23701 301 1
23701 301 1
23701 301 1
23701 301 1
23701 301 1
23701 301 1
23701 301 1
23701 301 1

abc

23701 301 1
23701 301 1
23701 301 1
23701 301 1
23701 301 1
23701
haitapcode
Hồ Quang Hải
301 1
23701 301 1
23701 301 1
23701 301 1
23701 301 1
23701 301 1
23701 301 1
23701 301 1
23701 301 1
23701 301 1
23701 301 1
23701 301 1

abc

23701 301 1
23701 301 1
23701 301 1
23701 301 1

hoàn dang

23701
phamducluongwww
Phạm Đức Lương
301 1
23701 301 1
23701 301 1
23701 301 1
23701 301 1

include <iostream>

include <cstring>

using namespace std;

const int N = 150000;
const int mod = 14062008;
int n, k, a[N], F[N];

int main() {
// freopen("INP.TXT", "r", stdin);
// freopen("OUT.TXT", "w", stdout);

cin >> n >> k;
for (int i = 1; i <= k; ++i) {
    long long m;
    cin >> m;
    a[m] = 1;
}

F[1] = 1;
for (int i = 2; i <= n; ++i) {
    if (a[i] == 0) {
        F[i] = (F[i - 1] + F[i - 2]) % mod;
    }
    else F[i]=0;
}

cout << F[n] << endl;

return 0;

}

23701 301 1
23701 301 1
23701 301 1
23701 301 1
23701 301 1
23701 301 1
23701 301 1
23701 301 1
23701 301 1
23701 301 1
23701 301 1
23701 301 1
23701 301 1
23701 301 1

include <bits/stdc++.h>

using namespace std;

define ll long long

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

define Fo(i, a, b) for(ll i = a; i >= b; --i)

define sz(s) (s).size()

define SIZE 1007

define oo 10000

define fase ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);

typedef vector<ll> vti;

ll m, n, a[SIZE][SIZE], dp[SIZE][SIZE];

ll min(ll a, ll b) {
return a > b ? b : a;
}

void getIn() {
cin >> m >> n;
F(i, 1, m) F(j, 1, n) cin >> a[i][j];
F(i, 1, m) dp[i][0] = dp[i][m+1] = oo;
F(i, 1, n) dp[0][i] = dp[n+1][i] = oo;
}

void solve() {
freopen("DUONGDI.INP", "r", stdin);
freopen("DUONGDI.OUT", "w", stdout);
getIn();
F(i, 1, m) {
F(j, 1, n) {
if (i == 1 && j == 1)
dp[i][j] = a[i][j];
else
dp[i][j] = min(dp[i-1][j], dp[i][j-1]) + a[i][j];
}
}
cout << dp[m][n];
}

signed main() {
int t = 1;
while(t--) solve();
}

23701 301 1
23701 301 1
23701 301 1
23701 301 1
23701 301 1
23701 301 1
23701 301 1
23701 301 1
23701 301 1
23701 301 1
23701 301 1
23701 301 1
23701 301 1
23701 301 1