Borderou de evaluare (job #1367756)

Utilizator pufstarDragos Gheorghiu pufstar Data 2 martie 2015 08:08:06
Problema Al k-lea termen Fibonacci Status done
Runda Arhiva educationala Compilator cpp | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: user.cpp:5:15: error: conflicting declaration ‘int f [1332030]’ int n, f[2*M+4]; ^ user.cpp:4:10: error: ‘f’ has a previous declaration as ‘std::ifstream f’ ifstream f("kfib.in"); ofstream g("kfib.out"); ^ user.cpp: In function ‘int main()’: user.cpp:9:19: error: no match for ‘operator[]’ (operand types are ‘std::ifstream {aka std::basic_ifstream<char>}’ and ‘int’) n=n%(2*M+2); f[1]=f[2]=1; ^ user.cpp:9:24: error: no match for ‘operator[]’ (operand types are ‘std::ifstream {aka std::basic_ifstream<char>}’ and ‘int’) n=n%(2*M+2); f[1]=f[2]=1; ^ user.cpp:10:30: error: no match for ‘operator[]’ (operand types are ‘std::ifstream {aka std::basic_ifstream<char>}’ and ‘int’) for(int i=3; i<=n; i++) f[i]=(f[i-1]+f[i-2])%M; ^ user.cpp:10:36: error: no match for ‘operator[]’ (operand types are ‘std::ifstream {aka std::basic_ifstream<char>}’ and ‘int’) for(int i=3; i<=n; i++) f[i]=(f[i-1]+f[i-2])%M; ^ user.cpp:10:43: error: no match for ‘operator[]’ (operand types are ‘std::ifstream {aka std::basic_ifstream<char>}’ and ‘int’) for(int i=3; i<=n; i++) f[i]=(f[i-1]+f[i-2])%M; ^ user.cpp:11:9: error: no match for ‘operator[]’ (operand types are ‘std::ifstream {aka std::basic_ifstream<char>}’ and ‘int’) g<<f[n]<<'\n'; ^

Ceva nu functioneaza?