QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#524452 | #1140. Distributing Candies | Mousa_Aboubaker# | 0 | 59ms | 10280kb | C++20 | 553b | 2024-08-19 18:00:33 | 2024-08-19 18:00:33 |
Judging History
answer
#include "candies.h"
#include <bits/stdc++.h>
using namespace std;
vector<int> distribute_candies(vector<int> c, vector<int> l, vector<int> r, vector<int> v)
{
int n = c.size();
vector<int> a(n, 0);
for(int i = 0; i < l.size(); i++)
{
a[l[i]] += v[i];
if(r[i] + 1 < n)
{
a[r[i] + 1] -= v[i];
}
}
for(int i = 1; i < n; i++)
{
a[i] += a[i - 1];
}
for(int i = 0; i < n; i++)
{
a[i] = min(c[i], a[i]);
}
return a;
}
详细
Subtask #1:
score: 0
Wrong Answer
Test #1:
score: 0
Wrong Answer
time: 1ms
memory: 4056kb
input:
lrts0z0ktpqc670i0etyqgyb45dt1dysq5ap2mzg 8 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 8 0 7 1 0 7 1 0 7 300000000 0 7 994967293 0 7 1 0 7 1000000000 0 7 1000000000 0 7 1000000000
output:
4lpv73iykswp9e3nppi3jw2qggm5dfz29yy9nzpq OK 0 0 0 0 0 0 0 0
result:
wrong answer 3rd lines differ - expected: '1000000000 1000000000 10000000...000000000 1000000000 1000000000', found: '0 0 0 0 0 0 0 0'
Subtask #2:
score: 0
Wrong Answer
Test #6:
score: 0
Wrong Answer
time: 59ms
memory: 10280kb
input:
lrts0z0ktpqc670i0etyqgyb45dt1dysq5ap2mzg 200000 11408901 370732653 37843 28 53693 15782410 103 297546 1112427 170319071 26 1 6172 11614171 431 884673599 1 3 50085 154 57 28200 145886 898969 74758 72 845768 6 69787 11 31012465 55362 253 2363145 47186217 1103 19622 594 7867 1 4299 28130 48 4689582 12 ...
output:
4lpv73iykswp9e3nppi3jw2qggm5dfz29yy9nzpq OK 87153 87153 37843 28 53693 406667 103 297546 766665 971468 26 1 6172 1257294 431 1536484 1 3 50085 154 57 28200 145886 898969 74758 72 845768 6 69787 11 3043755 55362 253 2363145 3459533 1103 19622 594 7867 1 4299 28130 48 4317336 12 431 123 4531465 4806 3...
result:
wrong answer 3rd lines differ - expected: '87153 87153 37843 28 53693 406...46468 9 1756 429030 247071 1629', found: '87153 87153 37843 28 53693 406...46468 9 1756 429030 247071 1629'
Subtask #3:
score: 0
Wrong Answer
Test #9:
score: 0
Wrong Answer
time: 1ms
memory: 4064kb
input:
lrts0z0ktpqc670i0etyqgyb45dt1dysq5ap2mzg 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000...
output:
4lpv73iykswp9e3nppi3jw2qggm5dfz29yy9nzpq OK 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -251 -251 -251 -251 -251 -251 -251 -251 -251 -251 -251 -251 -251 -251 -251 -251 -251 -251 -251 -251 -251 -251 -251 -251 -2...
result:
wrong answer 3rd lines differ - expected: '0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0', found: '0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0'
Subtask #4:
score: 0
Wrong Answer
Test #16:
score: 0
Wrong Answer
time: 0ms
memory: 3788kb
input:
lrts0z0ktpqc670i0etyqgyb45dt1dysq5ap2mzg 10 11 440 51 41 11 1 3 108 148 14 10 0 9 60 0 9 -9 0 9 -30 0 9 41 0 9 82 0 9 69 0 9 -79 0 9 -39 0 9 72 0 9 41
output:
4lpv73iykswp9e3nppi3jw2qggm5dfz29yy9nzpq OK 11 208 51 41 11 1 3 108 148 14
result:
wrong answer 3rd lines differ - expected: '11 208 51 41 11 1 3 108 143 14', found: '11 208 51 41 11 1 3 108 148 14'
Subtask #5:
score: 0
Skipped
Dependency #1:
0%