結果
問題 |
No.1663 Maximum Remainder
|
ユーザー |
![]() |
提出日時 | 2021-09-16 10:30:45 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 2,069 bytes |
コンパイル時間 | 1,212 ms |
コンパイル使用メモリ | 158,912 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-06-29 14:18:03 |
合計ジャッジ時間 | 1,897 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 12 WA * 1 |
ソースコード
#include <bits/stdc++.h> using namespace std; #define F first #define S second #define ER erase #define IS insert #define PI acos(-1) #define PB pop_back #define MP make_pair #define MT make_tuple #define LB lower_bound #define UB upper_bound #define EB emplace_back #define lowbit(x) (x & -x) #define SZ(x) ((int)x.size()) #define ALL(x) x.begin(), x.end() #define RALL(x) x.rbegin(), x.rend() #define SOS ios::sync_with_stdio(false);cin.tie(0);cout.tie(0);cout<<fixed<<setprecision(10) typedef long long LL; typedef vector<LL> VL; typedef vector<int> VI; typedef vector<bool> VB; typedef pair<LL, LL> PLL; typedef vector<string> VS; typedef vector<double> VD; typedef pair<int, int> PII; typedef unsigned long long ULL; typedef pair<double, double> PDD; typedef tuple<int, int, int> TIII; typedef vector<pair<LL, LL> > VPLL; typedef vector<pair<int, int> > VPII; template <typename A> using VE = vector<A>; template <typename A> using USET = unordered_set<A>; template <typename A> using HEAP = priority_queue<A>; template <typename A, typename B> using PA = pair<A, B>; template <typename A, typename B> using UMAP = unordered_map<A, B>; template <typename A> using RHEAP = priority_queue<A, vector<A>, greater<A> >; template <typename A> A MAX(const A &a) { return a; } template <typename A> A MIN(const A &a) { return a; } template <typename A> A MAX(const A *a, const A *b) { return *max_element(a, b); } template <typename A> A MIN(const A *a, const A *b) { return *min_element(a, b); } template <typename A, typename... B> A MAX(const A &a, const B&... b) { return max(a, MAX(b...)); } template <typename A, typename... B> A MIN(const A &a, const B&... b) { return min(a, MIN(b...)); } template <typename A, typename B = typename std::iterator_traits<A>::value_type> B MAX(A a, A b) { return *max_element(a, b); } template <typename A, typename B = typename std::iterator_traits<A>::value_type> B MIN(A a, A b) { return *min_element(a, b); } int main(){ SOS; int a,b,c,d,m; cin>>a>>b>>c>>d>>m; int ans=min(m-1,b+d); cout<<ans<<'\n'; }