# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
920382 | 2024-02-02T13:58:12 Z | vjudge1 | L-triominoes (CEOI21_ltriominoes) | C++17 | 1 ms | 344 KB |
#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 if (n % 9 == 0 || m % 9 == 0) { std::cout << "YES"; } else { std::cout << "NO"; } } return 0; } return 0; }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 344 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 344 KB | Output is correct |
2 | Correct | 1 ms | 344 KB | Output is correct |
3 | Correct | 0 ms | 344 KB | Output is correct |
4 | Correct | 0 ms | 344 KB | Output is correct |
5 | Correct | 1 ms | 344 KB | Output is correct |
6 | Correct | 0 ms | 344 KB | Output is correct |
7 | Correct | 1 ms | 344 KB | Output is correct |
8 | Correct | 0 ms | 344 KB | Output is correct |
9 | Correct | 0 ms | 344 KB | Output is correct |
10 | Correct | 0 ms | 344 KB | Output is correct |
11 | Correct | 1 ms | 344 KB | Output is correct |
12 | Correct | 0 ms | 344 KB | Output is correct |
13 | Correct | 0 ms | 344 KB | Output is correct |
14 | Correct | 0 ms | 344 KB | Output is correct |
15 | Correct | 0 ms | 344 KB | Output is correct |
16 | Correct | 0 ms | 344 KB | Output is correct |
17 | Correct | 0 ms | 344 KB | Output is correct |
18 | Incorrect | 0 ms | 344 KB | Output isn't correct |
19 | 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 | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 344 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |