Submission #2235161
Source Code Expand
import java.util.Scanner; public class Main { public static void main(String[] args) { final Scanner sc = new Scanner(System.in); int n = sc.nextInt(),p = sc.nextInt(),gu=0,ki=0; for(int i=0;i<n;i++) if(sc.nextInt()%2==0)gu++;else ki++; if(ki==0) System.out.println(p==0?1L<<(n):0); else System.out.println(1L<<(n-1)); } }
Submission Info
Submission Time | |
---|---|
Task | A - Biscuits |
User | naoppy |
Language | Java8 (OpenJDK 1.8.0) |
Score | 200 |
Code Size | 347 Byte |
Status | AC |
Exec Time | 98 ms |
Memory | 21716 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, sample4.txt |
All | sample1.txt, sample2.txt, sample3.txt, sample4.txt, in1.txt, in2.txt, in3.txt, in4.txt, in5.txt, in6.txt, in7.txt, in8.txt, sample1.txt, sample2.txt, sample3.txt, sample4.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
in1.txt | AC | 98 ms | 19668 KB |
in2.txt | AC | 94 ms | 19924 KB |
in3.txt | AC | 96 ms | 17748 KB |
in4.txt | AC | 95 ms | 21712 KB |
in5.txt | AC | 97 ms | 18900 KB |
in6.txt | AC | 96 ms | 20560 KB |
in7.txt | AC | 96 ms | 19924 KB |
in8.txt | AC | 95 ms | 19796 KB |
sample1.txt | AC | 91 ms | 19796 KB |
sample2.txt | AC | 93 ms | 21716 KB |
sample3.txt | AC | 93 ms | 18644 KB |
sample4.txt | AC | 96 ms | 19796 KB |