QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#510836#7852. Mini-Tetris 3023fengAC ✓0ms3704kbC++20935b2024-08-09 13:34:332024-08-09 13:34:34

Judging History

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

  • [2024-08-09 13:34:34]
  • 评测
  • 测评结果:AC
  • 用时:0ms
  • 内存:3704kb
  • [2024-08-09 13:34:33]
  • 提交

answer

#include <bits/stdc++.h>
using namespace std;

#define x first
#define y second
#define IOS ios::sync_with_stdio(false),cin.tie(0),cout.tie(0)
#define int long long
#define mp(x, y) make_pair(x, y)
#define eb(...) emplace_back(__VA_ARGS__)
#define fro(i, x, y) for (int i = (x); i <= (y); i++)
#define pre(i, x, y) for (int i = (x); i >= (y); i--)

using PII = pair<int, int>;

const double pi = acos(-1.0);
const int N = 1e6 + 10;
const int mod = 998244353;

void solve()
{
    int a,b,c;
    cin>>a>>b>>c;
    int ans=0;
    ans+=a*2;
    int temp=0;
    if(c<=1);
    else
    {
        c=c/2;
        if(b==0)ans+=c*3;
        else {
        temp=min(c,b);
        ans+=5*temp+2*(b-temp);
        if(c>b)ans+=(c-b)*3;
        }
    }
    cout<<ans<<endl;
    return ;
}
signed main() {
    IOS;
    int T=1;
    //cin>>T;
    while(T--)
    {
        solve();
    }
    return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

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

input:

2 2 2

output:

11

result:

ok single line: '11'

Test #2:

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

input:

1 1 1

output:

2

result:

ok single line: '2'

Test #3:

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

input:

0 0 0

output:

0

result:

ok single line: '0'

Test #4:

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

input:

0 0 1

output:

0

result:

ok single line: '0'

Test #5:

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

input:

0 2 2

output:

7

result:

ok single line: '7'

Test #6:

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

input:

0 2 3

output:

7

result:

ok single line: '7'

Test #7:

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

input:

0 2 4

output:

10

result:

ok single line: '10'

Test #8:

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

input:

20 20 20

output:

110

result:

ok single line: '110'

Test #9:

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

input:

20 20 19

output:

107

result:

ok single line: '107'

Test #10:

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

input:

20 19 20

output:

108

result:

ok single line: '108'

Test #11:

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

input:

20 19 19

output:

105

result:

ok single line: '105'

Test #12:

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

input:

19 20 20

output:

108

result:

ok single line: '108'

Test #13:

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

input:

19 20 19

output:

105

result:

ok single line: '105'

Test #14:

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

input:

19 19 20

output:

106

result:

ok single line: '106'

Test #15:

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

input:

0 0 2

output:

3

result:

ok single line: '3'

Test #16:

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

input:

19 19 19

output:

103

result:

ok single line: '103'

Test #17:

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

input:

50 50 50

output:

275

result:

ok single line: '275'

Test #18:

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

input:

50 50 49

output:

272

result:

ok single line: '272'

Test #19:

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

input:

50 49 50

output:

273

result:

ok single line: '273'

Test #20:

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

input:

50 49 49

output:

270

result:

ok single line: '270'

Test #21:

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

input:

49 50 50

output:

273

result:

ok single line: '273'

Test #22:

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

input:

49 50 49

output:

270

result:

ok single line: '270'

Test #23:

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

input:

49 49 50

output:

271

result:

ok single line: '271'

Test #24:

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

input:

49 49 49

output:

268

result:

ok single line: '268'

Test #25:

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

input:

0 0 50

output:

75

result:

ok single line: '75'

Test #26:

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

input:

0 0 3

output:

3

result:

ok single line: '3'

Test #27:

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

input:

0 1 50

output:

77

result:

ok single line: '77'

Test #28:

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

input:

0 2 50

output:

79

result:

ok single line: '79'

Test #29:

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

input:

0 50 0

output:

0

result:

ok single line: '0'

Test #30:

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

input:

0 50 1

output:

0

result:

ok single line: '0'

Test #31:

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

input:

0 50 2

output:

103

result:

ok single line: '103'

Test #32:

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

input:

0 50 3

output:

103

result:

ok single line: '103'

Test #33:

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

input:

0 0 4

output:

6

result:

ok single line: '6'

Test #34:

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

input:

0 1 1

output:

0

result:

ok single line: '0'

Test #35:

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

input:

0 1 2

output:

5

result:

ok single line: '5'

Test #36:

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

input:

0 1 3

output:

5

result:

ok single line: '5'

Test #37:

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

input:

0 1 4

output:

8

result:

ok single line: '8'

Test #38:

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

input:

0 2 1

output:

0

result:

ok single line: '0'