Submission #161474

# Submission time Handle Problem Language Result Execution time Memory
161474 2019-11-02T16:43:48 Z ToniB Košnja (COCI17_kosnja) C++14
0 / 50
178 ms 1272 KB
#include <iostream>

using namespace std;

int main(){
	int k, m, n;
	cin >> k;
	for(int i; i < k; i++){
		cin >> m >> n;
        if(m == 1 or n == 1){
			cout << "0";
		}
	    else if(m < n){
			cout << m*2;
		}
		else{
			cout << n*2;
		}
		
	}
	
	


	return 0;
}

Compilation message

kosnja.cpp: In function 'int main()':
kosnja.cpp:8:2: warning: 'i' may be used uninitialized in this function [-Wmaybe-uninitialized]
  for(int i; i < k; i++){
  ^~~
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 376 KB Output isn't correct
2 Incorrect 2 ms 256 KB Output isn't correct
3 Incorrect 2 ms 376 KB Output isn't correct
4 Incorrect 2 ms 256 KB Output isn't correct
5 Incorrect 2 ms 256 KB Output isn't correct
6 Incorrect 118 ms 888 KB Output isn't correct
7 Incorrect 175 ms 1272 KB Output isn't correct
8 Incorrect 122 ms 888 KB Output isn't correct
9 Incorrect 178 ms 1272 KB Output isn't correct
10 Incorrect 123 ms 1016 KB Output isn't correct