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

21
else/topic/2023.h Normal file
View File

@@ -0,0 +1,21 @@
#include <vector>
#include<stack>
using namespace std;
bool test1(vector<int> array){
stack<int> S;
for (int i = 0; i < array.size()/2; i++)
{
S.push(array[i]);
}
int tag = array.size()%2;
for(int i = array.size()/2 + tag;i<array.size();i++){
if (S.top() != array[i])
{
return false;
}
S.pop();
}
return true;
}