QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#232410#7638. Lakemendicillin2#WA 1ms3520kbC++17325b2023-10-30 13:20:232023-10-30 13:20:23

Judging History

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

  • [2023-10-30 13:20:23]
  • 评测
  • 测评结果:WA
  • 用时:1ms
  • 内存:3520kb
  • [2023-10-30 13:20:23]
  • 提交

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'