제출 #1117836

#제출 시각아이디문제언어결과실행 시간메모리
1117836vjudge1캥거루 (CEOI16_kangaroo)C++17
0 / 100
1 ms336 KiB
// author - alimammadzade #include <bits/stdc++.h> using namespace std; signed main() { cin.tie(nullptr)->sync_with_stdio(0); // system("cls"), freopen("in.txt", "r", stdin); int n, s, f; cin >> n >> s >> f; vector<array<int, 2>> dp(n + 1); dp[s] = { 1, 1 }; for (int i = 1; i <= n; i++) { for (int j = i + 1; j <= n; j++) dp[i][0] += dp[j][1]; for (int j = 1; j < i; j++) dp[i][1] += dp[j][0]; } cout << dp[f][0] + dp[f][1]; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...