Borderou de evaluare (job #3137807)
Utilizator | Data | 15 iunie 2023 00:35:18 | |
---|---|---|---|
Problema | Fsb | Status | done |
Runda | Arhiva de probleme | Compilator | cpp-64 | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
main.cpp: In function 'int main()':
main.cpp:2:73: error: no match for 'operator[]' (operand types are 'std::ifstream' {aka 'std::basic_ifstream<char>'} and 'int')
2 | int f[400001],n,S,a,i;char c;int main(){std::ifstream f("fsb.in");f>>n;f[n]=1;for(;i!=n;++i){f>>c;S+=((c-'0')<<1)-1;a+=f[n+S];++f[n+S];}std::ofstream g("fsb.out");g<<a;}
| ^
main.cpp:2:121: error: no match for 'operator[]' (operand types are 'std::ifstream' {aka 'std::basic_ifstream<char>'} and 'int')
2 | int f[400001],n,S,a,i;char c;int main(){std::ifstream f("fsb.in");f>>n;f[n]=1;for(;i!=n;++i){f>>c;S+=((c-'0')<<1)-1;a+=f[n+S];++f[n+S];}std::ofstream g("fsb.out");g<<a;}
| ^
main.cpp:2:130: error: no match for 'operator[]' (operand types are 'std::ifstream' {aka 'std::basic_ifstream<char>'} and 'int')
2 | int f[400001],n,S,a,i;char c;int main(){std::ifstream f("fsb.in");f>>n;f[n]=1;for(;i!=n;++i){f>>c;S+=((c-'0')<<1)-1;a+=f[n+S];++f[n+S];}std::ofstream g("fsb.out");g<<a;}
| ^
Non zero exit status: 1
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !