Submission #1092468
Source Code Expand
using System; using System.Text; using System.Linq; using System.Collections.Generic; class Program { const long mod = 1000000007; //public static int[] max; static void Main(string[] args) { char[] cs = new char[] { ' ', ',' }; int val = int.Parse(Console.ReadLine()); int[] vals = parseAry(Console.ReadLine().Split(cs)); //int val = int.Parse(Console.ReadLine()); //string str = Console.ReadLine(); //string[] strs = Console.ReadLine().Split(cs); //int[] vals = parseAry(Console.ReadLine().Split(cs)); //int n = vals[0]; //string res=""; //int y = vals[0]; //int x = vals[1]; int guu = 0, ki = 0; for (int i = 0; i < val; i++) { if (( vals[i] & 1 ) == 1) { ki++; } else { guu++; } } string re="NO"; if (( ki & 1 ) == 1) { //if (( (guu+(ki/2)) & 1 ) == 0) { re = "YES"; } } else { re = "YES"; } Console.WriteLine(re); return; } // String[] -----> int[] static int[] parseAry(string[] str) { int[] nums = new int[str.Length]; for (int i = 0; i < str.Length; i++) { nums[i] = int.Parse(str[i]); } return nums; } // String[] -----> long[] static long[] parseAryl(string[] str) { long[] nums = new long[str.Length]; for (int i = 0; i < str.Length; i++) { nums[i] = int.Parse(str[i]); } return nums; } //文字列を1文字ずつString[]に入れる static string[] strAry(String str) { string[] re = new string[str.Length]; for (int i = 0; i < str.Length; i++) { re[i] = str[i].ToString(); } return re; } }
Submission Info
Submission Time | |
---|---|
Task | A - Addition |
User | Rainin |
Language | C# (Mono 4.6.2.0) |
Score | 300 |
Code Size | 1590 Byte |
Status | AC |
Exec Time | 69 ms |
Memory | 12120 KB |
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 | 69 ms | 12120 KB |
in10.txt | AC | 68 ms | 12120 KB |
in11.txt | AC | 19 ms | 2648 KB |
in12.txt | AC | 19 ms | 2648 KB |
in2.txt | AC | 68 ms | 12120 KB |
in3.txt | AC | 68 ms | 11992 KB |
in4.txt | AC | 68 ms | 11992 KB |
in5.txt | AC | 68 ms | 12120 KB |
in6.txt | AC | 68 ms | 12120 KB |
in7.txt | AC | 68 ms | 12120 KB |
in8.txt | AC | 68 ms | 11992 KB |
in9.txt | AC | 68 ms | 12120 KB |
sample1.txt | AC | 19 ms | 2648 KB |
sample2.txt | AC | 19 ms | 2648 KB |