QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#352264 | #8284. Cats and Fish | berarchegas# | RE | 0ms | 3876kb | C++20 | 863b | 2024-03-13 05:54:56 | 2024-03-13 05:54:56 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
mt19937 rng((int) chrono::steady_clock::now().time_since_epoch().count());
const int MOD = 1e9 + 7;
const int MAXN = 1e3 + 5;
const ll INF = 2e18;
set<int> v[MAXN];
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
int m, n, t;
cin >> m >> n >> t;
vector<int> cat(n);
for (int &x : cat) {
cin >> x;
v[0].insert(x);
}
int cnt = n;
for (int i = 0; i < t; i++) {
for (int x : v[i]) {
if (m) {
m--;
v[i + x].insert(x);
}
else {
cnt--;
}
}
}
cnt -= (int)v[t].size();
cout << m << ' ' << cnt << '\n';
return 0;
}
詳細信息
Test #1:
score: 100
Accepted
time: 0ms
memory: 3612kb
input:
2 1 1 1
output:
1 0
result:
ok 2 number(s): "1 0"
Test #2:
score: 0
Accepted
time: 0ms
memory: 3648kb
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: 3640kb
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: 3680kb
input:
1 1 10 1
output:
0 0
result:
ok 2 number(s): "0 0"
Test #5:
score: 0
Accepted
time: 0ms
memory: 3872kb
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: 3584kb
input:
8 2 7 12 13
output:
6 2
result:
ok 2 number(s): "6 2"
Test #7:
score: 0
Accepted
time: 0ms
memory: 3844kb
input:
1 1 1 2
output:
0 1
result:
ok 2 number(s): "0 1"
Test #8:
score: 0
Accepted
time: 0ms
memory: 3592kb
input:
12 2 11 8 3
output:
6 2
result:
ok 2 number(s): "6 2"
Test #9:
score: 0
Accepted
time: 0ms
memory: 3876kb
input:
2 2 12 24 1
output:
0 1
result:
ok 2 number(s): "0 1"
Test #10:
score: 0
Accepted
time: 0ms
memory: 3716kb
input:
562 8 232 17 26 800 12 77 32 11 2
output:
368 7
result:
ok 2 number(s): "368 7"
Test #11:
score: 0
Accepted
time: 0ms
memory: 3596kb
input:
562 8 1 17 26 800 12 77 32 11 1
output:
554 7
result:
ok 2 number(s): "554 7"
Test #12:
score: -100
Runtime Error
input:
3656 13 123 1887 26 800 12 77 32 11 1 77 32 77 32 155