Submission #1605083
Source Code Expand
#include <stdio.h> int main() { long long n, k, a, b; long long cnt = 1, ans = 0; scanf("%lld %lld", &n, &k); for (long long i = 0; i < n; i++) { scanf("%lld %lld", &a, &b); for (long long j = 0; j < b; j++) { if (cnt == k) { ans = a; } cnt++; if (cnt > k) break; } } printf("%lld", ans); return 0; }
Submission Info
Submission Time | |
---|---|
Task | C - Big Array |
User | yf147258369 |
Language | C (GCC 5.4.1) |
Score | 0 |
Code Size | 358 Byte |
Status | WA |
Exec Time | 2107 ms |
Memory | 128 KB |
Compile Error
./Main.c: In function ‘main’: ./Main.c:7:2: warning: ignoring return value of ‘scanf’, declared with attribute warn_unused_result [-Wunused-result] scanf("%lld %lld", &n, &k); ^ ./Main.c:10:3: warning: ignoring return value of ‘scanf’, declared with attribute warn_unused_result [-Wunused-result] scanf("%lld %lld", &a, &b); ^
Judge Result
Set Name | Sample | All | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 0 / 300 | ||||||||
Status |
|
|
Set Name | Test Cases |
---|---|
Sample | sample_01.txt, sample_02.txt |
All | sample_01.txt, sample_02.txt, subtask_1_1.txt, subtask_1_10.txt, subtask_1_11.txt, subtask_1_12.txt, subtask_1_13.txt, subtask_1_14.txt, subtask_1_15.txt, subtask_1_2.txt, subtask_1_3.txt, subtask_1_4.txt, subtask_1_5.txt, subtask_1_6.txt, subtask_1_7.txt, subtask_1_8.txt, subtask_1_9.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
sample_01.txt | AC | 0 ms | 128 KB |
sample_02.txt | AC | 1 ms | 128 KB |
subtask_1_1.txt | WA | 11 ms | 128 KB |
subtask_1_10.txt | TLE | 2103 ms | 128 KB |
subtask_1_11.txt | TLE | 2103 ms | 128 KB |
subtask_1_12.txt | TLE | 2103 ms | 128 KB |
subtask_1_13.txt | TLE | 2103 ms | 128 KB |
subtask_1_14.txt | TLE | 2103 ms | 128 KB |
subtask_1_15.txt | TLE | 2107 ms | 128 KB |
subtask_1_2.txt | WA | 25 ms | 128 KB |
subtask_1_3.txt | WA | 698 ms | 128 KB |
subtask_1_4.txt | WA | 1245 ms | 128 KB |
subtask_1_5.txt | WA | 619 ms | 128 KB |
subtask_1_6.txt | WA | 1 ms | 128 KB |
subtask_1_7.txt | WA | 1 ms | 128 KB |
subtask_1_8.txt | WA | 2 ms | 128 KB |
subtask_1_9.txt | WA | 55 ms | 128 KB |