QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#228190#7638. Lakeucup-team1883#WA 0ms3876kbC++17294b2023-10-28 13:08:382023-10-28 13:08:38

Judging History

你现在查看的是最新测评结果

  • [2023-10-28 13:08:38]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3876kb
  • [2023-10-28 13:08:38]
  • 提交

answer

#include <bits/stdc++.h>
using namespace std;

int main() {
  int a, b;
  scanf("%d%d", &a, &b);
  int ans = 0;
  for (; a != 0 || b != 0; ++ans) {
    a -= min(a, 4);
    b -= min(b, 4);
    if (a > b) a -= min(a, 1);
    else b -= min(b, 1);
  }
  printf("%d\n", 2 * ans - 1);
}

详细

Test #1:

score: 100
Accepted
time: 0ms
memory: 3876kb

input:

1 1

output:

1

result:

ok single line: '1'

Test #2:

score: 0
Accepted
time: 0ms
memory: 3808kb

input:

1 4

output:

1

result:

ok single line: '1'

Test #3:

score: 0
Accepted
time: 0ms
memory: 3760kb

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'