Submission #1189719

#TimeUsernameProblemLanguageResultExecution timeMemory
1189719Muaath_5상형문자열 (IOI24_hieroglyphs)C++20
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> #include "hieroglyphs.h" using namespace std; int N, M; vector<int> lcs(vector<int> s, vector<int> t) { int LCS[N+2][M+2] = {}; for (int i = 1; i <= N; i++) { for (int j = 1; j <= M; j++) { LCS[i][j] = max({LCS[i-1][j], LCS[i][j-1], LCS[i-1][j-1] + (s[i-1] == t[j-1])}); } } vector<int> res; return res; } // A, B // LCS(A, B) = S // // i // LCS1(i-1, j) + LCS2(i+1, j+1) // vector<int> ucs(vector<int> A, vector<int> B) { N = A.size(), M = b.size(); if (A == B) return A; if (A.size() > 3000) return {-1}; return vector<int>(); }

Compilation message (stderr)

hieroglyphs.cpp: In function 'std::vector<int> ucs(std::vector<int>, std::vector<int>)':
hieroglyphs.cpp:33:21: error: 'b' was not declared in this scope
   33 |   N = A.size(), M = b.size();
      |                     ^