منتديات عالمي حلم

هل تريد التفاعل مع هذه المساهمة؟ كل ما عليك هو إنشاء حساب جديد ببضع خطوات أو تسجيل الدخول للمتابعة.

العالم المليئ بالأحلام

في منتديآت عالمي حلم تتحـقـق أحلامك

    Week (5+) Sheet, problem: (Q)

    Admin
    Admin
    Admin


    عدد المساهمات : 412
    تاريخ التسجيل : 20/10/2010

    Week (5+) Sheet, problem: (Q) Empty Week (5+) Sheet, problem: (Q)

    مُساهمة من طرف Admin الأحد فبراير 12, 2017 3:48 pm

    الكود:
    #include <iostream>
    #include <bits/stdc++.h>
    using namespace std;

    int main () {int q,n,t=0,o=0,S=0,SS=0,f=0,sr=0,first=0,sum=0,counter=0;
        int x,y=1,z,m,s,h,k,c=0,a,b,d,ar[9],g=1,e=0,rr;//a,b,c,d,t,i,j,e,g,rr
        char letter;
        string theword;
        vector<int>v;vector<int>vv;
        set<char>word;
        string so,ha,mo,kha;char fg;
        cin>>S;
        cin>>theword;
        //if (S==1){cout<<-1;return 0;}
        for (int im=0;im<S;im++)
       {
       letter=theword[im];
       word.insert(letter);
       }
       if ((S>26)){cout<<-1;return 0;}
      cout<<S-word.size();
      return 0;
    }

      الوقت/التاريخ الآن هو الثلاثاء مايو 07, 2024 2:03 am