勇敢的趙迦禾

关注

LeetCode 1346. Check If N and Its Double Exist

勇敢的趙迦禾

关注

阅读 201

2022-10-18

​​题目​​

class Solution {
public:
bool checkIfExist(vector<int>& arr) {

for(int i=0;i<arr.size();i++)
{
for(int j=0;j<arr.size();j++)
{
if(i==j)
continue;
if(arr[i]==arr[j]*2)
return true;
}
}

return false;

}
};



相关推荐

静守幸福

[leetcode] 1346. Check If N and Its Double Exist

静守幸福 64 0 0

黄昏孤酒

【leetcode_easy_array】1346. Check If N and Its Double Exist

黄昏孤酒 63 0 0

大柚子top

LeetCode 1346. 检查整数及其两倍数是否存在

大柚子top 97 0 0

香小蕉

C++描述 1346. 回文平方

香小蕉 80 0 0

中间件小哥

Merge Sort and Its Application (LeetCode #493)

中间件小哥 22 0 0

孟祥忠诗歌

Chinese Spelling Check System Based on N-gram Model

孟祥忠诗歌 97 0 0

一天清晨

ERROR 1630 (42000): FUNCTION a.avg does not exist. Check the ‘Function Name Parsing and Resolution‘

一天清晨 62 0 0

hwwjian

Input operand 1 has a mismatch in its core dimension 0, with gufunc signature (n?,k),(k,m?)->(n?,m?)

hwwjian 120 0 0

陆公子521

Please refer to dump files (if any exist) [date].dump, [date]-jvmRun[N]……解决

陆公子521 25 0 0

8052cf60ff5c

LeetCode --- 1832. Check if the Sentence Is Pangram 解题报告

8052cf60ff5c 77 0 0

精彩评论(0)

0 0 举报