Borderou de evaluare (job #2948155)
Utilizator | Data | 27 noiembrie 2022 12:41:22 | |
---|---|---|---|
Problema | Lanterna | Status | done |
Runda | Arhiva de probleme | Compilator | cpp-64 | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
main.cpp:15:12: error: conflicting declaration 'std::vector<arc> g [100]'
15 | vector<arc>g[MAX];
| ^
main.cpp:8:10: note: previous declaration as 'std::ofstream g'
8 | ofstream g("lanterna.out");
| ^
main.cpp: In function 'void rd()':
main.cpp:67:10: error: no match for 'operator[]' (operand types are 'std::ofstream' {aka 'std::basic_ofstream<char>'} and 'int')
67 | g[x].push_back({y,ti,wa});
| ^
main.cpp:68:10: error: no match for 'operator[]' (operand types are 'std::ofstream' {aka 'std::basic_ofstream<char>'} and 'int')
68 | g[y].push_back({x,ti,wa});
| ^
main.cpp: In function 'int verific(int)':
main.cpp:87:21: error: no match for 'operator[]' (operand types are 'std::ofstream' {aka 'std::basic_ofstream<char>'} and 'int')
87 | for(i=0; i<g[nodcrt].size(); i++)
| ^
main.cpp:88:23: error: no match for 'operator[]' (operand types are 'std::ofstream' {aka 'std::basic_ofstream<char>'} and 'int')
88 | if(cost>=g[nodcrt][i].w)
| ^
main.cpp:90:24: error: no match for 'operator[]' (operand types are 'std::ofstream' {aka 'std::basic_ofstream<char>'} and 'int')
90 | if(dp[g[nodcrt][i].x][cost-g[nodcrt][i].w]>dp[nodcrt][cost1]+g[nodcrt][i].t)
| ^
main.cpp:90:45: error: no match for 'operator[]' (operand types are 'std::ofstream' {aka 'std::basic_ofstream<char>'} and 'int')
90 | if(dp[g[nodcrt][i].x][cost-g[nodcrt][i].w]>dp[nodcrt][cost1]+g[nodcrt][i].t)
| ^
main.cpp:90:79: error: no match for 'operator[]' (operand types are 'std::ofstream' {aka 'std::basic_ofstream<char>'} and 'int')
90 | if(dp[g[nodcrt][i].x][cost-g[nodcrt][i].w]>dp[nodcrt][cost1]+g[nodcrt][i].t)
| ^
main.cpp:92:25: error: no match for 'operator[]' (operand types are 'std::ofstream' {aka 'std::basic_ofstream<char>'} and 'int')
92 | dp[g[nodcrt][i].x][cost-g[nodcrt][i].w]=dp[nodcrt][cost1]+g[nodcrt][i].t;
| ^
main.cpp:92:46: error: no match for 'operator[]' (operand types are 'std::ofstream' {aka 'std::basic_ofstream<char>'} and 'int')
92 | dp[g[nodcrt][i].x][cost-g[nodcrt][i].w]=dp[nodcrt][cost1]+g[nodcrt][i].t;
| ^
main.cpp:92:80: error: no match for 'operator[]' (operand types are 'std::ofstream' {aka 'std::basic_ofstream<char>'} and 'int')
92 | dp[g[nodcrt][i].x][cost-g[nodcrt][i].w]=dp[nodcrt][cost1]+g[nodcrt][i].t;
| ^
main.cpp:93:30: error: no match for 'operator[]' (operand types are 'std::ofstream' {aka 'std::basic_ofstream<char>'} and 'int')
93 | q.push({g[nodcrt][i].x,cost-g[nodcrt][i].w});
| ^
main.cpp:93:50: error: no match for 'operator[]' (operand types are 'std::ofstream' {aka 'std::basic_ofstream<char>'} and 'int')
93 | q.push({g[nodcrt][i].x,cost-g[nodcrt][i].w});
| ^
main.cpp:93:64: error: no matching function for call to 'std::queue<coada>::push(<brace-enclosed initializer list>)'
93 | q.push({g[nodcrt][i].x,cost-g[nodcrt][i].w});
| ^
In file included from /usr/include/c++/10/queue:64,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:86,
from main.cpp:1:
Non zero exit status: 1
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !