# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
920392 | 2024-02-02T14:06:37 Z | vjudge1 | L-triominoes (CEOI21_ltriominoes) | C++17 | 1 ms | 504 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 { std::cout << "YES"; } } return 0; } return 0; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 348 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 344 KB | Output is correct |
2 | Correct | 0 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 | 0 ms | 344 KB | Output is correct |
8 | Correct | 1 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 | 0 ms | 344 KB | Output is correct |
12 | Correct | 1 ms | 344 KB | Output is correct |
13 | Correct | 0 ms | 344 KB | Output is correct |
14 | Correct | 1 ms | 344 KB | Output is correct |
15 | Correct | 1 ms | 504 KB | Output is correct |
16 | Correct | 0 ms | 344 KB | Output is correct |
17 | Correct | 0 ms | 344 KB | Output is correct |
18 | Correct | 1 ms | 344 KB | Output is correct |
19 | Correct | 0 ms | 344 KB | Output is correct |
20 | Correct | 0 ms | 344 KB | Output is correct |
21 | Correct | 0 ms | 344 KB | Output is correct |
22 | Correct | 0 ms | 344 KB | Output is correct |
23 | Correct | 0 ms | 344 KB | Output is correct |
24 | Correct | 1 ms | 344 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 344 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 344 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 344 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 348 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |