![](https://img-blog.csdnimg.cn/20201014180756923.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
basic
Knight.Panda
ᕕ(˵•̀෴•́˵)ᕗ上分吗
展开
-
STLbitset
很详细~原创 2019-01-30 22:23:16 · 75 阅读 · 0 评论 -
c++ cctype sort cctype string stoi stod
cctype~isalpha 字母(包括大写、小写)~islower(小写字母)~isupper(大写字母)~isalnum(字母大写小写+数字)~isblank(space和\t)~isspace(space、\t、\r、\n)tolower (->小写toupper(->大写以下是简单的cctype以及sort#include<vector &...原创 2019-01-30 23:05:29 · 147 阅读 · 0 评论 -
string 输出~
#include<bits/stdc++.h>using namespace std;int main(){ string ss="uppanda"; cout<<ss<<endl; printf("%s\n",ss.c_str() ); puts(ss.c_str() );}原创 2019-02-25 17:08:28 · 487 阅读 · 0 评论 -
二叉树的建立
https://blog.csdn.net/ac_blood/article/details/77047877#include <iostream>#include<cstdio>#include<cstdlib>using namespace std;typedef int TelemType;typedef struct BinaryTreeNo...原创 2019-03-02 11:01:00 · 128 阅读 · 0 评论 -
Binary Tree Traversals hdu
Binary Tree TraversalsTime Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 11643 Accepted Submission(s): 5186Problem DescriptionA binary tree ...原创 2019-03-02 14:38:26 · 83 阅读 · 0 评论 -
ios_base::sync_with_stdio(false);
#include<cstdio>#include<iostream>using namespace std;int main(){ ios_base::sync_with_stdio(false); int kk; cin>>kk; cout<<kk;}进行cin效率更高~原创 2019-03-02 20:58:15 · 649 阅读 · 0 评论 -
substr
#include&lt;string &gt;#include&lt;iostream&gt;using namespace std;int main(){ string A="0123456789"; string tt=A.substr(0,2);//0,1 cout&lt;&lt;tt&lt;&lt;endl原创 2019-03-10 15:58:27 · 515 阅读 · 0 评论 -
next_pemutation
遍历#include<iostream>#include<algorithm>using namespace std;int main(){ string str; cin>>str; sort(str.begin(),str.end()); do{ cout<<str<<endl; }while(next_per...原创 2019-03-11 23:12:13 · 187 阅读 · 0 评论 -
背包 note
01 背包n个重量与价值分别为w i,vi,的物品;从中挑选出重量不超过W的物体;求价值总量的最大值手打int dp[maxn+1][maxw+1]void solve(){ for(int i=n-1;i&gt;=0;i--) { for(int j=0;j&lt;=w;j++) { if(j&gt;=w[i]) dp[i][j]=max(dp[i+1][j],d...原创 2019-03-11 23:31:17 · 81 阅读 · 0 评论 -
DFS 填充颜色
题目描述由数字00组成的方阵中,有一任意形状闭合圈,闭合圈由数字11构成,围圈时只走上下左右44个方向。现要求把闭合圈内的所有空间都填写成22.例如:6 \times 66×6的方阵(n=6n=6),涂色前和涂色后的方阵如下:0 0 0 0 0 00 0 1 1 1 10 1 1 0 0 11 1 0 0 0 11 0 0 0 0 11 1 1 1 1 10 0 0 0 0 00...原创 2019-01-29 11:28:20 · 154 阅读 · 0 评论 -
位运算吗
这里是来源 !!!参考并感谢& 与0 & 0 = 0, 0 & 1 = 0, 1 & 0 = 0, 1 & 1 = 1例如,设3的内部表示为000000115的内部表示为00000101则3&5的结果为00000001按位与运算有两种典型用法,一是取一个位串信息的某几位,如以下代码截取x的最低7位:x & 0177。...转载 2019-01-28 23:57:31 · 180 阅读 · 0 评论 -
辗转相除法《
输出最大公约数#include&lt;stdio.h&gt;int main(){ int x=32;//相对大 int y=20;//相对小 while(y!=0){ int temp=x%y; x=y; y=temp; } printf("%d",x); return 0; }原创 2018-12-17 21:51:19 · 111 阅读 · 0 评论 -
动态规划【1】
01背包问题n个重量和价值为Wi ,Vi 的物品,从中挑出总重量不得超过W的物体,求其中方案中的价值总和的最大值递归版#include<cstdio>#include<algorithm>#include<cstring>#define max_n 100#define max_w 100using namespace std;//01背包...原创 2018-12-18 23:21:16 · 104 阅读 · 0 评论 -
星星 浙江工业
星星Description浙工大小希来到依图面试啦,看到公司的宣传板子上写着:“依图科技从事人工智能创新性研究,致力于将先进的人工智能技术与行业应用相结合,建设更加安全、健康、便利的世界。依图带着国际视野组建世界一流的研发团队。我们不是为了把大公司或实验室的技术拿来快速套利,我们参与人工智能领域的基础性科学研究,致力于全面解决机器看、听、理解的根本问题,相信能在计算机视觉、自然语言理解、...原创 2018-12-30 20:11:54 · 147 阅读 · 0 评论 -
cool cooler coolest
cool cooler coolestDescriptionctw收到了一个粉丝送来的手环,手环是由三种ctw最喜欢的颜色的晶石串成的。ctw认为这很“cool”,如果手环上的任意两个相邻的晶石颜色都不同就更“cool”了,当然如果手环上任意三个相邻的晶石颜色都各不相同,那就是最“cool”的了。三种颜色分别用数字1,2,3表示,一串仅包含字符1,2,3的字符串ss表示一个手环。例如 1...原创 2018-12-30 20:14:24 · 458 阅读 · 0 评论 -
STL vector
原创 2019-01-18 23:36:01 · 78 阅读 · 0 评论 -
c++ 基础的一些操作(读入 输出)
-今天我终于知道 为什么你们的代码是彩色的/(ㄒoㄒ)/~~输入输出的基本写法~endl 相当于 \n可以直接写cout<<"hello\n"#include<iostream>using namespace std;int main(){char m;int n; cin>>m; cin>>n;cout<<"hel.原创 2019-01-28 16:05:35 · 108 阅读 · 0 评论 -
STL map
#include&amp;amp;lt;cstdio&amp;amp;gt;#include&amp;amp;lt;map&amp;amp;gt;#include&amp;amp;lt;cstring&amp;amp;gt;using namespace std;int main(){ map&amp;amp;lt;int ,const char*&amp;am原创 2019-01-28 22:43:17 · 104 阅读 · 0 评论 -
c++ stack
stack先进后出的形式#include&lt;stack&gt;#include&lt;cstdio&gt;#include&lt;algorithm&gt;#include&lt;iostream&gt;using namespace std;int main(){ stack&lt;int &gt; m;原创 2019-01-28 22:55:32 · 103 阅读 · 0 评论 -
STL queue
queue 又曰 队列FIFO 先进先出原则#include<queue>#include<iostream>using namespace std;int main(){ queue <int >q; for(int i=0;i<5;i++){ q.push(i-1); } cout<<q.size() <<...原创 2019-01-28 23:12:05 · 72 阅读 · 0 评论 -
deque
#include<bits/stdc++.h>using namespace std;int main(){ //deque double -end deque<int > v1; deque<int >v2(100); deque<int >v3(100,8); deque<int >v4(v3); int ary...原创 2019-03-17 13:23:39 · 95 阅读 · 0 评论