QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#232410 | #7638. Lake | mendicillin2# | WA | 1ms | 3520kb | C++17 | 325b | 2023-10-30 13:20:23 | 2023-10-30 13:20:23 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
int main() {
ios_base::sync_with_stdio(false), cin.tie(nullptr);
int n, m, s = 0;
cin >> n >> m;
while (n > 0 && m > 0) {
if (n > m) swap(n, m);
n -= 3;
m -= 4;
if (n < 0) n = 0;
if (m < 0) m = 0;
++s;
}
cout << s * 2 - 1 << endl;
return 0;
}
詳細信息
Test #1:
score: 100
Accepted
time: 1ms
memory: 3520kb
input:
1 1
output:
1
result:
ok single line: '1'
Test #2:
score: 0
Accepted
time: 0ms
memory: 3376kb
input:
1 4
output:
1
result:
ok single line: '1'
Test #3:
score: 0
Accepted
time: 0ms
memory: 3344kb
input:
5 5
output:
3
result:
ok single line: '3'
Test #4:
score: -100
Wrong Answer
time: 0ms
memory: 3376kb
input:
4 4
output:
1
result:
wrong answer 1st lines differ - expected: '3', found: '1'