# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
920392 | vjudge1 | L-triominoes (CEOI21_ltriominoes) | C++17 | 1 ms | 504 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <iostream>
#include <vector>
#include <algorithm>
#include <cassert>
#include <cstring>
#warning That's the baby, that's not my baby
typedef long long ll;
const int NMAX = 1000;
const int MMAX = 13;
bool dp[NMAX + 1][1 << MMAX];
/// dp[i][mask01] =def= pot face primele i linii bine a.i. pe a i-a linie am 0 daca am pus deja sau 1 daca trebuie completat
int main() {
std::ios_base::sync_with_stdio(false);
std::cin.tie(0);
int n, m, k;
std::cin >> m >> n >> k;
std::vector<std::pair<int, int>> v(k);
for (auto &[x, y] : v) {
std::cin >> y >> x;
x = n - x + 1;
}
/// n = h, m = w
// if (n <= 1000) {
// dp[0][0] = true;
// for (int i = 1; i <= n; i++) {
// for (int mask = 0; mask < (1 << m); mask++) {
// std::vector<int> bits;
// for (int b = 0; b < m; b++) {
// bits.push_back((mask >> b) & 1);
// }
// bool pref[m][2] = {}; /// pref[i][0/1] =def= pot face primele i a.i. al i-lea e 0/1?
// pref[0][0] = true;
// if (bits[0] == 0 && bits[1] == 0) {
// pref[0][1] = true;
// }
// for (int b = 1; b < m; b++) {
// if (bits[b] == 0) {
// if (bits[b - 1] == 0) {
//
// }
// }
// }
// }
// }
// }
if (k == 0) {
if ((ll) n * m % 3 != 0) {
std::cout << "NO";
} else if ((ll) n * m % 6 == 0) {
std::cout << "YES";
} else {
if (n == 3 || m == 3) {
std::cout << "NO";
} else {
std::cout << "YES";
}
}
return 0;
}
return 0;
}
컴파일 시 표준 에러 (stderr) 메시지
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |