diff --git a/GESP/GESP九月四级C++真题.pdf b/GESP/GESP九月四级C++真题.pdf index 414b341..76e06c6 100644 Binary files a/GESP/GESP九月四级C++真题.pdf and b/GESP/GESP九月四级C++真题.pdf differ diff --git a/GESP/sizeof.cpp b/GESP/sizeof.cpp new file mode 100644 index 0000000..723f272 --- /dev/null +++ b/GESP/sizeof.cpp @@ -0,0 +1,47 @@ +#include +using namespace std; + +bool issimilar(string a, string b) { + if (abs((int)a.size() - (int)b.size()) > 1) + return false; + if (a.size() == b.size()) { + int cnt = 0; + for (int i = 0; i < a.size(); i++) { + if (a[i] != b[i]) + if (cnt++ > 1) + return false; + } + return true; + } else { + int cnt = 0; + if (a.size() > b.size()) + swap(a, b); + int j = 0; + for (int i = 0; i < a.size();) { + if (a[i] != b[j]) { + cnt++; + j++; + } else { + i++; + j++; + } + } + if (cnt > 1) + return false; + return true; + } +} + +int main() { + int T; + cin >> T; + while (T--) { + string a, b; + cin >> a >> b; + if (issimilar(a, b)) { + cout << "similar" << endl; + } else + cout << "not similar" << endl; + } + return 0; +} diff --git a/充电桩协议.txt b/充电桩协议.txt new file mode 100644 index 0000000..a5dc0b9 --- /dev/null +++ b/充电桩协议.txt @@ -0,0 +1,2 @@ +【吐血整理】99.5%充电桩设备接入的终极指南 云快充协议!——慧哥慧知充电桩开源系统V2.5.5 +https://blog.csdn.net/Roinli/article/details/138178245 \ No newline at end of file