結果
問題 | No.521 Cheeses and a Mousetrap(チーズとネズミ捕り) |
ユーザー |
![]() |
提出日時 | 2017-06-02 22:21:22 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 359 bytes |
コンパイル時間 | 728 ms |
コンパイル使用メモリ | 82,648 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-09-21 22:20:30 |
合計ジャッジ時間 | 1,854 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 28 |
ソースコード
#include <cmath> #include <string> #include <vector> #include <iomanip> #include <iostream> #include <algorithm> #include <functional> #pragma warning(disable : 4996) using namespace std; int n, m; int main() { cin >> n >> m; if (n + 1 == m * 2) cout << n - 1 << endl; else if (1 <= m && m <= n) cout << n - 2 << endl; else cout << 0 << endl; return 0; }