Submission #00038


ソースコード

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
/* #region Head */
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ull = unsigned long long;
using ld = long double;
using pll = pair<ll, ll>;
template <class T>
using vc = vector<T>;
template <class T>
using vvc = vc<vc<T>>;
using vll = vc<ll>;
using vvll = vvc<ll>;
using vld = vc<ld>;
using vvld = vvc<ld>;
using vs = vc<string>;
using vvs = vvc<string>;
template <class T, class U>
using um = unordered_map<T, U>;
#define REP(i, m, n) for (ll i = (m), i##_len = (ll)(n); i < i##_len; ++(i))
#define REPM(i, m, n) for (ll i = (m), i##_max = (ll)(n); i <= i##_max; ++(i))
#define REPR(i, m, n) for (ll i = (m), i##_min = (ll)(n); i >= i##_min; --(i))
#define REPD(i, m, n, d) for (ll i = (m), i##_len = (ll)(n); i < i##_len; i += (d))
#define REPMD(i, m, n, d) for (ll i = (m), i##_max = (ll)(n); i <= i##_max; i += (d))
#define REPI(itr, ds) for (auto itr = ds.begin(); itr != ds.end(); itr++)
#define ALL(x) begin(x), end(x)
#define SIZE(x) ((ll)(x).size())
#define PREM(c) \
sort(all(c)); \
for (bool c##p = 1; c##p; c##p = next_permutation(all(c)))
#define UNIQ(v) v.erase(unique(ALL(v)), v.end());
constexpr ll INF = 1'010'000'000'000'000'017LL;
constexpr ll MOD = 1'000'000'007LL; // 1e9 + 7
constexpr ld EPS = 1e-12;
constexpr ld PI = 3.14159265358979323846;
// vector 入力
template <typename T>
istream &operator>>(istream &is, vc<T> &vec)
{
for (T &x : vec)
is >> x;
return is;
}
// vector 出力 (for dump)
template <typename T>
ostream &operator<<(ostream &os, vc<T> &vec)
{
ll len = SIZE(vec);
os << "{";
for (int i = 0; i < len; i++)
os << vec[i] << (i == len - 1 ? "" : ", ");
os << "}";
return os;
}
// vector 出力 (inline)
template <typename T>
ostream &operator>>(ostream &os, vc<T> &vec)
{
ll len = SIZE(vec);
for (int i = 0; i < len; i++)
os << vec[i] << (i == len - 1 ? "\n" : " ");
return os;
}
// pair 入力
template <typename T, typename U>
istream &operator>>(istream &is, pair<T, U> &pair_var)
{
is >> pair_var.first >> pair_var.second;
return is;
}
// pair 出力
template <typename T, typename U>
ostream &operator<<(ostream &os, pair<T, U> &pair_var)
{
os << "(" << pair_var.first << ", " << pair_var.second << ")";
return os;
}
// map 出力
template <typename T, typename U>
ostream &operator<<(ostream &os, map<T, U> &map_var)
{
os << "{";
REPI(itr, map_var)
{
os << *itr;
itr++;
if (itr != map_var.end())
os << ", ";
itr--;
}
os << "}";
return os;
}
// um 出力
template <typename T, typename U>
ostream &operator<<(ostream &os, um<T, U> &map_var)
{
os << "{";
REPI(itr, map_var)
{
os << *itr;
auto itrcp = itr;
itrcp++;
if (itrcp != map_var.end())
os << ", ";
}
os << "}";
return os;
}
// set 出力
template <typename T>
ostream &operator<<(ostream &os, set<T> &set_var)
{
os << "{";
REPI(itr, set_var)
{
os << *itr;
itr++;
if (itr != set_var.end())
os << ", ";
itr--;
}
os << "}";
return os;
}
// dump
#define DUMPOUT cerr
void dump_func()
{
DUMPOUT << endl;
}
template <class Head, class... Tail>
void dump_func(Head &&head, Tail &&... tail)
{
DUMPOUT << head;
if (sizeof...(Tail) > 0)
{
DUMPOUT << ", ";
}
dump_func(move(tail)...);
}
// chmax (更新「される」かもしれない値が前)
template <typename T, typename U, typename Comp = less<>>
bool chmax(T &xmax, const U &x, Comp comp = {})
{
if (comp(xmax, x))
{
xmax = x;
return true;
}
return false;
}
// chmin (更新「される」かもしれない値が前)
template <typename T, typename U, typename Comp = less<>>
bool chmin(T &xmin, const U &x, Comp comp = {})
{
if (comp(x, xmin))
{
xmin = x;
return true;
}
return false;
}
// ローカル用
#define DEBUG_
#ifdef DEBUG_
#define DEB
#define dump(...) \
DUMPOUT << " " << string(#__VA_ARGS__) << ": " \
<< "[" << to_string(__LINE__) << ":" << __FUNCTION__ << "]" \
<< endl \
<< " ", \
dump_func(__VA_ARGS__)
#else
#define DEB if (false)
#define dump(...)
#endif
struct AtCoderInitialize
{
static constexpr int IOS_PREC = 15;
static constexpr bool AUTOFLUSH = false;
AtCoderInitialize()
{
ios_base::sync_with_stdio(false);
cin.tie(nullptr);
cout.tie(nullptr);
cout << fixed << setprecision(IOS_PREC);
if (AUTOFLUSH)
cout << unitbuf;
}
} ATCODER_INITIALIZE;
string yes = "Yes", no = "No";
// string yes = "YES", no = "NO";
/* #endregion */
/**
Problem
*/
void solve()
{
ll n, m, d;
cin >> n >> m >> d;
cout << min(n, m * d) << endl;
}
/**
* エントリポイント.
* @return 0.
*/
int main()
{
solve();
return 0;
}

ステータス

項目 データ
問題 0001 - Eating NAMEKUZI
ユーザー名 abb
投稿日時 2020-03-02 21:02:43
言語 C++17
状態 Accepted
得点 100
ソースコード長 5379 Byte
最大実行時間 67 ms
最大メモリ使用量 744 KB

セット

セット 得点 Cases
1 ALL 100 / 100 *

テストケース

ファイル名 状態 実行時間 メモリ使用量 #
in01.txt AC 23 ms 604 KB
1
in02.txt AC 20 ms 432 KB
1
in03.txt AC 24 ms 508 KB
1
in04.txt AC 16 ms 592 KB
1
in05.txt AC 17 ms 548 KB
1
in06.txt AC 17 ms 632 KB
1
in07.txt AC 19 ms 464 KB
1
in08.txt AC 24 ms 416 KB
1
in09.txt AC 67 ms 496 KB
1
in10.txt AC 21 ms 452 KB
1
in11.txt AC 17 ms 660 KB
1
in12.txt AC 26 ms 744 KB
1
in13.txt AC 24 ms 696 KB
1
in14.txt AC 17 ms 652 KB
1
in15.txt AC 20 ms 608 KB
1
in16.txt AC 26 ms 560 KB
1
sample01.txt AC 16 ms 516 KB
1
sample02.txt AC 20 ms 604 KB
1