Problem hidden
This problem was hidden by Editorial Board member probably because it has incorrect language version or invalid test data, or description of the problem is not clear.

ANAGRAMS - Anagram (challenge)

Gegeben sind zwei Zeichenketten. Zu ermitteln ist, ob eine der beiden Zeichenketten ein Anagramm der anderen ist.
Ein Anagramm entsteht dadurch, dass man die Zeichen einer Zeichenkette beliebig umordnet. Die Zeichenketten aaba und aaab sind z.B. Anagramme, aber abcd und deba sind keine Anagramme.

Eingabe

Die erste Eingabezeile enthält die Anzahl der danach folgenden Zeilen (weniger als 100). Jede der folgenden Zeilen besteht aus zwei Zeichenketten, die jeweils durch ein Leerzeichen getrennt sind. Keine der Zeichenketten besteht aus mehr als 100 Zeichen.

Ausgabe

Für jede Eingabezeile lautet die Ausgabe entweder YES (wenn die Zeichenketten Anagramme sind) oder NO (wenn sie keine Anagramme sind).

Beispiel

 
Eingabe:
4
aaba aaab
abcd deba
tom_marvolo_riddle_ i_am_lord_voldemort
_gregory_House Huge_ego_sorry
Ausgabe:
YES
NO
YES
YES

Translated by numerix.


Added by:Piotr Kąkol
Date:2010-04-27
Time limit:2.277s
Source limit:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Languages:All except: NODEJS OBJC SCM qobi VB.NET
Resource:Copy of Pratik's task ANAG with different scoring

hide comments
2013-09-12 20:27:05 Piotr KÄ…kol
I've looked into it and only Contest Setters on their contests are able to do it.
2013-09-12 17:51:53 Jander
Odd - I tried HTML earlier and it didn't work - it displayed it as-is. I wanted to link to Mitch's details.
2013-09-12 15:58:44 challenger
@Jander - Good job. :-)
Only Problem Setters can do it. As you're one of them just use HTML, as you can read at the bottom of the page.
// I've updated language rankings and will do it manually from time to time.
2013-09-12 14:38:52 Jander
Oooh, you ratbag Challenger ! 42 in sed indeed.

[Edit]
"info sed" told me a bit more than "man sed" did :-) Blame Mitch for getting me in to sed!

On a side note, how does one put links in to a comment?

Last edit: 2013-09-12 15:01:29
2012-03-10 21:08:39 Piotr KÄ…kol
There was a rejudge thanks to Jander who showed that there's an incorrect program which gets AC. Sorry for any inconvenience.

Last edit: 2012-03-10 21:08:56
2012-02-26 02:28:52 Hallvard Norheim Bø
Piotr: of course...it just didn't occur to me. Guess that kills my algorithm :(
2012-02-25 20:17:31 Piotr KÄ…kol
[A-Za-Z0-9_!]
What if S1.size()!=S2.size()?
2012-02-25 13:36:09 Hallvard Norheim Bø
What characters are allowed in the input strings? Only [A-Za-z_] like in the examples?

Could you please give a testcase where my submission #6561574 fails?

Last edit: 2012-02-25 13:36:40
2010-04-27 20:42:42 :(){ :|: & };:


This is precisely the same problems with *different input restriction* :)


Last edit: 2010-04-28 07:03:11
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.