Submission #1386231
Source Code Expand
import java.io.BufferedReader; import java.io.InputStreamReader; public class Main { public static void main(String[] args) throws Exception{ BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String[] s = br.readLine().split(" "); int l = Integer.parseInt(s[0]), h = Integer.parseInt(s[1]); int n = Integer.parseInt(br.readLine()); System.out.println(n); for(int i = 0; i < n; i++){ int a = Integer.parseInt(br.readLine()); if(a > h){ System.out.println(-1); }else{ System.out.println(Math.max(l - a, 0)); } } } }
Submission Info
Submission Time | |
---|---|
Task | B - 運動管理 |
User | mosmos21 |
Language | Java8 (OpenJDK 1.8.0) |
Score | 0 |
Code Size | 707 Byte |
Status | WA |
Exec Time | 77 ms |
Memory | 23252 KB |
Judge Result
Set Name | Sample | All | ||||
---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 0 / 100 | ||||
Status |
|
|
Set Name | Test Cases |
---|---|
Sample | sample-01.txt, sample-02.txt |
All | sample-01.txt, sample-02.txt, test-01.txt, test-02.txt, test-03.txt, test-04.txt, test-05.txt, test-06.txt, test-07.txt, test-08.txt, test-09.txt, test-10.txt, test-11.txt, test-12.txt, test-13.txt, test-14.txt, test-15.txt, test-16.txt, test-17.txt, test-18.txt, test-19.txt, test-20.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
sample-01.txt | WA | 71 ms | 21076 KB |
sample-02.txt | WA | 72 ms | 20948 KB |
test-01.txt | WA | 72 ms | 19284 KB |
test-02.txt | WA | 70 ms | 21204 KB |
test-03.txt | WA | 73 ms | 20564 KB |
test-04.txt | WA | 71 ms | 21204 KB |
test-05.txt | WA | 73 ms | 19284 KB |
test-06.txt | WA | 77 ms | 20820 KB |
test-07.txt | WA | 73 ms | 19412 KB |
test-08.txt | WA | 74 ms | 19028 KB |
test-09.txt | WA | 77 ms | 23252 KB |
test-10.txt | WA | 74 ms | 18644 KB |
test-11.txt | WA | 73 ms | 23124 KB |
test-12.txt | WA | 73 ms | 19924 KB |
test-13.txt | WA | 75 ms | 23124 KB |
test-14.txt | WA | 72 ms | 19412 KB |
test-15.txt | WA | 74 ms | 19796 KB |
test-16.txt | WA | 74 ms | 21204 KB |
test-17.txt | WA | 73 ms | 21076 KB |
test-18.txt | WA | 71 ms | 17876 KB |
test-19.txt | WA | 73 ms | 19156 KB |
test-20.txt | WA | 73 ms | 20436 KB |