QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#667295 | #7159. Candy | Khiem# | 0 | 0ms | 3864kb | C++14 | 403b | 2024-10-22 22:04:46 | 2024-10-22 22:05:02 |
answer
#include <bits/stdc++.h>
typedef long long ll;
using namespace std;
const int N = 105;
ll a[N];
signed main(){
int n, F; ll T; scanf("%d %d %lld", &n, &F, &T);
ll tot = 0;
for(int i = 0; i<n; ++i) scanf("%d", a+i), tot += a[i];
if(tot < T){ printf("NO"); return 0;}
tot = 0;
for(int i = 0; i<F; ++i) tot += a[i];
if(tot < T) printf("1");
else printf("0");
}
Details
Tip: Click on the bar to expand more detailed information
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: 3792kb
input:
1 1 8 7
output:
NO
result:
ok single line: 'NO'
Test #3:
score: 0
Wrong Answer
time: 0ms
memory: 3864kb
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: 3708kb
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%