QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#667254 | #7159. Candy | Khiem# | 0 | 0ms | 3820kb | C++14 | 433b | 2024-10-22 21:53:14 | 2024-10-22 21:53:43 |
answer
#include <bits/stdc++.h>
typedef long long ll;
using namespace std;
const int N = 105;
ll T, a[N];
signed main(){
int n, F; scanf("%d %d %lld", &n, &F, &T);
ll tot = 0;
for(int i = 0; i<n; ++i){
scanf("%lld", a+i);
tot += a[i];
}
if(tot < T){ puts("NO"); return 0;}
ll tmp = 0;
for(int i = 0; i<F; ++i) tmp += a[i];
if(tmp >= T){ puts("0"); return 0;}
puts("1");
}
详细
Subtask #1:
score: 0
Wrong Answer
Test #1:
score: 6
Accepted
time: 0ms
memory: 3708kb
input:
1 1 7 7
output:
0
result:
ok single line: '0'
Test #2:
score: 6
Accepted
time: 0ms
memory: 3820kb
input:
1 1 8 7
output:
NO
result:
ok single line: 'NO'
Test #3:
score: 0
Wrong Answer
time: 0ms
memory: 3744kb
input:
2 1 7 5 6
output:
1
result:
wrong answer 1st lines differ - expected: 'NO', found: '1'
Subtask #2:
score: 0
Wrong Answer
Test #9:
score: 0
Wrong Answer
time: 0ms
memory: 3796kb
input:
100 50 50 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0 1 1 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
output:
1
result:
wrong answer 1st lines differ - expected: '1805', found: '1'
Subtask #3:
score: 0
Skipped
Dependency #1:
0%
Subtask #4:
score: 0
Skipped
Dependency #1:
0%
Subtask #5:
score: 0
Skipped
Dependency #1:
0%