Submission #1096202
Source Code Expand
#include<stdio.h> int en; int on; int N; void input(){ int i, t; en = 0; on = 0; scanf("%d", &N); for( i = 0; i < N; i++ ){ scanf("%d", &t); if( t % 2 == 0 ){ en++; }else{ on++; } } return; } int main(){ input(); if( on % 2 == 0 || (on == 1 && en == 0) ){ printf("YES\n"); }else{ printf("NO\n"); } return 0; }
Submission Info
Submission Time | |
---|---|
Task | A - Addition |
User | suzutaku_cse |
Language | C (GCC 5.4.1) |
Score | 300 |
Code Size | 374 Byte |
Status | AC |
Exec Time | 14 ms |
Memory | 128 KB |
Compile Error
./Main.c: In function ‘input’: ./Main.c:11:2: warning: ignoring return value of ‘scanf’, declared with attribute warn_unused_result [-Wunused-result] scanf("%d", &N); ^ ./Main.c:13:3: warning: ignoring return value of ‘scanf’, declared with attribute warn_unused_result [-Wunused-result] scanf("%d", &t); ^
Judge Result
Set Name | Sample | All | ||||
---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 300 / 300 | ||||
Status |
|
|
Set Name | Test Cases |
---|---|
Sample | sample1.txt, sample2.txt |
All | sample1.txt, sample2.txt, in1.txt, in10.txt, in11.txt, in12.txt, in2.txt, in3.txt, in4.txt, in5.txt, in6.txt, in7.txt, in8.txt, in9.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
in1.txt | AC | 14 ms | 128 KB |
in10.txt | AC | 14 ms | 128 KB |
in11.txt | AC | 1 ms | 128 KB |
in12.txt | AC | 1 ms | 128 KB |
in2.txt | AC | 14 ms | 128 KB |
in3.txt | AC | 14 ms | 128 KB |
in4.txt | AC | 14 ms | 128 KB |
in5.txt | AC | 14 ms | 128 KB |
in6.txt | AC | 14 ms | 128 KB |
in7.txt | AC | 14 ms | 128 KB |
in8.txt | AC | 14 ms | 128 KB |
in9.txt | AC | 14 ms | 128 KB |
sample1.txt | AC | 1 ms | 128 KB |
sample2.txt | AC | 1 ms | 128 KB |