結果
問題 |
No.1722 [Cherry 3rd Tune C] In my way
|
ユーザー |
|
提出日時 | 2021-11-07 16:33:18 |
言語 | C# (.NET 8.0.404) |
結果 |
WA
|
実行時間 | - |
コード長 | 955 bytes |
コンパイル時間 | 7,692 ms |
コンパイル使用メモリ | 166,188 KB |
実行使用メモリ | 186,796 KB |
最終ジャッジ日時 | 2024-11-14 03:16:21 |
合計ジャッジ時間 | 10,129 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 3 WA * 20 |
コンパイルメッセージ
復元対象のプロジェクトを決定しています... /home/judge/data/code/main.csproj を復元しました (92 ms)。 MSBuild のバージョン 17.9.6+a4ecab324 (.NET) main -> /home/judge/data/code/bin/Release/net8.0/main.dll main -> /home/judge/data/code/bin/Release/net8.0/publish/
ソースコード
using System; using System.Linq; namespace Sample { class Program { static void Main(string[] args) { var arr = Console.ReadLine().Split(' ').Select(x => int.Parse(x)).ToArray(); var (N, M) = (arr[0], arr[1]); var X = Console.ReadLine().Split(' ').Select(x => long.Parse(x)).ToList(); var Y = Console.ReadLine().Split(' ').Select(x => long.Parse(x)).ToList(); Y.OrderBy(y => y); var MAX_Y = Y.Max(); foreach (var x in X) { if (MAX_Y < x) { Console.WriteLine("Infinity"); continue; } foreach (var y in Y) { if (y > x) { Console.WriteLine(y - x); break; } } } } } }