結果
問題 | No.69 文字を自由に並び替え |
ユーザー |
![]() |
提出日時 | 2016-07-20 19:08:14 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 651 bytes |
コンパイル時間 | 1,564 ms |
コンパイル使用メモリ | 161,524 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-12-14 06:20:20 |
合計ジャッジ時間 | 2,068 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 15 |
コンパイルメッセージ
main.cpp: In function ‘int main()’: main.cpp:25:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 25 | scanf("%s %s", a,b); | ~~~~~^~~~~~~~~~~~~~
ソースコード
// g++ -std=c++11 temp.cpp #include <bits/stdc++.h> using namespace std; #define FOR(i,a,b) for(int i=(int)(a);i<(int)(b);i++) #define REP(i,n) FOR(i,0,n) #define EACH(itr,v) for(auto itr:v) #define pb(s) push_back(s) #define mp(a,b) make_pair(a,b) #define all(x) (x).begin(),(x).end() #define dbg(x) cout<<#x"="<<x<<endl typedef long long ll; typedef unsigned long long ull; typedef pair<int, int> P; typedef pair<P, int> PPI; #define INF INT_MAX/3 #define MAX_N 1000 char a[11],b[11]; int main(){ scanf("%s %s", a,b); sort(a, a+strlen(a)); sort(b, b+strlen(b)); if(strcmp(a,b)==0) cout<<"YES"<<endl; else cout<<"NO"<<endl; return 0; }