結果
問題 |
No.647 明太子
|
ユーザー |
![]() |
提出日時 | 2018-08-07 03:03:48 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 1,152 bytes |
コンパイル時間 | 855 ms |
コンパイル使用メモリ | 103,680 KB |
実行使用メモリ | 18,304 KB |
最終ジャッジ日時 | 2024-09-19 18:22:27 |
合計ジャッジ時間 | 2,085 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 4 |
other | WA * 10 RE * 10 |
コンパイルメッセージ
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; class No647{ static void Main(){ var a=Int32.Parse(Console.ReadLine()); Console.WriteLine(a); List<int>list=new List<int>(); for(int i=0;i<a;++i){ list.Add(Int32.Parse(Console.ReadLine().Replace(" ",""))); } var b=Int32.Parse(Console.ReadLine()); for(int i=0;i<b;++i){ list.Add(Int32.Parse(Console.ReadLine().Replace(" ",""))); } var d=0; List<int>mlist=new List<int>(); for(int i=0;i<b;++i){ var c=0; for(int j=0;j<a;++j){ if(list[a+i]-list[j]>-1){ if(list[a+i]-list[j]<10){ c++; }if((list[a+i])>(list[j]%10)){ c++; } } } if(c>d){ d=c; mlist.Clear(); mlist.Add(i); }else if(c==d){ mlist.Add(i); } } foreach(var e in mlist){ Console.WriteLine(e); } } }