結果
問題 |
No.1115 二つの数列 / Two Sequences
|
ユーザー |
|
提出日時 | 2020-07-17 23:08:00 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 801 bytes |
コンパイル時間 | 1,050 ms |
コンパイル使用メモリ | 104,832 KB |
実行使用メモリ | 54,272 KB |
最終ジャッジ日時 | 2024-11-30 02:35:36 |
合計ジャッジ時間 | 51,937 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 5 |
other | AC * 20 TLE * 15 |
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
using System; using static System.Console; using static System.Math; using System.Numerics; using System.Collections.Generic; using System.Linq; namespace AtCoder { public class Program { public static void Main(string[] args) { var n = int.Parse(ReadLine()); //var s = Conasole.ReadLine().Split(' ') var a = Console.ReadLine().Split(' ').Select(int.Parse).ToArray(); var b = Console.ReadLine().Split(' ').Select(int.Parse).ToArray(); var list = new List<int>(a); var ans = 0; for (int i = 0; i < n; i++) { ans += list.IndexOf(b[i]); list.Remove(b[i]); } WriteLine(ans); Out.Flush(); } } }