結果
| 問題 | No.1748 Parking Lot |
| コンテスト | |
| ユーザー |
MasKoaTS
|
| 提出日時 | 2021-11-20 17:17:00 |
| 言語 | C++17 (gcc 15.2.0 + boost 1.90.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 1,020 bytes |
| 記録 | |
| コンパイル時間 | 2,860 ms |
| コンパイル使用メモリ | 274,024 KB |
| 実行使用メモリ | 7,968 KB |
| 最終ジャッジ日時 | 2026-06-23 20:02:01 |
| 合計ジャッジ時間 | 4,321 ms |
|
ジャッジサーバーID (参考情報) |
judge3_1 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 22 |
ソースコード
#include <math.h>
#include <bits/stdc++.h>
#include <atcoder/all>
using namespace std;
using namespace atcoder;
#define rep(i, l, n) for (int i = (l); i < (n); i++)
#define max(p, q) ((p) > (q) ? (p) : (q))
#define min(p, q) ((p) < (q) ? (p) : (q))
#define all(x) x.begin(), x.end()
#define fi first
#define se second
#define lb lower_bound;
#define ub upper_bound;
#define lbi(A, x) (ll)(lb(all(A), x) - A.begin())
#define ubi(A, x) (ll)(ub(all(A), x) - A.begin())
using ll = long long;
using P = pair<int, int>;
template <class T>
using V = vector<T>;
template <class T>
using VV = V<V<T> >;
template <class T>
const ll INF = 1000000000000000001;
const int inf = 1001001001;
const ll mod = 1000000007;
const ll MOD = 998244353;
inline V<int> dtois(string& s) { V<int> vec = {}; for (auto& e : s) { vec.push_back(e - '0'); } return vec; }
int main(void) {
int N, K; cin >> N >> K;
if (N == 1) {
cout << 1 << endl;
}
else if (K == N - 1) {
cout << N << endl;
}
else {
cout << N - 1 << endl;
}
return 0;
}
MasKoaTS