結果
| 問題 |
No.647 明太子
|
| コンテスト | |
| ユーザー |
pirorirori_n712
|
| 提出日時 | 2018-08-08 00:20:18 |
| 言語 | C#(csc) (csc 3.9.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 969 bytes |
| コンパイル時間 | 1,292 ms |
| コンパイル使用メモリ | 103,552 KB |
| 実行使用メモリ | 18,304 KB |
| 最終ジャッジ日時 | 2024-09-19 18:30:57 |
| 合計ジャッジ時間 | 2,150 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 WA * 3 |
| 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());
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]/10)<=(list[j]/10)&&(list[a+i]%10)>=(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