結果
問題 |
No.24 数当てゲーム
|
ユーザー |
![]() |
提出日時 | 2015-07-21 01:56:21 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
AC
|
実行時間 | 24 ms / 5,000 ms |
コード長 | 954 bytes |
コンパイル時間 | 830 ms |
コンパイル使用メモリ | 103,168 KB |
実行使用メモリ | 17,920 KB |
最終ジャッジ日時 | 2024-07-08 11:27:20 |
合計ジャッジ時間 | 1,634 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 10 |
コンパイルメッセージ
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; class yc2 { static void Main() { int N = int.Parse(Console.ReadLine()); int[] nums = new int[10]; int answer = 0; string[] str; for (int i = 0; i < N; i++) { str = Console.ReadLine().Split(); if (str[4] == "YES") { for (int j = 0; j < 4; j++) { nums[int.Parse(str[j])]--; } answer--; } else { //(str[4] == "NO") for (int j = 0; j < 4; j++) { nums[int.Parse(str[j])]++; } } } for (int i = 0; i < 10; i++) { if (nums[i] == answer) { Console.WriteLine(i); return; } } } }