結果
問題 | No.1748 Parking Lot |
ユーザー |
|
提出日時 | 2021-11-19 21:55:02 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 452 bytes |
コンパイル時間 | 1,340 ms |
コンパイル使用メモリ | 161,872 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2025-01-01 16:58:21 |
合計ジャッジ時間 | 2,287 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 22 |
ソースコード
#include<bits/stdc++.h> #define REP(i,n) for(int i=0,i##_len=int(n);i<i##_len;++i) #define rep(i,a,b) for(int i=int(a);i<int(b);++i) #define All(x) (x).begin(),(x).end() #define rAll(x) (x).rbegin(),(x).rend() using namespace std; using ll = long long; int main(){ int N,K; cin>>N>>K; int ans; if( N == 1 ) { ans = 1; } else { if( K == N-1 ) ans = N; else ans = N-1; } cout<<ans<<endl; }