QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#374812 | #7638. Lake | liuzhenhao09# | WA | 1ms | 3916kb | C++20 | 369b | 2024-04-02 18:35:00 | 2024-04-02 18:35:04 |
Judging History
answer
#include<bits/stdc++.h>
#define int long long
using namespace std;
int n,m;
signed main(){
scanf("%lld %lld",&n,&m);
int ans = 0;
while(n && m){
ans++;
for(int i = 1; i <= 3; i++){
if(n && m) n--,m--;
else if(n) n--;
else if(m) m--;
}
if(!n && !m) break;
if(n > m) n--;
else m--;
}
printf("%lld",2 * ans - 1);
return 0;
}
详细
Test #1:
score: 100
Accepted
time: 0ms
memory: 3716kb
input:
1 1
output:
1
result:
ok single line: '1'
Test #2:
score: 0
Accepted
time: 1ms
memory: 3916kb
input:
1 4
output:
1
result:
ok single line: '1'
Test #3:
score: 0
Accepted
time: 0ms
memory: 3788kb
input:
5 5
output:
3
result:
ok single line: '3'
Test #4:
score: -100
Wrong Answer
time: 0ms
memory: 3868kb
input:
4 4
output:
1
result:
wrong answer 1st lines differ - expected: '3', found: '1'