結果
問題 |
No.1722 [Cherry 3rd Tune C] In my way
|
ユーザー |
|
提出日時 | 2021-11-07 16:40:28 |
言語 | C# (.NET 8.0.404) |
結果 |
AC
|
実行時間 | 77 ms / 2,000 ms |
コード長 | 944 bytes |
コンパイル時間 | 8,808 ms |
コンパイル使用メモリ | 167,140 KB |
実行使用メモリ | 186,612 KB |
最終ジャッジ日時 | 2024-11-14 03:28:11 |
合計ジャッジ時間 | 11,557 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 23 |
コンパイルメッセージ
復元対象のプロジェクトを決定しています... /home/judge/data/code/main.csproj を復元しました (102 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.Sort(); 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; } } } } } }