Submission #161474

#TimeUsernameProblemLanguageResultExecution timeMemory
161474ToniBKošnja (COCI17_kosnja)C++14
0 / 50
178 ms1272 KiB
#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 (stderr)

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 timeMemoryGrader output
Fetching results...