diff options
Diffstat (limited to 'codeforces/AmusingJoke')
| -rwxr-xr-x | codeforces/AmusingJoke/main | bin | 0 -> 39216 bytes | |||
| -rw-r--r-- | codeforces/AmusingJoke/main.cpp | 57 | ||||
| -rw-r--r-- | codeforces/AmusingJoke/main_input0.txt | 3 | ||||
| -rw-r--r-- | codeforces/AmusingJoke/main_input1.txt | 3 | ||||
| -rw-r--r-- | codeforces/AmusingJoke/main_input2.txt | 3 | ||||
| -rw-r--r-- | codeforces/AmusingJoke/main_output0.txt | 1 | ||||
| -rw-r--r-- | codeforces/AmusingJoke/main_output1.txt | 1 | ||||
| -rw-r--r-- | codeforces/AmusingJoke/main_output2.txt | 1 |
8 files changed, 69 insertions, 0 deletions
diff --git a/codeforces/AmusingJoke/main b/codeforces/AmusingJoke/main Binary files differnew file mode 100755 index 0000000..df6c17d --- /dev/null +++ b/codeforces/AmusingJoke/main diff --git a/codeforces/AmusingJoke/main.cpp b/codeforces/AmusingJoke/main.cpp new file mode 100644 index 0000000..3dd0fac --- /dev/null +++ b/codeforces/AmusingJoke/main.cpp @@ -0,0 +1,57 @@ +#include<bits/stdc++.h> + +using namespace std; + +using ll = long long; +using pi = pair<int, int>; +using vpi = vector<pi>; +using vi = vector<int>; +using vll = vector<long long>; +using mpii = map<int, int>; +using mpll = map<ll, ll>; +using db = long double; + +#define push_back pb +#define all(x) (x).begin(), (x).end() +#define rall(x) (x).rbegin(), (x).rend() +#define lb lower_bound +#define ub upper_bound + +const int MOD = (int)1e9 + 7; +const db PI = acos((db)-1); +const int dx[4]{1, 0, -1, 0}; +const int dy[4]{0, 1, 0, -1}; + +string solve() { + vi fq1(28), fq2(28); + string s1, s2, s3; + cin >> s1 >> s2 >> s3; + s1 += s2; + for (auto ch : s1) { + fq1[ch - 'A']++; + } + for (auto ch : s3) { + fq2[ch - 'A']++; + } + for (int i = 0; i < 28; i++) { + if (fq1[i] != fq2[i]) { + return "NO"; + } + } + return "YES"; +} + +int main () { + ios_base::sync_with_stdio(false); + cin.tie(NULL); + cout << solve() << '\n'; +} + +/* stuff you should look for: + --------------------------- + * special cases (n=1?) + * int overflow, array bounds + * do smth instead of nothing and stay organized + * WRITE STUFF DOWN + * DON'T GET STUCK ON ONE APPROACH + */ diff --git a/codeforces/AmusingJoke/main_input0.txt b/codeforces/AmusingJoke/main_input0.txt new file mode 100644 index 0000000..40a66fa --- /dev/null +++ b/codeforces/AmusingJoke/main_input0.txt @@ -0,0 +1,3 @@ +SANTACLAUS +DEDMOROZ +SANTAMOROZDEDCLAUS diff --git a/codeforces/AmusingJoke/main_input1.txt b/codeforces/AmusingJoke/main_input1.txt new file mode 100644 index 0000000..72b3b1a --- /dev/null +++ b/codeforces/AmusingJoke/main_input1.txt @@ -0,0 +1,3 @@ +PAPAINOEL +JOULUPUKKI +JOULNAPAOILELUPUKKI diff --git a/codeforces/AmusingJoke/main_input2.txt b/codeforces/AmusingJoke/main_input2.txt new file mode 100644 index 0000000..07f64f4 --- /dev/null +++ b/codeforces/AmusingJoke/main_input2.txt @@ -0,0 +1,3 @@ +BABBONATALE +FATHERCHRISTMAS +BABCHRISTMASBONATALLEFATHER diff --git a/codeforces/AmusingJoke/main_output0.txt b/codeforces/AmusingJoke/main_output0.txt new file mode 100644 index 0000000..f033a50 --- /dev/null +++ b/codeforces/AmusingJoke/main_output0.txt @@ -0,0 +1 @@ +YES diff --git a/codeforces/AmusingJoke/main_output1.txt b/codeforces/AmusingJoke/main_output1.txt new file mode 100644 index 0000000..5e35d1b --- /dev/null +++ b/codeforces/AmusingJoke/main_output1.txt @@ -0,0 +1 @@ +NO diff --git a/codeforces/AmusingJoke/main_output2.txt b/codeforces/AmusingJoke/main_output2.txt new file mode 100644 index 0000000..5e35d1b --- /dev/null +++ b/codeforces/AmusingJoke/main_output2.txt @@ -0,0 +1 @@ +NO |
