Submission #156758

#TimeUsernameProblemLanguageResultExecution timeMemory
156758martinunterPreokret (COCI18_preokret)C++14
6.80 / 50
3 ms376 KiB
#include <iostream> using namespace std; int main () { int final_score_a = 0; int final_score_b = 0; int preokret; int score_a;//broj koseva ekipe a int sekunda_a; int ekipa_a[score_a]; int score_b; int sekunda_b; int ekipa_b[score_b]; cin >> score_a; for (int i = 0; i < score_a;i ++){ cin >> sekunda_a; if (sekunda_a <= 1440){ final_score_a++; } } cin >> score_b; for (int i = 0; i < score_b;i ++){ cin >> sekunda_b; if (sekunda_b <= 1440){ final_score_b++; } } cout << final_score_a + final_score_b<< endl; cout << preokret << endl; return 0; }

Compilation message (stderr)

preokret.cpp: In function 'int main()':
preokret.cpp:14:6: warning: unused variable 'ekipa_a' [-Wunused-variable]
  int ekipa_a[score_a];
      ^~~~~~~
preokret.cpp:18:6: warning: unused variable 'ekipa_b' [-Wunused-variable]
  int ekipa_b[score_b];
      ^~~~~~~
preokret.cpp:14:21: warning: 'score_a' is used uninitialized in this function [-Wuninitialized]
  int ekipa_a[score_a];
                     ^
preokret.cpp:18:21: warning: 'score_b' is used uninitialized in this function [-Wuninitialized]
  int ekipa_b[score_b];
                     ^
preokret.cpp:47:10: warning: 'preokret' is used uninitialized in this function [-Wuninitialized]
  cout << preokret << endl;
          ^~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...