This commit is contained in:
2025-09-15 21:12:04 +08:00
commit 3f58f483ff
144 changed files with 5298 additions and 0 deletions

25
23/10/Q1346.h Normal file
View File

@@ -0,0 +1,25 @@
#ifndef LEECODE_C_Q1346_H
#define LEECODE_C_Q1346_H
#include <map>
using namespace std;
class Q1346 {
public:
bool checkIfExist(vector<int>& arr) {
unordered_map<int,int> m;
for(auto i:arr){
m[i] = 1;
}
for(auto [key,value]:m){
if (m[key*2] == 1)
{
return true;
}
}
return false;
}
};
#endif LEECODE_C_Q1346_H