結果
| 問題 |
No.1475 時計の歯車Easy
|
| ユーザー |
GinFizz1185
|
| 提出日時 | 2021-04-11 16:42:34 |
| 言語 | C#(csc) (csc 3.9.0) |
| 結果 |
AC
|
| 実行時間 | 28 ms / 2,000 ms |
| コード長 | 1,184 bytes |
| コンパイル時間 | 2,873 ms |
| コンパイル使用メモリ | 104,576 KB |
| 実行使用メモリ | 18,304 KB |
| 最終ジャッジ日時 | 2024-06-27 11:21:52 |
| 合計ジャッジ時間 | 5,498 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 42 |
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
using System;
using System.Collections.Generic;
using System.ComponentModel;
namespace yukicode
{
class No1475
{
static void Main(string[] args)
{
int watchNum = int.Parse(Console.ReadLine());
Dictionary<int, int[]> watchParts = new Dictionary<int, int[]>();
for(int i = 0; i < watchNum; i++)
{
string[] watchInfo = Console.ReadLine().Split(' ');
int partsNum = int.Parse(watchInfo[0]);
int[] parts = new int[partsNum];
for(int j = 0; j < partsNum; j++)
{
parts[j] = int.Parse(watchInfo[j + 1]);
}
Array.Sort(parts);
Array.Reverse(parts);
watchParts.Add(i, parts);
}
for(int i = 0; i < watchNum; i++)
{
string str = "";
for(int j = 0; j < watchParts[i].Length; j++)
{
str += watchParts[i][j] + " ";
}
Console.WriteLine(str.Substring(0, str.Length - 1));
}
return;
}
}
}
GinFizz1185