Skip to content

Instantly share code, notes, and snippets.

@HyeonWooKim
Created November 28, 2016 01:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save HyeonWooKim/2118be50ee5a96ca0637d3a2870d9d27 to your computer and use it in GitHub Desktop.
Save HyeonWooKim/2118be50ee5a96ca0637d3a2870d9d27 to your computer and use it in GitHub Desktop.
BOJ 9946
#include<iostream>
#include<algorithm>
#include<string>
using namespace std;
int main()
{
for(int i=1;;i++)
{
string a, b;
cin >> a >> b;
if (a == "END" && b == "END") break;
sort(a.begin(), a.end());
sort(b.begin(), b.end());
cout << "Case " << i << ": " << (a == b ? "same" : "different") << "\n";
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment