結果
問題 |
No.521 Cheeses and a Mousetrap(チーズとネズミ捕り)
|
ユーザー |
![]() |
提出日時 | 2017-06-17 01:02:35 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 357 bytes |
コンパイル時間 | 700 ms |
コンパイル使用メモリ | 76,440 KB |
実行使用メモリ | 814,596 KB |
最終ジャッジ日時 | 2024-10-01 06:58:45 |
合計ジャッジ時間 | 2,847 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 2 WA * 2 RE * 2 MLE * 1 -- * 21 |
ソースコード
#include <iostream> #include <vector> #include <algorithm> #include <set> #include <map> using namespace std; int main() { std::ios::sync_with_stdio(false); std::cin.tie(0); int n,k; cin >> n >> k; vector<int> ans(n,1); ans[k-1] = 0; ans[n-1-k] = 0; for(int i = 0; i < n - 1; i++){ ans[i+1] += ans[i]; } cout << ans[n-1] << endl; }