답안 #920299

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
920299 2024-02-02T12:27:58 Z vjudge1 L-triominoes (CEOI21_ltriominoes) C++17
0 / 100
1 ms 848 KB
#include <iostream>
#include <complex>
#include <vector>
#include <string>
#include <algorithm>
#include <cstdio>
#include <numeric>
#include <cstring>
#include <ctime>
#include <cstdlib>
#include <set>
#include <map>
#include <unordered_map>
#include <unordered_set>
#include <list>
#include <cmath>
#include <bitset>
#include <cassert>
#include <queue>
#include <stack>
#include <deque>
#include <random>
 
using namespace std;
template<typename T1, typename T2> inline void chkmin(T1 &a, T2 b) {if (a > b) a = b;}
template<typename T1, typename T2> inline void chkmax(T1 &a, T2 b) {if (a < b) a = b;}
#define files(FILENAME) read(FILENAME); write(FILENAME)
#define read(FILENAME) freopen((FILENAME + ".in").c_str(), "r", stdin)
#define write(FILENAME) freopen((FILENAME + ".out").c_str(), "w", stdout)
#define all(c) (c).begin(), (c).end()
#define sz(c) (int)(c).size()
#define left left228
#define right right228
#define y1 y1228
#define mp make_pair
#define pb push_back
#define y2 y2228
#define rank rank228
using ll = long long;
using ld = long double; 
const string FILENAME = "input";

int main() {
	ios_base::sync_with_stdio(false);
	cin.tie(0);
	cout.tie(0);
	//read(FILENAME);
	int w, h, k;
	cin >> w >> h >> k;
	if (k == 0) {
		bool ok = false;
		if ((w * h) % 3 == 0) {
			vector<int> dim;
			dim.pb(w);
			dim.pb(h);
			for (int i = 0; i < 2; i++) {
				int x = dim[i];
				int y = dim[1 - i];
				if (x % 2 == 0 && y % 3 == 0) {
					ok = true;
				}
				if (x % 3 == 0 && y % 2 == 0) {
					ok = true;
				}
				if (x % 6 == 0) {
					ok = true;
				}
			}
			if ((w * h) % 2 == 1 && min(w, h) >= 5) {
				ok = true;
			}
		}
		cout << (ok == true ? "YES" : "NO") << '\n';
	}
	return 0;				
}
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 344 KB Output isn't correct
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 848 KB Output isn't correct
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 344 KB Output isn't correct
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 344 KB Output isn't correct
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 344 KB Output isn't correct
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 344 KB Output isn't correct
2 Halted 0 ms 0 KB -