我通过FCM控制台收到通知,但使用php脚本未收到通知, 但获得了成功的反应
#include <iostream>
#include <vector>
#include <string_view>
class LCSMemoizer
{
std::vector<std::vector<int>> memory;
std::string_view s1;
std::string_view s2;
public:
LCSMemoizer(std::string_view s1, std::string_view s2)
: memory(s1.size(), std::vector<int>(s2.size(), -1)), s1(s1), s2(s2)
{
}
int run(unsigned int i1, unsigned int i2)
{
if(i1 == s1.size() || i2 == s2.size())
{
return 0;
}
if(memory[i1][i2] != -1)
{
return memory[i1][i2];
}
int sub = 0;
if(s1[i1] == s2[i2])
{
sub = run(i1+1, i2+1);
sub += 1;
}
else
{
sub = std::max(run(i1, i2+1), run(i1+1, i2));
}
memory[i1][i2] = sub;
return sub;
}
};
int lcs(std::string_view s1, std::string_view s2)
{
LCSMemoizer m(s1, s2);
return m.run(0, 0);
}
int main()
{
std::cout << lcs("bd", "abcd");
}
这是我的代码:
{
"multicast_id":5910735205973551931,
"success":1,
"failure":0,
"canonical_ids":0,
"results":[
{"message_id":"0:1546112175917189%8283ae068283ae06"}
]
}