結果
| 問題 |
No.521 Cheeses and a Mousetrap(チーズとネズミ捕り)
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-06-24 20:19:03 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 103 bytes |
| コンパイル時間 | 478 ms |
| コンパイル使用メモリ | 63,648 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2024-10-04 03:01:18 |
| 合計ジャッジ時間 | 1,530 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 28 |
コンパイルメッセージ
main.cpp:3:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
3 | main(){long n,k;cin>>n>>k;
| ^~~~
ソースコード
#include<iostream>
using namespace std;
main(){long n,k;cin>>n>>k;
cout<<(k<1||k>n?0:n+1-k-k?n-2:n-1);}