結果
問題 | No.1692 Expectations |
ユーザー |
![]() |
提出日時 | 2020-09-30 01:08:09 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 1,973 bytes |
コンパイル時間 | 2,355 ms |
コンパイル使用メモリ | 111,164 KB |
実行使用メモリ | 49,696 KB |
最終ジャッジ日時 | 2024-07-19 09:36:47 |
合計ジャッジ時間 | 3,167 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 17 WA * 3 |
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
using System;using System.Linq;namespace Solution{class AC{static void Main(string[] args){var (N, M) = Cin.Input<int, int>();var A = Cin.ReadSplitInt();int type = A.Distinct().Count();Console.WriteLine($"{type} 0");}}}static class Cin{public static string Str() => Console.ReadLine();public static int Int() => int.Parse(Cin.Str());public static long Long() => long.Parse(Cin.Str());public static double Double() => double.Parse(Cin.Str());private static T Conv<T>(string value) => (T)Convert.ChangeType(value, typeof(T));public static (T, U) ReadTuple<T, U>(string[] input) => (Conv<T>(input[0]), Conv<U>(input[1]));public static (T, U, V) ReadTuple<T, U, V>(string[] input) => (Conv<T>(input[0]), Conv<U>(input[1]), Conv<V>(input[2]));public static (T, U, V, W) ReadTuple<T, U, V, W>(string[] input) => (Conv<T>(input[0]), Conv<U>(input[1]), Conv<V>(input[2]), Conv<W>(input[3]));public static (T, U, V, W, X) ReadTuple<T, U, V, W, X>(string[] input) => (Conv<T>(input[0]), Conv<U>(input[1]), Conv<V>(input[2]), Conv<W>(input[3]), Conv<X>(input[4]));public static (T, U) Input<T, U>() => ReadTuple<T, U>(ReadSplit());public static (T, U, V) Input<T, U, V>() => ReadTuple<T, U, V>(ReadSplit());public static (T, U, V, W) Input<T, U, V, W>() => ReadTuple<T, U, V, W>(ReadSplit());public static (T, U, V, W, X) Input<T, U, V, W, X>() => ReadTuple<T, U, V, W, X>(ReadSplit());public static string[] ReadSplit() => Console.ReadLine().Split();public static string[] ReadSplit(char separator) => Console.ReadLine().Split(separator);public static int[] ReadSplitInt() => Array.ConvertAll(ReadSplit(), int.Parse);public static long[] ReadSplitLong() => Array.ConvertAll(ReadSplit(), long.Parse);public static double[] ReadSplit_Double() => Array.ConvertAll(ReadSplit(), double.Parse);}