QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#279997 | #7779. Swiss Stage | ucup-team1516# | AC ✓ | 0ms | 3804kb | C++17 | 1.4kb | 2023-12-09 13:13:55 | 2023-12-09 13:13:56 |
Judging History
answer
#pragma GCC optimize("Ofast")
#include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef unsigned long long int ull;
mt19937_64 rng(chrono::steady_clock::now().time_since_epoch().count());
ll myRand(ll B) {
return (ull)rng() % B;
}
inline double time() {
return static_cast<long double>(chrono::duration_cast<chrono::nanoseconds>(chrono::steady_clock::now().time_since_epoch()).count()) * 1e-9;
}
int main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
int x,y; cin >> x >> y;
int res = 0;
while (x <= 2) {
if (x == 0 and y == 0) {
x += 1;
res += 1;
}
else if (x == 1 and y == 0) {
x += 1;
res += 1;
}
else if (x == 0 and y == 1) {
x += 1;
res += 1;
}
else if (x == 2 and y == 0) {
x += 1;
res += 2;
}
else if (x == 1 and y == 1) {
x += 1;
res += 1;
}
else if (x == 0 and y == 2) {
x += 1;
res += 2;
}
else if (x == 2 and y == 1) {
x += 1;
res += 2;
}
else if (x == 1 and y == 2) {
x += 1;
res += 2;
}
else {
x += 2;
res += 2;
}
}
cout << res << endl;
}
详细
Test #1:
score: 100
Accepted
time: 0ms
memory: 3552kb
input:
0 1
output:
4
result:
ok 1 number(s): "4"
Test #2:
score: 0
Accepted
time: 0ms
memory: 3672kb
input:
1 2
output:
4
result:
ok 1 number(s): "4"
Test #3:
score: 0
Accepted
time: 0ms
memory: 3600kb
input:
0 0
output:
4
result:
ok 1 number(s): "4"
Test #4:
score: 0
Accepted
time: 0ms
memory: 3672kb
input:
0 2
output:
6
result:
ok 1 number(s): "6"
Test #5:
score: 0
Accepted
time: 0ms
memory: 3800kb
input:
1 0
output:
3
result:
ok 1 number(s): "3"
Test #6:
score: 0
Accepted
time: 0ms
memory: 3556kb
input:
1 1
output:
3
result:
ok 1 number(s): "3"
Test #7:
score: 0
Accepted
time: 0ms
memory: 3732kb
input:
2 0
output:
2
result:
ok 1 number(s): "2"
Test #8:
score: 0
Accepted
time: 0ms
memory: 3804kb
input:
2 1
output:
2
result:
ok 1 number(s): "2"
Test #9:
score: 0
Accepted
time: 0ms
memory: 3600kb
input:
2 2
output:
2
result:
ok 1 number(s): "2"
Extra Test:
score: 0
Extra Test Passed