QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#339643 | #8284. Cats and Fish | IsaacQ | WA | 0ms | 3708kb | C++14 | 711b | 2024-02-27 18:44:15 | 2024-02-27 18:44:16 |
Judging History
answer
#include<bits/stdc++.h>
#define ll long long
#define pb push_back
#define pii pair<int,int>
using namespace std;
const ll N = 1e9;
const ll mod = 998244353;
ll sum = 0;
int n, m, k;
void solve()
{
ll a[n];
for(int i=0; i<m; i++) cin >> a[i];
ll sum = 0;
ll inc = 0;
for(int i=0; i<m; i++)
{
sum += k/a[i];
if(k % a[i] != 0) inc += 1;
}
if(sum >= n) cout << "0 0";
else {
if(sum + inc >= n)
{
cout << "0 ";
cout << min(inc, n - sum) << endl;
}
else
{
cout << n - sum - inc << " " << inc << endl;
}
}
}
int main()
{
cin >> n >> m >> k;
solve();
}
詳細信息
Test #1:
score: 100
Accepted
time: 0ms
memory: 3656kb
input:
2 1 1 1
output:
1 0
result:
ok 2 number(s): "1 0"
Test #2:
score: 0
Accepted
time: 0ms
memory: 3708kb
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: 3652kb
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: 3676kb
input:
1 1 10 1
output:
0 0
result:
ok 2 number(s): "0 0"
Test #5:
score: 0
Accepted
time: 0ms
memory: 3668kb
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: 3668kb
input:
1 1 1 2
output:
0 1
result:
ok 2 number(s): "0 1"
Test #8:
score: 0
Accepted
time: 0ms
memory: 3596kb
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: 3656kb
input:
2 2 12 24 1
output:
0 0
result:
wrong answer 2nd numbers differ - expected: '1', found: '0'