Borderou de evaluare (job #1420562)

Utilizator razvan3895Razvan-Mihai Chitu razvan3895 Data 18 aprilie 2015 18:21:39
Problema Deque Status done
Runda Arhiva educationala Compilator cpp | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: user.cpp: In function ‘int main()’: user.cpp:14:2: error: expected initializer before ‘int’ int n, k, sum = 0; ^ user.cpp:16:17: error: ‘n’ was not declared in this scope scanf("%d%d", &n, &k); ^ user.cpp:16:21: error: ‘k’ was not declared in this scope scanf("%d%d", &n, &k); ^ user.cpp:23:10: error: ‘dq’ was not declared in this scope while(!dq.empty() && a.val < dq.back().val) ^ user.cpp:25:3: error: ‘dq’ was not declared in this scope dq.push_back(a); ^ user.cpp:29:10: error: ‘dq’ was not declared in this scope if(i - dq.front().poz >= k) ^ user.cpp:36:10: error: ‘dq’ was not declared in this scope while(!dq.empty() && a.val < dq.back().val) { ^ user.cpp:39:3: error: ‘dq’ was not declared in this scope dq.push_back(a); ^ user.cpp:41:3: error: ‘sum’ was not declared in this scope sum += dq.front().val; ^ user.cpp:44:17: error: ‘sum’ was not declared in this scope printf("%d\n", sum); ^ user.cpp:17:33: warning: ignoring return value of ‘FILE* freopen(const char*, const char*, FILE*)’, declared with attribute warn_unused_result [-Wunused-result] freopen("deque.in", "r", stdin); ^ user.cpp:18:35: warning: ignoring return value of ‘FILE* freopen(const char*, const char*, FILE*)’, declared with attribute warn_unused_result [-Wunused-result] freopen("deque.out", "w", stdout); ^ user.cpp:21:22: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result] scanf("%d", &a.val); ^ user.cpp:32:24: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result] scanf("%d\n", &a.val); ^

Ceva nu functioneaza?