QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#736562#1958. Grid Triangleucup-team5226#WA 1ms3844kbC++201.2kb2024-11-12 11:45:502024-11-12 11:45:51

Judging History

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

  • [2024-11-12 11:45:51]
  • 评测
  • 测评结果:WA
  • 用时:1ms
  • 内存:3844kb
  • [2024-11-12 11:45:50]
  • 提交

answer

#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
template <class T>
using vc = vector<T>;
template <class T>
using vvc = vc<vc<T>>;
#define ov4(a, b, c, d, name, ...) name
#define rep3(i, a, b, c) for (ll i = (a); i < (b); i += (c))
#define rep2(i, a, b) rep3(i, a, b, 1)
#define rep1(i, n) rep2(i, 0, n)
#define rep0(n) rep1(aaaaa, n)
#define rep(...) ov4(__VA_ARGS__, rep3, rep2, rep1, rep0)(__VA_ARGS__)
bool chmin(auto &a, const auto &b) { return a > b ? a = b, 1 : 0; }
bool chmax(auto &a, const auto &b) { return a < b ? a = b, 1 : 0; }
ll dp[2][2][1000000 + 10];
ll res[2][2][1000000 + 10];
void solve() {
    vector<ll> in(3);
    rep(i, 3) cin >> in[i];
    sort(in.begin(), in.end());
    reverse(in.begin(), in.end());
    ll x = in[0], y = in[1], z = in[2];
    ll ans = 0;
    rep(i, 1, y + 1) {
        if (i <= z)
            ans += min(z, (i - 1) / 2) * 48;
        else
            ans += min(z, (i - 1) / 2) * 16;
    }
    cout << ans << endl;
}
int main() {
    cin.tie(nullptr);
    ios::sync_with_stdio(false);
    cout << fixed << setprecision(20);
    ll t = 1;
    // cin >> t;
    for (int i = 1; i <= t; i++) solve();
}

詳細信息

Test #1:

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

input:

1 1 4

output:

0

result:

ok single line: '0'

Test #2:

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

input:

1 1 5

output:

0

result:

ok single line: '0'

Test #3:

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

input:

1 2 6

output:

0

result:

ok single line: '0'

Test #4:

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

input:

1 2 7

output:

0

result:

ok single line: '0'

Test #5:

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

input:

2 2 8

output:

0

result:

ok single line: '0'

Test #6:

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

input:

2 3 9

output:

16

result:

ok single line: '16'

Test #7:

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

input:

2 3 10

output:

16

result:

ok single line: '16'

Test #8:

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

input:

2 3 11

output:

16

result:

ok single line: '16'

Test #9:

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

input:

3 4 12

output:

64

result:

ok single line: '64'

Test #10:

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

input:

3 4 13

output:

64

result:

ok single line: '64'

Test #11:

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

input:

3 4 14

output:

64

result:

ok single line: '64'

Test #12:

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

input:

3 5 15

output:

96

result:

wrong answer 1st lines differ - expected: '80', found: '96'