Submission #783250

# Submission time Handle Problem Language Result Execution time Memory
783250 2023-07-14T18:55:07 Z vh50 L-triominoes (CEOI21_ltriominoes) C++17
0 / 100
1 ms 300 KB
#include <bits/stdc++.h>
#define int long long
#define endl "\n"
using namespace std;
int n, m, k;
main()
{
	cin >> n >> m >> k;
	for(int i = 0; i < k; i++)
	{
		int a, b;
		cin >> a >> b;
	}
	if((n * m - k) % 6 == 0 || (n % 3) == 0 && n > 3 || (m % 3) && m > 3)	cout << "YES" << endl;
	else	cout << "NO" << endl;
}

Compilation message

ltrominoes.cpp:6:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    6 | main()
      | ^~~~
ltrominoes.cpp: In function 'int main()':
ltrominoes.cpp:14:42: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
   14 |  if((n * m - k) % 6 == 0 || (n % 3) == 0 && n > 3 || (m % 3) && m > 3) cout << "YES" << endl;
      |                             ~~~~~~~~~~~~~^~~~~~~~
ltrominoes.cpp:14:62: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
   14 |  if((n * m - k) % 6 == 0 || (n % 3) == 0 && n > 3 || (m % 3) && m > 3) cout << "YES" << endl;
      |                                                      ~~~~~~~~^~~~~~~~
# Verdict Execution time Memory Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 1 ms 212 KB Output is correct
3 Correct 1 ms 212 KB Output is correct
4 Correct 1 ms 300 KB Output is correct
5 Correct 1 ms 212 KB Output is correct
6 Correct 1 ms 300 KB Output is correct
7 Correct 1 ms 212 KB Output is correct
8 Correct 1 ms 212 KB Output is correct
9 Incorrect 1 ms 212 KB Output isn't correct
10 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 212 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 1 ms 212 KB Output is correct
3 Incorrect 1 ms 212 KB Output isn't correct
4 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 212 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 212 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 1 ms 212 KB Output is correct
3 Correct 1 ms 212 KB Output is correct
4 Correct 1 ms 300 KB Output is correct
5 Correct 1 ms 212 KB Output is correct
6 Correct 1 ms 300 KB Output is correct
7 Correct 1 ms 212 KB Output is correct
8 Correct 1 ms 212 KB Output is correct
9 Incorrect 1 ms 212 KB Output isn't correct
10 Halted 0 ms 0 KB -