結果
| 問題 | No.69 文字を自由に並び替え | 
| コンテスト | |
| ユーザー |  | 
| 提出日時 | 2018-10-15 15:41:53 | 
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 2 ms / 5,000 ms | 
| コード長 | 564 bytes | 
| コンパイル時間 | 786 ms | 
| コンパイル使用メモリ | 73,860 KB | 
| 実行使用メモリ | 6,820 KB | 
| 最終ジャッジ日時 | 2024-12-14 07:12:38 | 
| 合計ジャッジ時間 | 1,494 ms | 
| ジャッジサーバーID (参考情報) | judge4 / judge5 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 15 | 
ソースコード
#include <iostream>
#include <string>
#include <algorithm>
#include <cctype>
#include <cmath>
using namespace std;
int main(){
    string A, B;
    cin >> A;
    cin >> B;
    char* astr = new char[A.size() +1 ];
    std::char_traits<char>::copy(astr, A.c_str(), A.size()+1);
    char* bstr = new char[B.size() +1 ];
    std::char_traits<char>::copy(bstr, B.c_str(), B.size()+1);
    sort(astr, astr+A.size());
    sort(bstr, bstr+B.size());
    A = astr;
    B = bstr;
    if(A==B){
        cout << "YES" << endl;
    }else{
        cout << "NO" << endl;
    }
}
            
            
            
        