QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#280459#7779. Swiss Stageucup-team1303#AC ✓0ms3728kbC++20933b2023-12-09 16:14:582023-12-09 16:14:59

Judging History

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

  • [2023-12-09 16:14:59]
  • 评测
  • 测评结果:AC
  • 用时:0ms
  • 内存:3728kb
  • [2023-12-09 16:14:58]
  • 提交

answer

// MagicDark
#include <bits/stdc++.h>
#define debug cerr << "[" << __LINE__ << "] "
#define SZ(x) (int) x.size() - 1
#define all(x) x.begin(), x.end()
#define ms(x, y) memset(x, y, sizeof x)
#define F(i, x, y) for (int i = (x); i <= (y); i++)
#define DF(i, x, y) for (int i = (x); i >= (y); i--)
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
template <typename T> inline void chkmax(T& x, T y) {x = max(x, y);}
template <typename T> inline void chkmin(T& x, T y) {x = min(x, y);}
template <typename T> inline void read(T &x) {
	x = 0; int f = 1; char c = getchar();
	for (; !isdigit(c); c = getchar()) if (c == '-') f = -f;
	for (; isdigit(c); c = getchar()) x = (x << 1) + (x << 3) + (c ^ 48);
	x *= f;
}
signed main() {
	int x, y, ans = 0;
	read(x), read(y);
	while (x < 3) {
		if (max(x,y) == 2) ans += 2;
		else ans++;
		x++;
	}
	cout << ans;
    return 0;
}
/* why?
*/

詳細信息

Test #1:

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

input:

0 1

output:

4

result:

ok 1 number(s): "4"

Test #2:

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

input:

1 2

output:

4

result:

ok 1 number(s): "4"

Test #3:

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

input:

0 0

output:

4

result:

ok 1 number(s): "4"

Test #4:

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

input:

0 2

output:

6

result:

ok 1 number(s): "6"

Test #5:

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

input:

1 0

output:

3

result:

ok 1 number(s): "3"

Test #6:

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

input:

1 1

output:

3

result:

ok 1 number(s): "3"

Test #7:

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

input:

2 0

output:

2

result:

ok 1 number(s): "2"

Test #8:

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

input:

2 1

output:

2

result:

ok 1 number(s): "2"

Test #9:

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

input:

2 2

output:

2

result:

ok 1 number(s): "2"

Extra Test:

score: 0
Extra Test Passed