C++&&STL
for(const auto& i:container)
#include
stack<T> S;
S.push();
S.pop();
S.top();
#include
queue<T> Q;
Q.push();
Q.pop();
Q.front();
#include
#include
#include
priority_queue<int,vector<int>,greater<int> > PQ;
priority_queue<int,vector<int>,less<int> > PQ;
priority_queue<node,vector<node>,Rul>
PQ.push();
PQ.pop();
PQ.top();
#include
#include
using namespace std;
list<int> List={
1};
List.push_front(2);
List.push_back(3);
auto it=find(List.begin(),List.end(),val);
if(it!=List.end()){
}
List.insert(it,num);
List.erase(it);
for(const auto& i:List)
#include
next_permutation(A+m,A+n);
prev_permutation(A+m,A+n);
sort(A+m,A+n,less<T>());
sort(A+m,A+n,greater<T>());
bool pq=binary_search(A,A+n,x);
int L=lower_bound(A+m,A+n,x)-A;
int R=upper_bound(A+m,A+n,x)-A;
transform(str.begin(),str.end(),str.begin(),::tolower);
transform(str.begin(),str.end(),str.begin(),::toupper);
reverse(str.begin(),str.end());
#include
int i=atoi(num.c_str());
ll i=strtoll(num.c_str(),NULL,int_base);
base为num的进制数属于[2,36],num[i]属于[0,z],a==10,z==35,不区分大小写
#include
int L=strchr(char s[],char ch)-s;
int R=strrchr(char s[],char ch)-s;
#include
printf("%s\n",str.c_str());
int len=str.size()==str.length();
str.insert(L,str1);
str.erase(L,len);
str.substr(L,len);
str.find(str1);
str.replace(L,len,str1);
str.clear();
int num=stoi(str,nullptr,base);
ull num=stoull(str,nullptr,base);
double num=stod(str,nullptr);
base为num的进制数属于[0,2-36],num[i]属于[0,z],a==10,z==35,不区分大小写
string str=to_string(num);
#include
unordered_map<int,unordered_map<int,int> > UM;
UM[r][c]=x;
#include
set<node> S;
S.insert(val);
cout<<*(--S.end());
#include
bitset<size> bs(x);
bitset<size> bs("101");
cout<<bs<<bs.to_strig()<<bs.to_ullong;
for(int i=size-1;i>=0;i--)cout<<bs[i];