Borderou de evaluare (job #2897703)
Utilizator | Data | 4 mai 2022 16:10:57 | |
---|---|---|---|
Problema | Planeta | Status | done |
Runda | Arhiva de probleme | Compilator | cpp-64 | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
main.cpp:9:1: error: expected ',' or ';' before 'int'
9 | int n, x, v[100], i, j, k;
| ^~~
main.cpp: In function 'void sol(int, int, int)':
main.cpp:14:13: error: 'v' was not declared in this scope
14 | for(i = a; v[i - a] * v[b - i] <= k && i <= b; i++)
| ^
main.cpp:16:2: error: reference to 'cout' is ambiguous
16 | cout<<i<<" ";
| ^~~~
In file included from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:75,
from main.cpp:1:
/usr/include/c++/10/iostream:61:18: note: candidates are: 'std::ostream std::cout'
61 | extern ostream cout; /// Linked to standard output
| ^~~~
main.cpp:7:10: note: 'std::ofstream cout'
7 | ofstream cout("planeta.out")
| ^~~~
main.cpp:18:21: error: 'v' was not declared in this scope
18 | sol(a, i - 1, k / v[b - i]);
| ^
main.cpp:20:21: error: 'v' was not declared in this scope
20 | sol(i + 1, b, k % v[b - i]);
| ^
main.cpp: In function 'int main()':
main.cpp:25:2: error: reference to 'cin' is ambiguous
25 | cin>>n>>x;
| ^~~
In file included from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:75,
from main.cpp:1:
/usr/include/c++/10/iostream:60:18: note: candidates are: 'std::istream std::cin'
60 | extern istream cin; /// Linked to standard input
| ^~~
main.cpp:5:10: note: 'std::ifstream cin'
5 | ifstream cin("planeta.in");
| ^~~
main.cpp:25:7: error: 'n' was not declared in this scope; did you mean 'yn'?
25 | cin>>n>>x;
| ^
| yn
main.cpp:25:10: error: 'x' was not declared in this scope
25 | cin>>n>>x;
| ^
main.cpp:26:2: error: 'v' was not declared in this scope
26 | v[0] = 1;
| ^
main.cpp:27:6: error: 'i' was not declared in this scope
27 | for(i = 1; i <= n; i++)
| ^
main.cpp:28:7: error: 'j' was not declared in this scope; did you mean 'jn'?
Non zero exit status: 1
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !