Cod sursa(job #1214100)
| Utilizator | Data | 29 iulie 2014 17:08:49 | |
|---|---|---|---|
| Problema | Text | Scor | 30 |
| Compilator | cpp | Status | done |
| Runda | Arhiva de probleme | Marime | 0.45 kb |
#include <fstream>
#include <cstring>
using namespace std;
ifstream f ("text.in");
ofstream g ("text.out");
char x[100000];
int cuv,nr,ok,i;
int main()
{ ok=0;f.getline(x,100000);i=0;
while(i<strlen(x))
{if (strchr("qazwsxedcrfvtgbyhnujmiklopQAZWSXEDCRFVTGBHYNMJUIKLOP",x[i])!=0&&ok==0)
{nr++;ok=1;cuv++;}
else
if (strchr("qazwsxedcrfvtgbyhnujmiklopQAZWSXEDCRFVTGBHYNMJUIKLOP",x[i])!=0&&ok==1)
{nr++;}
else{
ok=0;}
i++;}
g<<nr/cuv<<'\n';
return 0;
}
