結果
| 問題 | No.69 文字を自由に並び替え | 
| コンテスト | |
| ユーザー |  #ラス+ | 
| 提出日時 | 2019-11-12 13:06:52 | 
| 言語 | C#(csc) (csc 3.9.0) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 27 ms / 5,000 ms | 
| コード長 | 1,345 bytes | 
| コンパイル時間 | 1,012 ms | 
| コンパイル使用メモリ | 107,648 KB | 
| 実行使用メモリ | 17,920 KB | 
| 最終ジャッジ日時 | 2024-09-18 22:34:24 | 
| 合計ジャッジ時間 | 2,022 ms | 
| ジャッジサーバーID (参考情報) | judge2 / judge4 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 15 | 
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
using System;
using System.IO;
using System.Collections.Generic;
using static System.Console;
using static System.Math;
class Start{
  static void Solve(){
    var A=Read();
    var B=Read();
    var a=new List<char>();
    var b=new List<char>();
    for(int i=0;i<A.Length;i++)a.Add(A[i]);
    for(int i=0;i<B.Length;i++)b.Add(B[i]);
    a.Sort();
    b.Sort();
    var t=true;
    if(a.Count!=b.Count)t=false;
    for(int i=0;i<a.Count;i++)
      if(a[i]!=b[i])t=false;
    WriteLine(t?"YES":"NO");
  }
  static void Main(){
    READ_COUNT=0;
    READ=In.ReadToEnd().Split(' ','\n');
    var sw=new StreamWriter(OpenStandardOutput()){AutoFlush=false};
    SetOut(sw);
    Solve();
    Out.Flush();
  }
  const long MOD=1000000007L;
  static void Swap<T>(ref T a,ref T b){T c=a;a=b;b=c;}
  static string Read()=>READ[READ_COUNT++];
  static int Rint()=>int.Parse(READ[READ_COUNT++]);
  static long Rlong()=>long.Parse(READ[READ_COUNT++]);
  static double Rdouble()=>double.Parse(READ[READ_COUNT++]);
  static char Rchar()=>READ[READ_COUNT++][0];
  static string[] READ;static int READ_COUNT;
}
class Pair<T1,T2>:IComparable<Pair<T1,T2>>where T1:IComparable<T1>where T2:IComparable<T2>{
  public T1 F;public T2 S;
  public Pair(T1 f,T2 s){F=f;S=s;}
  public int CompareTo(Pair<T1,T2> p)=>F.CompareTo(p.F)!=0?F.CompareTo(p.F):S.CompareTo(p.S);
}
            
            
            
        