結果
| 問題 |
No.647 明太子
|
| コンテスト | |
| ユーザー |
pirorirori_n712
|
| 提出日時 | 2018-08-07 02:43:41 |
| 言語 | C#(csc) (csc 3.9.0) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 1,122 bytes |
| コンパイル時間 | 724 ms |
| コンパイル使用メモリ | 107,852 KB |
| 実行使用メモリ | 25,944 KB |
| 最終ジャッジ日時 | 2024-09-19 18:21:58 |
| 合計ジャッジ時間 | 2,005 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | RE * 4 |
| other | RE * 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;
class No647{
static void Main(){
var a=Int32.Parse(Console.ReadLine());
List<int>list=new List<int>();
for(int i=0;i<a;++a){
list.Add(Int32.Parse(Console.ReadLine().Replace(" ","")));
}
var b=Int32.Parse(Console.ReadLine());
for(int i=0;i<b;++b){
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);
}
}
}
pirorirori_n712