結果
| 問題 | No.521 Cheeses and a Mousetrap(チーズとネズミ捕り) |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-06-02 22:28:19 |
| 言語 | C++14 (gcc 15.3.0 + boost 1.92.0 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 1 ms / 2,000 ms |
| + 356µs | |
| コード長 | 330 bytes |
| 記録 | |
| コンパイル時間 | 850 ms |
| コンパイル使用メモリ | 180,072 KB |
| 実行使用メモリ | 9,804 KB |
| 最終ジャッジ日時 | 2026-09-01 23:45:09 |
| 合計ジャッジ時間 | 2,222 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 28 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
int main( int argc, char *argv[] )
{
int N;
int K;
int iAns;
ios::sync_with_stdio( false );
cin.tie( 0 );
cin >> N;
cin >> K;
if( K <= 0 || N <= 0 || K > N )
iAns = 0;
else if( K * 2 - 1 == N )
iAns = N - 1;
else
iAns = N - 2;
cout << iAns << endl;
return 0;
}