编号 题目 状态 分数 总时间 内存 代码 / 答案文件 提交者 提交时间
#48987 #1254. 含金量 Accepted 100 40 ms 440 K C++ 11 / 3.2 K feicheng 2021-05-20 0:37:24
显示原始代码
/*
If you are full of hope,you will be invincible.
Writer:feicheng
Problem Number:
*/
#include <cstdio>
#include <ctime>
#include <algorithm>
#include <cstring>
#include <iostream>
#include <random>
#include <ext/pb_ds/priority_queue.hpp>
#include <ext/pb_ds/hash_policy.hpp>
std::mt19937 rnd(time(nullptr) + (unsigned long long)(new char)+20051107);
std::mt19937_64 Rnd(time(nullptr) + (unsigned long long)(new char)+20060923);
constexpr char endl = '\n';
namespace hpy {
constexpr int HL = 1 << 19;
char buf[HL], buff[HL], *t1 = buf, *t2 = buf, *T = buff;
#ifdef feicheng
#define getc() getchar()
#else
#define getc() (t1 == t2 && (t2 = (t1 = buf) + fread(buf, 1, HL, stdin), t1 == t2) ? EOF : *t1++)
#endif
inline void flush() { fwrite(buff, 1, T - buff, stdout), T = buff; }
inline void putc(const char ch) { T == buff + HL ? flush(), *T++ = ch : *T++ = ch; }
struct Read {
    template <typename Tp>
    inline Read &operator>>(Tp &x) {
        char ch = getc();
        int f = 0;
        for (; ch < '0' || ch > '9'; ch = getc()) f = (ch == '-') ? 1 : 0;
        x = 0;
        for (; ch >= '0' && ch <= '9'; ch = getc()) x = (x << 3) + (x << 1) + (ch ^ 48);
        return x = f ? -x : x, *this;
    }
    inline Read &operator>>(char &c) {
        for (c = getc(); c == ' ' || c == '\n'; c = getc())
            ;
        return *this;
    }
    inline Read &operator>>(char *str) {
        int len = 0;
        char ch = getc();
        while (ch == ' ' || ch == '\n') ch = getc();
        while (ch != ' ' && ch != '\n' && ch != '\r' && ch != EOF) str[len++] = ch, ch = getc();
        return str[len] = '\0', *this;
    }
} cin;
struct Write {
    template <typename Tp>
    inline Write &operator<<(Tp x) {
        if (!x)
            return putc('0'), *this;
        if (x < 0)
            putc('-'), x = -x;
        int stk[19], top = 0;
        while (x) stk[++top] = x % 10, x /= 10;
        while (top) putc(stk[top--] + '0');
        return *this;
    }
    inline Write &operator<<(const char ch) { return putc(ch), *this; }
    inline Write &operator<<(char *str) {
        int cur = 0;
        while (str[cur]) putc(str[cur++]);
        return *this;
    }
    inline Write &operator<<(const char *str) {
        int cur = 0;
        while (str[cur]) putc(str[cur++]);
        return *this;
    }
} cout;
template <typename Tp>
inline Tp max(const Tp &a, const Tp &b) {
    return a > b ? a : b;
}
template <typename Tp, typename... Rst>
Tp max(const Tp &a, const Rst... rst) {
    return max(a, max(rst...));
}
template <typename Tp>
inline Tp min(const Tp &a, const Tp &b) {
    return a < b ? a : b;
}
template <typename Tp, typename... Rst>
Tp min(const Tp &a, const Rst... rst) {
    return min(a, min(rst...));
}
}  // namespace hpy
using hpy::cin;
using hpy::cout;
using hpy::max;
using hpy::min;

int x, y, z;

namespace hl {

inline void fc() {
    cin >> x >> y >> z;
    if (y * z % x == 0)
        cout << y * z / x - 1 << endl;
    else
        cout << y * z / x << endl;
}

}  // namespace hl

int main(int argc, const char **argv) {
#ifdef feicheng
    freopen("wild.in", "r", stdin);
    freopen("wild.out", "w", stdout);
#endif
    hl::fc();
#ifdef feicheng
    std::cout << "your program costs " << (double)clock() / CLOCKS_PER_SEC << " s" << std::endl;
#endif
    return hpy::flush(), 0;
}
子任务 #1
Accepted
得分:100
测试点 #1
Accepted
得分:100
用时:2 ms
内存:340 KiB

