QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#228342 | #7638. Lake | ucup-team987# | WA | 0ms | 3704kb | C++23 | 2.4kb | 2023-10-28 13:22:42 | 2023-10-28 13:22:44 |
Judging History
answer
#if __INCLUDE_LEVEL__ == 0
#include __BASE_FILE__
namespace {
void solve() {
int n, m;
scan(n, m);
print(max({div_ceil(n, 4), div_ceil(n, 4), div_ceil(n + m, 7)}) * 2 - 1);
}
} // namespace
int main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
solve();
}
#else // __INCLUDE_LEVEL__
#include <bits/stdc++.h>
using namespace std;
template <class T>
T div_floor(T x, T y) {
return x / y - ((x ^ y) < 0 && x % y);
}
template <class T>
T div_ceil(T x, T y) {
return x / y + (0 <= (x ^ y) && x % y);
}
namespace std {
template <class T1, class T2>
istream& operator>>(istream& is, pair<T1, T2>& p) {
return is >> p.first >> p.second;
}
template <class... Ts>
istream& operator>>(istream& is, tuple<Ts...>& t) {
return apply([&is](auto&... xs) -> istream& { return (is >> ... >> xs); }, t);
}
template <class R, enable_if_t<!is_convertible_v<R, string>>* = nullptr>
auto operator>>(istream& is, R&& r) -> decltype(is >> *begin(r)) {
for (auto&& e : r) {
is >> e;
}
return is;
}
template <class T1, class T2>
ostream& operator<<(ostream& os, const pair<T1, T2>& p) {
return os << p.first << ' ' << p.second;
}
template <class... Ts>
ostream& operator<<(ostream& os, const tuple<Ts...>& t) {
auto f = [&os](const auto&... xs) -> ostream& {
[[maybe_unused]] auto sep = "";
((os << exchange(sep, " ") << xs), ...);
return os;
};
return apply(f, t);
}
template <class R, enable_if_t<!is_convertible_v<R, string_view>>* = nullptr>
auto operator<<(ostream& os, R&& r) -> decltype(os << *begin(r)) {
auto sep = "";
for (auto&& e : r) {
os << exchange(sep, " ") << e;
}
return os;
}
} // namespace std
template <class... Ts>
void scan(Ts&&... xs) {
(cin >> ... >> xs);
}
template <class... Ts>
void print(Ts&&... xs) {
cout << tie(xs...) << '\n';
}
inline auto rep(int l, int r) { return views::iota(min(l, r), r); }
inline auto rep(int n) { return rep(0, n); }
inline auto rep1(int l, int r) { return rep(l, r + 1); }
inline auto rep1(int n) { return rep(1, n + 1); }
inline auto per(int l, int r) { return rep(l, r) | views::reverse; }
inline auto per(int n) { return per(0, n); }
inline auto per1(int l, int r) { return per(l, r + 1); }
inline auto per1(int n) { return per(1, n + 1); }
inline auto len = ranges::ssize;
#endif // __INCLUDE_LEVEL__
详细
Test #1:
score: 100
Accepted
time: 0ms
memory: 3608kb
input:
1 1
output:
1
result:
ok single line: '1'
Test #2:
score: 0
Accepted
time: 0ms
memory: 3676kb
input:
1 4
output:
1
result:
ok single line: '1'
Test #3:
score: 0
Accepted
time: 0ms
memory: 3640kb
input:
5 5
output:
3
result:
ok single line: '3'
Test #4:
score: 0
Accepted
time: 0ms
memory: 3704kb
input:
4 4
output:
3
result:
ok single line: '3'
Test #5:
score: 0
Accepted
time: 0ms
memory: 3616kb
input:
3 4
output:
1
result:
ok single line: '1'
Test #6:
score: 0
Accepted
time: 0ms
memory: 3548kb
input:
8 12
output:
5
result:
ok single line: '5'
Test #7:
score: 0
Accepted
time: 0ms
memory: 3680kb
input:
12 8
output:
5
result:
ok single line: '5'
Test #8:
score: -100
Wrong Answer
time: 0ms
memory: 3628kb
input:
8182 520051
output:
150923
result:
wrong answer 1st lines differ - expected: '260025', found: '150923'