結果

問題 No.1748 Parking Lot
ユーザー sapphire__15
提出日時 2021-11-19 21:26:00
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 1,970 bytes
コンパイル時間 1,102 ms
コンパイル使用メモリ 130,932 KB
最終ジャッジ日時 2025-01-25 19:55:58
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 22
権限があれば一括ダウンロードができます

ソースコード

diff #
プレゼンテーションモードにする

#include <algorithm>
#include <cassert>
#include <climits>
#include <cmath>
#include <iostream>
#include <iterator>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <unordered_map>
#include <unordered_set>
#include <vector>
#include <random>
#include <complex>
#include <bitset>
#include <iomanip>
#include <memory>
#include <chrono>
#include <functional>
#define rep(i, n, s) for(int i = (s); i < int(n); i++)
#define per(i, n, s) for(int i = (n - 1); i >= int(s); i--)
#define MM << " " <<
#define all(x) x.begin(), x.end()
#define rall(x) rbegin(x), rend(x)
template <class T>
using MinHeap = std::priority_queue<T, std::vector<T>, std::greater<T>>;
template <class T>
using MaxHeap = std::priority_queue<T>;
using ll = long long;
using Pii = std::pair<int, int>;
using Pll = std::pair<ll, ll>;
using Pdd = std::pair<double, double>;
template <class T>
bool chmin(T &a, const T b) {
if (a > b) {
a = b;
return true;
} else {
return false;
}
}
template <class T>
bool chmax(T &a, const T b) {
if (a < b) {
a = b;
return true;
} else {
return false;
}
}
template <class T>
void vdeb(const std::vector<T> &da) {
auto n = da.size();
for (size_t i = 0; i < n; i++) {
if (i == n - 1)
std::cout << da[i];
else
std::cout << da[i] << " ";
}
std::cout << std::endl;
}
template<class T>
void vdeb(const std::vector<std::vector<T>> &da) {
auto n = da.size();
for (size_t i = 0; i < n; i++) {
std::cout << i << " : ";
vdeb(da[i]);
}
std::cout << std::endl;
}
template <>
void vdeb(const std::vector<std::string> &da) {
auto n = da.size();
for (size_t i = 0; i < n; i++) { std::cout << da[i] << std::endl; }
}
using namespace std;
int main() {
int n, k; cin >> n >> k;
if(k == n-1 || n == 1) {
cout << n << endl;
} else {
cout << n-1 << endl;
}
}
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
0