結果
問題 |
No.4 おもりと天秤
|
ユーザー |
![]() |
提出日時 | 2014-10-19 18:11:58 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 982 bytes |
コンパイル時間 | 1,049 ms |
コンパイル使用メモリ | 104,064 KB |
実行使用メモリ | 17,920 KB |
最終ジャッジ日時 | 2024-12-30 09:46:36 |
合計ジャッジ時間 | 2,616 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 12 WA * 10 RE * 1 |
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace omori { class Program { static void Main(string[] args) { var str0 = int.Parse(Console.ReadLine()); var str1 = Console.ReadLine().Split(' '); //答えの出現判定 var hantei = new bool[100 * 100]; for (int i = 0; i < hantei.Length; i++) { hantei[i] = false; } long total = 0; foreach (var item in str1) { total += int.Parse(item); hantei[total] =true; } if (((total % 2) == 0) & (hantei[total/2] == true)) { Console.WriteLine("possible"); } else { Console.WriteLine("impossible"); } } } }