Submission #920382

#TimeUsernameProblemLanguageResultExecution timeMemory
920382vjudge1L-triominoes (CEOI21_ltriominoes)C++17
0 / 100
1 ms344 KiB
#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 (stderr)

ltrominoes.cpp:6:2: warning: #warning That's the baby, that's not my baby [-Wcpp]
    6 | #warning That's the baby, that's not my baby
      |  ^~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...