fork download
  1. // ConsoleApplication4.cpp : Defines the entry point for the console application.
  2. //
  3.  
  4. #include "iostream"
  5. #include "string"
  6. using namespace std;
  7. bool a [26];
  8. void set(char b)
  9. {
  10. b=tolower(b);
  11. a[int(b)-int('a')]=true;
  12. }
  13. bool check()
  14. {
  15. for (int i = 0; i < 26; i++)
  16. {
  17. if(a[i]==false)
  18. return false;
  19.  
  20. }
  21. return true;
  22. }
  23. void rest()
  24. {
  25. for (int i = 0; i < 26; i++)
  26. {
  27. a[i]=false;
  28. }
  29. }
  30.  
  31. int main()
  32. {
  33.  
  34.  
  35. //freopen("in.text","r",stdin);
  36. //freopen("out.txt","w",stdout);
  37. for (int i = 0; i < 26; i++)
  38. {
  39. a[i]=false;
  40. }
  41. int n;
  42. string s;
  43. while(true)
  44. {
  45.  
  46. if (cin>>n)
  47. {
  48.  
  49.  
  50. cin>>s;
  51.  
  52.  
  53. for (int j = 0; j < s.length(); j++)
  54. {
  55. set(s[j]);
  56. }
  57. if (check())
  58. {
  59. cout<<"YES"<<endl;
  60. }
  61. else
  62. {
  63. cout<<"NO"<<endl;
  64. }
  65. rest();
  66. }
  67. else
  68. {
  69. return 0;
  70. }
  71. }
  72. }
  73.  
  74.  
Success #stdin #stdout 0s 3276KB
stdin
21
awdlpadaw
23
dwadmkdaldk

stdout
NO
NO