結果
問題 |
No.1748 Parking Lot
|
ユーザー |
![]() |
提出日時 | 2021-11-19 22:10:37 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 632 bytes |
コンパイル時間 | 1,317 ms |
コンパイル使用メモリ | 159,768 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2025-01-01 18:03:29 |
合計ジャッジ時間 | 2,218 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge7 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 22 |
ソースコード
#include <bits/stdc++.h> using namespace std; using ll = long long; using Graph = vector<vector<int> >; using PI = pair<int, int>; using PL = pair<ll, ll>; #define rep(i, a, b) for(int i = a; i < b; i++) #define rep_ll(i, a, b) for(ll i = a; i < b; i++) #define rrep(i, a, b) for(int i = a; i >= b; i--) #define fore(i, a) for(auto &i:a) #define all(x) (x).begin(),(x).end() const int INFI = 1 << 29; const ll INFL = 1LL << 59; int main() { cin.tie(0); ios::sync_with_stdio(false); 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; }