一些函式要記的函式筆記 一些玄學操作

2021-08-21 18:07:34 字數 915 閱讀 1652

std::ios::sync_with_stdio(false);

cin.tie(0);

cout.tie(0);

int n = 15; //二進位制為1111   二進位制1的個數

cout<<__builtin_popcount(n)typedef long long ll;

const int maxn=1e3+5;

int k[maxn][maxn];

int n;

int main() ;

do if(flag)k[ans[0]][ans[n-1]]++;

} while (next_permutation(ans, ans + n));

for(int i=1;i

hypot(3.0,4.0);

1610612741

402653189

201326611

coutmap        快速建立慢查詢

刪除迭代器刪除指定位置

刪除值,刪除所有與之相等的值

//typedef __int128 lll;

templatevoid read(t &w)

templatevoid output(t x)

對齊主要處理相容,和速度問題。

struct student

__attribute__ ((aligned(4)));

struct student

__attribute__ ((packed));

#pragma pack(n)

#pragma pack()

inline 建議內聯,預設是區域性可見,不可extern。

Opencv 一些函式筆記

shape 有一張寬度 高度是300 100,用opencv的img.shape返回的是 100,300,3 shape返回的是影象的行數,列數,色彩通道數。易錯的地方 行數其實對應於座標軸上的y,即表示的是影象的高度 列數對應於座標軸上的x,即表示的是影象的寬度 也就是說shape返回的是 高度,...

oracle中的一些函式筆記

replace函式 replace 最長的字串,被替換的字串,替換字串 數學函式 round n,m 保留m位總共n位長度的數,採用四捨五入的方式。trunc n,m 擷取數字,不寫是直接擷取到整數字。mod m,n 取模函式 floor n 小於等於n的最大函式 ceil n 大於等於n的最大數 ...

python學習中一些函式筆記

round a,d 對a四捨五入,d是小數擷取位數。函式在浮點數運算 比較時用到 a set pypy123 將其它型別變數轉變為集合,建立集合 a 集合間元素沒有順序 a b 集合a,b的並運算 a b 返回包含在a但不在b中的集合 a b 集合a,b的交運算 a b 返回集合a,b的非相同元素 ...