結果
問題 | No.477 MVP |
ユーザー | yukiteru |
提出日時 | 2018-02-04 16:38:45 |
言語 | C++14 (gcc 12.3.0 + boost 1.83.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 507 bytes |
コンパイル時間 | 585 ms |
コンパイル使用メモリ | 79,396 KB |
実行使用メモリ | 4,504 KB |
最終ジャッジ日時 | 2023-09-12 16:03:07 |
合計ジャッジ時間 | 1,215 ms |
ジャッジサーバーID (参考情報) |
judge12 / judge15 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 1 ms
4,376 KB |
testcase_01 | WA | - |
testcase_02 | WA | - |
testcase_03 | WA | - |
testcase_04 | WA | - |
testcase_05 | AC | 2 ms
4,380 KB |
testcase_06 | WA | - |
testcase_07 | AC | 2 ms
4,380 KB |
testcase_08 | WA | - |
testcase_09 | WA | - |
testcase_10 | WA | - |
testcase_11 | WA | - |
ソースコード
#include<iostream> #include<string> #include<string.h> #include<algorithm> #include<stdio.h> #include<cmath> #include<vector> #include<utility> #include<stack> #include<queue> #include<list> #include<bitset> #include<functional> #define FOR(i, a, b) for(int i=(a);i<=(b);i++) #define RFOR(i, a, b) for(int i=(a);i>=(b);i--) #define MOD 1000000007 #define INF 1000000000 using namespace std; int main(void) { long long int n, k; cin >> n >> k; cout << min(n / 2 + 1, n - k + 2) << endl; return 0; }