QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#672824#7779. Swiss Stageyeah14#AC ✓1ms3632kbC++17939b2024-10-24 19:21:112024-10-24 19:21:12

Judging History

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

  • [2024-10-24 19:21:12]
  • 评测
  • 测评结果:AC
  • 用时:1ms
  • 内存:3632kb
  • [2024-10-24 19:21:11]
  • 提交

answer

#include<bits/stdc++.h>
using namespace std;
#define int long long
const int N = 1e5 + 5;
// a[32];
using PII = pair<int, int>;
const int INF = 0x3f3f3f3f3f3f;
map<string, vector<PII>>mp;
map<int, string>mpp;
int a[N];
int ans[N];
int ww[N];
int st[N],top=0;
const int mod = 998244353;
bool cmp(PII a, PII b) {
	return a.first > b.first;
}
bool cmp2(int a, int b) {
	return a > b;
}
int __gcd(int x, int y) {
	if (y == 0)return x;
	else return __gcd(y, x % y);
}
int fp(int a, int x) {
	int ans = 1;
	while (x) {
		if (x & 1)ans *= a;
		ans %= mod;
		a *= a;
		a %= mod;
		x >>= 1;
	}
	return ans%mod;
}


void solve() {
	int x, y; cin >> x >> y;
	int ans = 0;
	if (x == 2 || y == 2) {
		ans = 2 * (3 - x);
	}
	else {
		ans = (2 - x) + 2;
	}
	cout << ans << endl;
}



signed main() {
	ios::sync_with_stdio(0);
	cin.tie(0), cout.tie(0);
	int t=1;
	//cin >> t;
	while (t--)solve();
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

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

input:

0 1

output:

4

result:

ok 1 number(s): "4"

Test #2:

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

input:

1 2

output:

4

result:

ok 1 number(s): "4"

Test #3:

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

input:

0 0

output:

4

result:

ok 1 number(s): "4"

Test #4:

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

input:

0 2

output:

6

result:

ok 1 number(s): "6"

Test #5:

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

input:

1 0

output:

3

result:

ok 1 number(s): "3"

Test #6:

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

input:

1 1

output:

3

result:

ok 1 number(s): "3"

Test #7:

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

input:

2 0

output:

2

result:

ok 1 number(s): "2"

Test #8:

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

input:

2 1

output:

2

result:

ok 1 number(s): "2"

Test #9:

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

input:

2 2

output:

2

result:

ok 1 number(s): "2"

Extra Test:

score: 0
Extra Test Passed