Mai intai trebuie sa te autentifici.
Cod sursa(job #474335)
| Utilizator | Data | 3 august 2010 14:07:12 | |
|---|---|---|---|
| Problema | Text | Scor | 30 |
| Compilator | cpp | Status | done |
| Runda | Arhiva de probleme | Marime | 0.44 kb |
#include<fstream>
#include<string>
using namespace std;
int main()
{char a[300000],b[300000],*p,s[]="0123456789~`!@#$%^&*()-_+=*/':;?/>.<, ",*p1;long long k=0,x=0,y;
ifstream f("text.in");ofstream g("text.out");
f.getline(a,100);
p1=strchr(a,'"');
while(p1)
{k++;p1=strchr(p1+1,'"');}x-=k;
p=strtok(a,s);
while(p)
{
k++;
strcat(b,p);
p=strtok(NULL,s);
}
x=strlen(b);
y=x/k;
g<<y;
f.close();g.close();
return 0;}
