Submission #80004

# Submission time Handle Problem Language Result Execution time Memory
80004 2018-10-18T07:10:54 Z pzdba Košnja (COCI17_kosnja) C++14
20 / 50
24 ms 3272 KB
#include <bits/stdc++.h>
using namespace std;

int main(){
	int k, n, m;
	scanf("%d", &k);
	for(int i=1;i<=k;i++){
		scanf("%d%d", &n, &m);
		int mn = min(n, m);
		if(mn == 1) printf("1\n");
		else printf("%d\n", 2 + (n-2)*2);
	}
}

Compilation message

kosnja.cpp: In function 'int main()':
kosnja.cpp:6:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
  scanf("%d", &k);
  ~~~~~^~~~~~~~~~
kosnja.cpp:8:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   scanf("%d%d", &n, &m);
   ~~~~~^~~~~~~~~~~~~~~~
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 296 KB Output isn't correct
2 Correct 2 ms 376 KB Output is correct
3 Correct 2 ms 456 KB Output is correct
4 Correct 2 ms 664 KB Output is correct
5 Correct 2 ms 664 KB Output is correct
6 Incorrect 15 ms 1088 KB Output isn't correct
7 Incorrect 24 ms 1940 KB Output isn't correct
8 Incorrect 16 ms 2308 KB Output isn't correct
9 Incorrect 23 ms 3008 KB Output isn't correct
10 Incorrect 16 ms 3272 KB Output isn't correct