QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#817632#2362. Contest Strugglesucup-team3723#AC ✓1ms3884kbC++17424b2024-12-17 08:55:582024-12-17 08:55:58

Judging History

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

  • [2024-12-17 08:55:58]
  • 评测
  • 测评结果:AC
  • 用时:1ms
  • 内存:3884kb
  • [2024-12-17 08:55:58]
  • 提交

answer

#include <bits/stdc++.h>
using namespace std;
#define dbg(x) cerr << #x << ':' << (x) << endl;
#define ALL(x) x.begin(),x.end()
using ll = long long;
using ld = long double;

int main()
{
    int n, k, d, s;
    cin >> n >> k >> d >> s;
    ll tmp = d * n - k * s;
    if (tmp < 0 || 100 * (n - k) < tmp)
    {
        cout << "impossible" << endl;
    }
    else printf("%.10f\n", tmp / (double)(n - k));
}

详细

Test #1:

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

input:

319601 204125
91 83

output:

impossible

result:

ok 

Test #2:

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

input:

504174 251338
19 88

output:

impossible

result:

ok 

Test #3:

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

input:

476569 925
37 89

output:

36.8988739477

result:

ok 

Test #4:

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

input:

360918 171047
97 88

output:

impossible

result:

ok 

Test #5:

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

input:

503913 393658
18 57

output:

impossible

result:

ok 

Test #6:

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

input:

830842 701006
73 88

output:

impossible

result:

ok 

Test #7:

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

input:

375468 17258
84 38

output:

86.2162083694

result:

ok 

Test #8:

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

input:

7714 7645
55 72

output:

impossible

result:

ok 

Test #9:

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

input:

138901 100560
95 10

output:

impossible

result:

ok 

Test #10:

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

input:

856536 556401
46 61

output:

18.1924633915

result:

ok 

Test #11:

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

input:

1000000 1
100 100

output:

100.0000000000

result:

ok 

Test #12:

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

input:

2 1
0 0

output:

0.0000000000

result:

ok 

Test #13:

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

input:

1000000 1
1 0

output:

1.0000010000

result:

ok 

Test #14:

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

input:

1000000 1
0 1

output:

impossible

result:

ok 

Test #15:

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

input:

1000000 1
100 99

output:

impossible

result:

ok 

Test #16:

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

input:

1000000 1
99 100

output:

98.9999990000

result:

ok