結果
| 問題 | No.3324 ハイライト動画 |
| コンテスト | |
| ユーザー |
aketijyuuzou
|
| 提出日時 | 2025-11-23 18:31:12 |
| 言語 | C# (.NET 8.0.404) |
| 結果 |
AC
|
| 実行時間 | 603 ms / 2,000 ms |
| コード長 | 1,996 bytes |
| 記録 | |
| コンパイル時間 | 10,952 ms |
| コンパイル使用メモリ | 169,720 KB |
| 実行使用メモリ | 188,788 KB |
| 最終ジャッジ日時 | 2025-11-23 18:31:32 |
| 合計ジャッジ時間 | 18,234 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 25 |
コンパイルメッセージ
復元対象のプロジェクトを決定しています... /home/judge/data/code/main.csproj を復元しました (107 ミリ秒)。 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.Collections.Generic;
using System.Linq;
// https://yukicoder.me/problems/no/3324
class Program
{
static string InputPattern = "InputX";
static List<string> GetInputList()
{
var WillReturn = new List<string>();
if (InputPattern == "Input1") {
WillReturn.Add("10 6");
WillReturn.Add("1 2 4 5 6 10");
//3
//1 2
//4 3
//10 1
}
else if (InputPattern == "Input2") {
WillReturn.Add("5 5");
WillReturn.Add("1 2 3 4 5");
//1
//1 5
}
else if (InputPattern == "Input3") {
WillReturn.Add("360000 14");
WillReturn.Add("1 2 3 12 13 14 15 16 359995 359996 359997 359998 359999 360000");
//3
//1 3
//12 5
//359995 6
}
else {
string wkStr;
while ((wkStr = Console.ReadLine()) != null) WillReturn.Add(wkStr);
}
return WillReturn;
}
static long[] GetSplitArr(string pStr)
{
return (pStr == "" ? new string[0] : pStr.Split(' ')).Select(pX => long.Parse(pX)).ToArray();
}
struct ItemInfoDef
{
internal long Distance;
internal long AVal;
}
static List<ItemInfoDef> mItemInfoList = new List<ItemInfoDef>();
static void Main()
{
List<string> InputList = GetInputList();
long[] AArr = GetSplitArr(InputList[1]);
for (long I = 0; I <= AArr.GetUpperBound(0); I++) {
ItemInfoDef WillAdd;
WillAdd.Distance = AArr[I] - I;
WillAdd.AVal = AArr[I];
mItemInfoList.Add(WillAdd);
}
var Query = mItemInfoList.GroupBy(pX => pX.Distance).ToArray();
Console.WriteLine(Query.Count());
foreach (var EachPair in Query) {
Console.WriteLine("{0} {1}", EachPair.Min(pX => pX.AVal), EachPair.Count());
}
}
}
aketijyuuzou