QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#228627#7638. Lakeucup-team022#WA 1ms3568kbC++17308b2023-10-28 13:49:492023-10-28 13:49:49

Judging History

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

  • [2023-10-28 13:49:49]
  • 评测
  • 测评结果:WA
  • 用时:1ms
  • 内存:3568kb
  • [2023-10-28 13:49:49]
  • 提交

answer

#include <bits/stdc++.h>
using namespace std;
const int mod = 998244353;
int main() {
	int n, m;
	cin >> n >> m;
	if (n > m) swap(n, m);
	int t = n / 3, ans = t;
	n -= 3 * t, m -= 4 * t;
	if (m > 0) {
		ans += (m + 3) / 4;
	} else if (n > 0) {
		if (n > (-m)) ans++;
	}
	cout << ans * 2 - 1;
}

詳細信息

Test #1:

score: 100
Accepted
time: 1ms
memory: 3276kb

input:

1 1

output:

1

result:

ok single line: '1'

Test #2:

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

input:

1 4

output:

1

result:

ok single line: '1'

Test #3:

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

input:

5 5

output:

3

result:

ok single line: '3'

Test #4:

score: 0
Accepted
time: 1ms
memory: 3340kb

input:

4 4

output:

3

result:

ok single line: '3'

Test #5:

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

input:

3 4

output:

1

result:

ok single line: '1'

Test #6:

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

input:

8 12

output:

5

result:

ok single line: '5'

Test #7:

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

input:

12 8

output:

5

result:

ok single line: '5'

Test #8:

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

input:

8182 520051

output:

260025

result:

ok single line: '260025'

Test #9:

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

input:

501760 6405

output:

250879

result:

ok single line: '250879'

Test #10:

score: 0
Accepted
time: 1ms
memory: 3408kb

input:

823266 88861

output:

411633

result:

ok single line: '411633'

Test #11:

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

input:

239 145282

output:

72641

result:

ok single line: '72641'

Test #12:

score: -100
Wrong Answer
time: 0ms
memory: 3520kb

input:

699570 720193

output:

466379

result:

wrong answer 1st lines differ - expected: '405647', found: '466379'