結果
| 問題 | No.45 回転寿司 |
| ユーザー |
|
| 提出日時 | 2023-01-10 15:17:04 |
| 言語 | C# (.NET 10.0.201) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 723 bytes |
| 記録 | |
| コンパイル時間 | 6,628 ms |
| コンパイル使用メモリ | 173,576 KB |
| 実行使用メモリ | 195,720 KB |
| 最終ジャッジ日時 | 2026-05-28 04:41:55 |
| 合計ジャッジ時間 | 9,162 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 WA * 2 |
| other | AC * 2 WA * 28 |
コンパイルメッセージ
復元対象のプロジェクトを決定しています... /home/judge/data/code/main.csproj を復元しました (90 ミリ秒)。 main -> /home/judge/data/code/bin/Release/net10.0/main.dll main -> /home/judge/data/code/bin/Release/net10.0/publish/
ソースコード
using System;
using System.Linq;
using System.Collections;
using System.Collections.Generic;
static class ConveyorBeltSushi
{
static void Main()
{
// 何にも使わない
int count = int.Parse(Console.ReadLine());
var deliciousness = Console.ReadLine().Split(' ').Select(int.Parse);
var sumDeliciousness = deliciousness.Chunk(4).Select(x => {
switch(x.Count())
{
case 1:
return x.Max();
case 2:
return x.Max();
case 3:
return Math.Max(x[0] + x[2], x[1]);
case 4:
return Math.Max(x[0] + x[2], x[1] + x[3]);
default:
return 0;
}}).Sum();
Console.WriteLine(sumDeliciousness);
}
}