Skip to content

Instantly share code, notes, and snippets.

@pureexe
Created October 24, 2012 12:14
Show Gist options
  • Select an option

  • Save pureexe/3945745 to your computer and use it in GitHub Desktop.

Select an option

Save pureexe/3945745 to your computer and use it in GitHub Desktop.
สอวน ข้อ 2 อนาแกรม (เช็ค String ไปกลับ)
#include<cstdio>
#include<algorithm>
#include<cstring>
using namespace std;
int main()
{
char a[20001],b[20001];
gets(a);
gets(b);
strlwr(a);
strlwr(b);
sort(a,a+strlen(a));
sort(b,b+strlen(b));
if(!strcmp(a,b))
printf("yes");
else
printf("no");
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment