Borderou de evaluare (job #2309606)

Utilizator divianegoescuDivia Negoescu divianegoescu Data 29 decembrie 2018 14:06:38
Problema Cufar Status done
Runda Arhiva de probleme Compilator cpp-64 | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: main.cpp:3:1: error: 'ifstream' does not name a type ifstream fin("cufar.in");ofstream fout("cufar.out"); ^~~~~~~~ main.cpp:3:26: error: 'ofstream' does not name a type ifstream fin("cufar.in");ofstream fout("cufar.out"); ^~~~~~~~ main.cpp:2:19: error: expected ']' before 'using' #define K 1000000 using namespace std; ^ main.cpp:4:19: note: in expansion of macro 'K' int n,p,i,j,x,k,d[K+1],v[K+1];long long s; ^ main.cpp:4:20: error: expected unqualified-id before '+' token int n,p,i,j,x,k,d[K+1],v[K+1];long long s; ^ main.cpp:4:27: error: expected unqualified-id before '+' token int n,p,i,j,x,k,d[K+1],v[K+1];long long s; ^ main.cpp: In function 'int main()': main.cpp:5:12: error: 'fin' was not declared in this scope int main(){fin>>p>>n; ^~~ main.cpp:6:22: error: 'v' was not declared in this scope while(n--){fin>>x>>k;v[x]=k;} ^ main.cpp:2:19: error: expected ';' before 'using' #define K 1000000 using namespace std; ^ main.cpp:7:12: note: in expansion of macro 'K' for(i=2;i<=K;i++)if(d[i]==0)for(j=i;j<=K;j+=i){d[j]++;if(d[j]==v[j])s+=i;} ^ main.cpp:2:19: error: expected primary-expression before 'using' #define K 1000000 using namespace std; ^ main.cpp:7:12: note: in expansion of macro 'K' for(i=2;i<=K;i++)if(d[i]==0)for(j=i;j<=K;j+=i){d[j]++;if(d[j]==v[j])s+=i;} ^ main.cpp:2:19: error: expected ')' before 'using' #define K 1000000 using namespace std; ^ main.cpp:7:12: note: in expansion of macro 'K' for(i=2;i<=K;i++)if(d[i]==0)for(j=i;j<=K;j+=i){d[j]++;if(d[j]==v[j])s+=i;} ^ main.cpp:7:17: error: expected ';' before ')' token for(i=2;i<=K;i++)if(d[i]==0)for(j=i;j<=K;j+=i){d[j]++;if(d[j]==v[j])s+=i;} ^ main.cpp:2:19: error: expected ';' before 'using' #define K 1000000 using namespace std; ^ main.cpp:7:40: note: in expansion of macro 'K' Non zero exit status: 1

Ceva nu functioneaza?