摘要: Java的正则表达式的书写方式:private String reg="\\d+@\\w*\\.\\w{3}";//正则表达式 //"\\d"表示0-9的一个数字"+"表示前缀\\d有1个或者多个 //"\\."表示正则表达式中的."\\w"表示a-zA-Z0-9字符或者数字 //"{3}"表示有三 阅读全文
posted @ 2019-10-07 19:12 pycodego 阅读(366) 评论(0) 推荐(0) 编辑
摘要: #include <iostream> #include <ctime> #include <vector> #include <algorithm> using namespace std; //int perm() { // int data[4] = { 5,2,1,4 }; // sort(data, data + 4); // do { // for (int i = 0; i < 4; 阅读全文
posted @ 2019-10-07 17:39 pycodego 阅读(222) 评论(0) 推荐(0) 编辑
摘要: #include <iostream> #include <vector> #include <string> using namespace std; class Solution { private: int dir[4][2] = { {-1,0},{0,-1},{1,0},{0,1} }; vector<vector<bool>>used; public: bool isCheckMove 阅读全文
posted @ 2019-10-07 17:38 pycodego 阅读(278) 评论(0) 推荐(0) 编辑
摘要: #include #include using namespace std; class Solution { private: vectorp; vector> res; vectorused; public: void GetPerm(vector&nums,int Index,vector&p) { if (p.size() == 2... 阅读全文
posted @ 2019-10-07 17:37 pycodego 阅读(197) 评论(0) 推荐(0) 编辑
摘要: #include <iostream> using namespace std; const int MAXSIZE = 100; typedef struct SQlist { int arr[MAXSIZE]; int Len; } SQlist; bool Init_SQlist(SQlist &space) { memset(space.arr, 0, sizeof(space.arr)) 阅读全文
posted @ 2019-10-07 17:32 pycodego 阅读(265) 评论(0) 推荐(0) 编辑
摘要: class Solution { private int dp[];//构建一个一维数组来存储次数 public int coinChange(int[] coins, int amount) { if (coins == null || coins.length == 0 || amount == 0) { return 0; } dp=new int[amount+1]; Arrays.sor 阅读全文
posted @ 2019-10-07 15:09 pycodego 阅读(367) 评论(0) 推荐(0) 编辑
摘要: #include<bits/stdc++.h> #define ll long long using namespace std; const int maxn=1010; int c[maxn],w[maxn]; int dp[maxn]; int main(){ int n,v; cin>>n>>v; for(int i=1;i<=n;i++) cin>>c[i]; for(int i=1;i 阅读全文
posted @ 2019-10-07 12:12 pycodego 阅读(411) 评论(0) 推荐(0) 编辑