Submission #3265320
Source Code Expand
import java.util.Scanner; public class Main { public static void main(String args[]) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int m = sc.nextInt(); int x = sc.nextInt(); int posi = 0; int nega = 0; for(int i = 0; i < m; i++) { if(sc.nextInt() > x) { posi++; } else { nega++; } } if(posi > nega) { System.out.println(nega); } else { System.out.println(posi); } } }
Submission Info
Submission Time | |
---|---|
Task | B - Toll Gates |
User | kokiBit |
Language | Java8 (OpenJDK 1.8.0) |
Score | 200 |
Code Size | 525 Byte |
Status | AC |
Exec Time | 110 ms |
Memory | 23124 KB |
Judge Result
Set Name | Sample | All | ||||
---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 200 / 200 | ||||
Status |
|
|
Set Name | Test Cases |
---|---|
Sample | sample1.txt, sample2.txt, sample3.txt |
All | sample1.txt, sample2.txt, sample3.txt, 1.txt, 2.txt, 3.txt, 4.txt, 5.txt, 6.txt, 7.txt, 8.txt, sample1.txt, sample2.txt, sample3.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
1.txt | AC | 107 ms | 19284 KB |
2.txt | AC | 96 ms | 20052 KB |
3.txt | AC | 96 ms | 23124 KB |
4.txt | AC | 96 ms | 21204 KB |
5.txt | AC | 96 ms | 21204 KB |
6.txt | AC | 107 ms | 18640 KB |
7.txt | AC | 109 ms | 19284 KB |
8.txt | AC | 110 ms | 21716 KB |
sample1.txt | AC | 93 ms | 19284 KB |
sample2.txt | AC | 95 ms | 21076 KB |
sample3.txt | AC | 93 ms | 23124 KB |