結果
| 問題 |
No.69 文字を自由に並び替え
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2015-03-23 17:21:51 |
| 言語 | C#(csc) (csc 3.9.0) |
| 結果 |
AC
|
| 実行時間 | 28 ms / 5,000 ms |
| コード長 | 1,026 bytes |
| コンパイル時間 | 836 ms |
| コンパイル使用メモリ | 116,008 KB |
| 実行使用メモリ | 26,052 KB |
| 最終ジャッジ日時 | 2024-12-14 05:50:51 |
| 合計ジャッジ時間 | 1,906 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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.Collections;
using System.Collections.Generic;
using System.Linq;
namespace A {
class main {
public main() { }
public static int Main() {
new main().run();
return 0;
}
void run() {
Scanner cin = new Scanner();
String s = cin.next ();
String t = cin.next ();
char[] c1=s.ToCharArray();
char[] c2=t.ToCharArray();
Array.Sort(c1);
Array.Sort(c2);
s=new String(c1);
t=new String(c2);
if (s == t) Console.WriteLine ("YES");
else Console.WriteLine ("NO");
}
}
class Scanner {
string[] s;
int i;
char[] cs = new char[] { ' ' };
public Scanner() {
s = new string[0];
i = 0;
}
public string next() {
if (i < s.Length) return s[i++];
s = Console.ReadLine().Split(cs, StringSplitOptions.RemoveEmptyEntries);
i = 0;
return s[i++];
}
public int nextInt() {
return int.Parse(next());
}
public long nextLong() {
return long.Parse(next());
}
public double nextDouble() {
return double.Parse(next());
}
}
}