QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#369691 | #8284. Cats and Fish | SolitaryDream# | WA | 0ms | 3644kb | C++17 | 523b | 2024-03-28 16:28:51 | 2024-03-28 16:28:52 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
int m, n, x;
int main() {
ios::sync_with_stdio(0);
cin.tie(0);
cin >> m >> n >> x;
int comp = 0, incomp = 0;
for (int i = 1, ci; i <= n; ++i) {
cin >> ci;
if (x % ci == 0) {
comp += x / ci;
} else {
comp += x / ci;
incomp += 1;
}
}
int p = max(0, m - comp - incomp);
int q = max(min(incomp, m - comp), 0);
cout << p << ' ' << q << endl;
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 0ms
memory: 3644kb
input:
2 1 1 1
output:
1 0
result:
ok 2 number(s): "1 0"
Test #2:
score: 0
Accepted
time: 0ms
memory: 3616kb
input:
8 3 5 1 3 4
output:
0 1
result:
ok 2 number(s): "0 1"
Test #3:
score: 0
Accepted
time: 0ms
memory: 3544kb
input:
4 5 1 5 4 3 2 1
output:
0 3
result:
ok 2 number(s): "0 3"
Test #4:
score: 0
Accepted
time: 0ms
memory: 3608kb
input:
1 1 10 1
output:
0 0
result:
ok 2 number(s): "0 0"
Test #5:
score: 0
Accepted
time: 0ms
memory: 3608kb
input:
14 3 10 1 40 50
output:
2 2
result:
ok 2 number(s): "2 2"
Test #6:
score: 0
Accepted
time: 0ms
memory: 3604kb
input:
8 2 7 12 13
output:
6 2
result:
ok 2 number(s): "6 2"
Test #7:
score: 0
Accepted
time: 0ms
memory: 3568kb
input:
1 1 1 2
output:
0 1
result:
ok 2 number(s): "0 1"
Test #8:
score: 0
Accepted
time: 0ms
memory: 3608kb
input:
12 2 11 8 3
output:
6 2
result:
ok 2 number(s): "6 2"
Test #9:
score: -100
Wrong Answer
time: 0ms
memory: 3560kb
input:
2 2 12 24 1
output:
0 0
result:
wrong answer 2nd numbers differ - expected: '1', found: '0'