結果

問題 No.365 ジェンガソート
ユーザー mban
提出日時 2016-12-23 14:30:12
言語 C#(csc)
(csc 3.9.0)
結果
WA  
実行時間 -
コード長 645 bytes
コンパイル時間 827 ms
コンパイル使用メモリ 110,076 KB
実行使用メモリ 33,580 KB
最終ジャッジ日時 2024-12-14 16:53:26
合計ジャッジ時間 4,229 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 16 WA * 25
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.Text;
using System.Text.RegularExpressions;
using System.Linq;

class Magatro
{
    static void Main()
    {
        int N = int.Parse(Console.ReadLine());
        int[] a = Console.ReadLine().Split(' ').Select(int.Parse).ToArray();
        int max = -1;
        int cnt = 0;
       for(int i = 0;i<N;i++)
        {
            if (max < a[i])
            {
                max = a[i];
            }
            else
            {
                cnt++;
            }
        }
        Console.WriteLine(cnt);
    }

}

0