Borderou de evaluare (job #2103525)
Utilizator | Data | 10 ianuarie 2018 14:04:59 | |
---|---|---|---|
Problema | Parcurgere DFS - componente conexe | Status | done |
Runda | Arhiva educationala | Compilator | cpp | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
user.cpp:5:1: error: ‘vector’ does not name a type
vector<int> adj[100001];
^
user.cpp: In function ‘void DFS(int)’:
user.cpp:11:5: error: ‘stack’ was not declared in this scope
stack<int> S;
^
user.cpp:11:11: error: expected primary-expression before ‘int’
stack<int> S;
^
user.cpp:11:11: error: expected ‘;’ before ‘int’
user.cpp:13:5: error: ‘S’ was not declared in this scope
S.push(start);
^
user.cpp:17:23: error: ‘s’ was not declared in this scope
int current = s.top(); s.pop();
^
user.cpp:21:30: error: ‘adj’ was not declared in this scope
for(auto child : adj[current])
^
user.cpp: In function ‘int main()’:
user.cpp:40:28: warning: format ‘%d’ expects argument of type ‘int*’, but argument 2 has type ‘int’ [-Wformat=]
scanf("%d %d", u, v);
^
user.cpp:40:28: warning: format ‘%d’ expects argument of type ‘int*’, but argument 3 has type ‘int’ [-Wformat=]
user.cpp:42:9: error: ‘adj’ was not declared in this scope
adj[u].push_back(v);
^
user.cpp:33:34: warning: ignoring return value of ‘FILE* freopen(const char*, const char*, FILE*)’, declared with attribute warn_unused_result [-Wunused-result]
freopen("dfs.in", "r", stdin);
^
user.cpp:34:36: warning: ignoring return value of ‘FILE* freopen(const char*, const char*, FILE*)’, declared with attribute warn_unused_result [-Wunused-result]
freopen("dfs.out", "w", stdout);
^
user.cpp:36:38: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
scanf("%d %d", &vertices, &edges);
^
user.cpp:40:29: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
scanf("%d %d", u, v);
^
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !