結果
| 問題 | No.851 テストケース |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-07-10 18:54:49 |
| 言語 | C#(csc) (csc 3.9.0) |
| 結果 |
AC
|
| 実行時間 | 32 ms / 3,153 ms |
| コード長 | 858 bytes |
| 記録 | |
| コンパイル時間 | 853 ms |
| コンパイル使用メモリ | 108,032 KB |
| 実行使用メモリ | 20,992 KB |
| 最終ジャッジ日時 | 2026-04-27 09:33:28 |
| 合計ジャッジ時間 | 3,144 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 20 |
コンパイルメッセージ
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;
using System.Collections.Generic;
namespace _0851
{
class Program
{
static void Main(string[] args)
{
var n = int.Parse(Console.ReadLine());
var items = new long[n];
for(var i = 0; i < n; i++){
var s = Console.ReadLine().Split();
if(s.Length != 1){
Console.WriteLine("\"assert\"");
return;
}
items[i] = long.Parse(s[0]);
}
var x = new List<long>();
x.Add(items[0] + items[1]);
x.Add(items[0] + items[2]);
x.Add(items[1] + items[2]);
var h = new HashSet<long>(x);
var ans = h.OrderByDescending(t => t).Skip(1).First();
Console.WriteLine(ans);
}
}
}