Closed sjtuwater closed 3 years ago
整个二维数组应该被放在同一行,而不是多行,请参考力扣控制台的测试用例输入:
[["5","3",".",".","7",".",".",".","."],["6",".",".","1","9","5",".",".","."],[".","9","8",".",".",".",".","6","."],["8",".",".",".","6",".",".",".","3"],["4",".",".","8",".","3",".",".","1"],["7",".",".",".","2",".",".",".","6"],[".","6",".",".",".",".","2","8","."],[".",".",".","4","1","9",".",".","5"],[".",".",".",".","8",".",".","7","9"]]
抱歉,发现另一个问题,现在并不支持char
类型作为输入
遇到Conversion from JSON to char not implemented
问题时可以暂时在solution的code上面补如下内容:
#include "leetcode-io.h"
template <>
struct lc::conv::Convert<char> {
static void FromJson(char& v, const json::Json& js) {
v = js.GetObject<json::JString>()->GetString().front();
}
static json::Json ToJson(const char& v) {
return json::Json::Create<json::JString>(std::string(1, v));
}
};
对char的支持会在下一次更新时引入
遇到
Conversion from JSON to char not implemented
问题时可以暂时在solution的code上面补如下内容:#include "leetcode-io.h" template <> struct lc::conv::Convert<char> { static void FromJson(char& v, const json::Json& js) { v = js.GetObject<json::JString>()->GetString().front(); } static json::Json ToJson(const char& v) { return json::Json::Create<json::JString>(std::string(1, v)); } };
对char的支持会在下一次更新时引入
牛牛牛~
Issue resolved, commit: dfb6841552ab1e2a7cafeecbedf94535bbf54428