输入文件(1.in

5323 7433 5170

答案文件(1.out

7219

用户输出

7219

系统信息

Exited with return code 0
测试点 #2
Accepted
得分:100
用时:2 ms
内存:376 KiB

输入文件(2.in

4800 183 6007

答案文件(2.out

229

用户输出

229

系统信息

Exited with return code 0
测试点 #3
Accepted
得分:100
用时:2 ms
内存:436 KiB

输入文件(3.in

7735 1837 8289

答案文件(3.out

1968

用户输出

1968

系统信息

Exited with return code 0
测试点 #4
Accepted
得分:100
用时:2 ms
内存:376 KiB

输入文件(4.in

9954 5996 4808

答案文件(4.out

2896

用户输出

2896

系统信息

Exited with return code 0
测试点 #5
Accepted
得分:100
用时:2 ms
内存:376 KiB

输入文件(5.in

5408 5530 302

答案文件(5.out

308

用户输出

308

系统信息

Exited with return code 0
测试点 #6
Accepted
得分:100
用时:2 ms
内存:384 KiB

输入文件(6.in

7679 5353 2704

答案文件(6.out

1884

用户输出

1884

系统信息

Exited with return code 0
测试点 #7
Accepted
得分:100
用时:2 ms
内存:376 KiB

输入文件(7.in

1094 8863 3541

答案文件(7.out

28687

用户输出

28687

系统信息

Exited with return code 0
测试点 #8
Accepted
得分:100
用时:2 ms
内存:376 KiB

输入文件(8.in

89 1791 1714

答案文件(8.out

34491

用户输出

34491

系统信息

Exited with return code 0
测试点 #9
Accepted
得分:100
用时:2 ms
内存:392 KiB

输入文件(9.in

2699 1994 6884

答案文件(9.out

5085

用户输出

5085

系统信息

Exited with return code 0
测试点 #10
Accepted
得分:100
用时:2 ms
内存:376 KiB

输入文件(10.in

8944 9338 8676

答案文件(10.out

9058

用户输出

9058

系统信息

Exited with return code 0
测试点 #11
Accepted
得分:100
用时:2 ms
内存:376 KiB

输入文件(11.in

1895 7759 1895

答案文件(11.out

7758

用户输出

7758

系统信息

Exited with return code 0
测试点 #12
Accepted
得分:100
用时:2 ms
内存:376 KiB

输入文件(12.in

1804 3078 3608

答案文件(12.out

6155

用户输出

6155

系统信息

Exited with return code 0
测试点 #13
Accepted
得分:100
用时:2 ms
内存:324 KiB

输入文件(13.in

2825 3093 2825

答案文件(13.out

3092

用户输出

3092

系统信息

Exited with return code 0
测试点 #14
Accepted
得分:100
用时:2 ms
内存:376 KiB

输入文件(14.in

7770 9069 7770

答案文件(14.out

9068

用户输出

9068

系统信息

Exited with return code 0
测试点 #15
Accepted
得分:100
用时:2 ms
内存:376 KiB

输入文件(15.in

1301 4515 2602

答案文件(15.out

9029

用户输出

9029

系统信息

Exited with return code 0
测试点 #16
Accepted
得分:100
用时:2 ms
内存:376 KiB

输入文件(16.in

9182 8425 9182

答案文件(16.out

8424

用户输出

8424

系统信息

Exited with return code 0
测试点 #17
Accepted
得分:100
用时:2 ms
内存:376 KiB

输入文件(17.in

5085 4942 5085

答案文件(17.out

4941

用户输出

4941

系统信息

Exited with return code 0
测试点 #18
Accepted
得分:100
用时:2 ms
内存:384 KiB

输入文件(18.in

8618 40 8618

答案文件(18.out

39

用户输出

39

系统信息

Exited with return code 0
测试点 #19
Accepted
得分:100
用时:2 ms
内存:376 KiB

输入文件(19.in

6914 5640 6914

答案文件(19.out

5639

用户输出

5639

系统信息

Exited with return code 0
测试点 #20
Accepted
得分:100
用时:2 ms
内存:440 KiB

输入文件(20.in

7789 1824 7789

答案文件(20.out

1823

用户输出

1823

系统信息

Exited with return code 0