Cod sursa(job #855550)
| Utilizator | Data | 15 ianuarie 2013 10:31:43 | |
|---|---|---|---|
| Problema | Text | Scor | 40 |
| Compilator | cpp | Status | done |
| Runda | Arhiva de probleme | Marime | 0.41 kb |
#include <iostream>
#include<fstream>
#include<string.h>
using namespace std;
fstream f("text.in",ios::in);
fstream g("text.out",ios::out);
char a[2000000],*p;
long long n=0,nr=0;
int main()
{
f.get(a,2000000);
p=strtok(a," .,?;:'!@#$%^&*_+=-<>/*(){}][~`�$");
while(p)
{nr++;
n+=strlen(p);
p=strtok(NULL," .,?;:'!@#$%^&*_+=-<>/*(){}][~`�$");
}
g<<n/nr;
return 0;
}
