답안 #156758

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
156758 2019-10-07T10:01:23 Z martinunter Preokret (COCI18_preokret) C++14
6.8 / 50
3 ms 376 KB
#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

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;
          ^~~~~~~~
# 결과 실행 시간 메모리 Grader output
1 Partially correct 2 ms 256 KB Output is partially correct
2 Partially correct 2 ms 256 KB Output is partially correct
3 Partially correct 2 ms 256 KB Output is partially correct
4 Partially correct 2 ms 256 KB Output is partially correct
5 Partially correct 2 ms 376 KB Output is partially correct
6 Partially correct 2 ms 376 KB Output is partially correct
7 Partially correct 3 ms 256 KB Output is partially correct
8 Partially correct 3 ms 256 KB Output is partially correct
9 Partially correct 3 ms 256 KB Output is partially correct
10 Correct 2 ms 376 KB Output is correct