Submission #33254


Source Code Expand

Copy
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using Ustok.Util;

class Program
{
	static void Main(string[] args)
	{
		int[] E = Console.ReadLine().Split(' ').Select(i => i.ToInt()).ToArray();
		int B = Console.ReadLine().ToInt();
		int[] L = Console.ReadLine().Split(' ').Select(i => i.ToInt()).ToArray();

		int itti = getItti(E,L);

		if (itti == 6)
		{
			Console.WriteLine("1");
		}
		else if (itti == 5 && L.Contains(B))
		{
			Console.WriteLine("2");
		}
		else if (itti == 5)
		{
			Console.WriteLine("3");
		}
		else if (itti == 4)
		{
			Console.WriteLine("4");
		}
		else if (itti == 3)
		{
			Console.WriteLine("5");
		}
		else
		{
			Console.WriteLine("0");
		}
	}

	static int getItti(int[] a, int[] b)
	{
		int r = 0;
		for (int i = 0; i < 6; i++)
		{
			if (a[i] == b[i]) r++;
		}
		return r;
	}
}

namespace Ustok.Util
{
	public static class Extensions
	{
		public static int ToInt(this string s)
		{
			return int.Parse(s);
		}

		public static double ToDouble(this string s)
		{
			return double.Parse(s);
		}

		public static float ToFloat(this string s)
		{
			return float.Parse(s);
		}
	}

}

Submission Info

Submission Time
Task A - 宝くじ
User nankotsu230
Language C# (Mono 2.10.8.1)
Score 0
Code Size 1229 Byte
Status WA
Exec Time 216 ms
Memory 8432 KB

Judge Result

Set Name All
Score / Max Score 0 / 100
Status
AC × 12
WA × 39
Set Name Test Cases
All 00_1_01.txt, 00_1_02.txt, 00_2_01.txt, 00_2_02.txt, 00_3_01.txt, 00_3_02.txt, 00_sample_01.txt, 00_sample_02.txt, 00_sample_03.txt, 00_sample_04.txt, 00_sample_05.txt, 01_rand_00.txt, 01_rand_01.txt, 01_rand_02.txt, 01_rand_03.txt, 01_rand_04.txt, 01_rand_05.txt, 01_rand_06.txt, 01_rand_07.txt, 01_rand_08.txt, 01_rand_09.txt, 01_rand_10.txt, 01_rand_11.txt, 01_rand_12.txt, 01_rand_13.txt, 01_rand_14.txt, 01_rand_15.txt, 01_rand_16.txt, 01_rand_17.txt, 01_rand_18.txt, 01_rand_19.txt, 01_rand_20.txt, 01_rand_21.txt, 01_rand_22.txt, 01_rand_23.txt, 01_rand_24.txt, 01_rand_25.txt, 01_rand_26.txt, 01_rand_27.txt, 01_rand_28.txt, 01_rand_29.txt, 01_rand_30.txt, 01_rand_31.txt, 01_rand_32.txt, 01_rand_33.txt, 01_rand_34.txt, 01_rand_35.txt, 01_rand_36.txt, 01_rand_37.txt, 01_rand_38.txt, 01_rand_39.txt
Case Name Status Exec Time Memory
00_1_01.txt AC 143 ms 8300 KB
00_1_02.txt AC 149 ms 8372 KB
00_2_01.txt WA 144 ms 8372 KB
00_2_02.txt AC 150 ms 8276 KB
00_3_01.txt AC 150 ms 8364 KB
00_3_02.txt WA 164 ms 8412 KB
00_sample_01.txt AC 151 ms 8300 KB
00_sample_02.txt AC 186 ms 8340 KB
00_sample_03.txt AC 147 ms 8372 KB
00_sample_04.txt WA 141 ms 8428 KB
00_sample_05.txt WA 152 ms 8328 KB
01_rand_00.txt WA 158 ms 8376 KB
01_rand_01.txt WA 148 ms 8372 KB
01_rand_02.txt AC 164 ms 8304 KB
01_rand_03.txt WA 154 ms 8352 KB
01_rand_04.txt WA 155 ms 8368 KB
01_rand_05.txt WA 159 ms 8324 KB
01_rand_06.txt AC 154 ms 8372 KB
01_rand_07.txt WA 163 ms 8368 KB
01_rand_08.txt WA 150 ms 8304 KB
01_rand_09.txt WA 152 ms 8372 KB
01_rand_10.txt WA 160 ms 8372 KB
01_rand_11.txt AC 149 ms 8428 KB
01_rand_12.txt WA 152 ms 8276 KB
01_rand_13.txt WA 216 ms 8340 KB
01_rand_14.txt WA 153 ms 8372 KB
01_rand_15.txt WA 144 ms 8368 KB
01_rand_16.txt WA 146 ms 8304 KB
01_rand_17.txt WA 153 ms 8368 KB
01_rand_18.txt AC 154 ms 8416 KB
01_rand_19.txt WA 159 ms 8364 KB
01_rand_20.txt WA 147 ms 8372 KB
01_rand_21.txt WA 157 ms 8368 KB
01_rand_22.txt WA 157 ms 8368 KB
01_rand_23.txt WA 162 ms 8328 KB
01_rand_24.txt WA 151 ms 8432 KB
01_rand_25.txt WA 151 ms 8368 KB
01_rand_26.txt WA 150 ms 8364 KB
01_rand_27.txt WA 150 ms 8396 KB
01_rand_28.txt WA 149 ms 8368 KB
01_rand_29.txt WA 151 ms 8364 KB
01_rand_30.txt WA 162 ms 8368 KB
01_rand_31.txt AC 146 ms 8304 KB
01_rand_32.txt WA 151 ms 8328 KB
01_rand_33.txt WA 147 ms 8368 KB
01_rand_34.txt WA 149 ms 8372 KB
01_rand_35.txt WA 152 ms 8368 KB
01_rand_36.txt WA 154 ms 8372 KB
01_rand_37.txt WA 154 ms 8344 KB
01_rand_38.txt WA 147 ms 8372 KB
01_rand_39.txt WA 152 ms 8372 KB