自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(29)
  • 收藏
  • 关注

原创 730. Count Different Palindromic Subsequences

class Solution {private : static constexpr long max = 1000000007;public: int countPalindromicSubsequences(string S) { int size = S.size(); vector<vector<int>> dp(...

2018-03-28 15:52:12 294

转载 213. 大牛们的午饭

#include <cstdio>#include <iostream>#define max 1000100#define MAX(x, y) (x) > (y) ? (x) : (y)#define For(i, m, n) for (i = m; i < n; ++i)using namespace std;int a[max], b[max]...

2018-03-28 15:48:39 394

原创 120. 日期

#include <cstdio>#include <iostream>#include <map>using namespace std;int isLeap(int y) { if (y % 400 == 0 || (y % 100 != 0 && y % 4 == 0)) return 1; else return 0;}i...

2018-03-27 21:43:20 196

原创 117. Single Number

#include <cstdio>#include <iostream>#include <map>using namespace std;map<unsigned long long int, int> M;int main(void) { int n; while (scanf("%d", &n) != EOF) { M...

2018-03-27 21:30:11 153

原创 2011计算机C 寻找宝藏

#include <iostream>  #include <cstdio>  #include <cmath>#define max 110  using namespace std;  int Tree[max];  int main(int argc, char** argv) {      int m, n, tar;      whil...

2018-03-22 21:35:38 439

原创 2012网研B 二叉树的层数

#include <iostream>#include <cstdio>#include <vector>#include <map>#define max 110using namespace std;struct E { int left; int right;} nodes[max];map<int, vector&l...

2018-03-20 16:52:00 193

原创 2012计算机D IP数据包解析

#include <iostream>#include <cstdio>#include <string>#include <cstdlib>using namespace std;int main(int argc, char** argv) { int t; scanf("%d", &t); getchar(); fo...

2018-03-20 15:04:05 198

原创 2013计算机D 最小距离查询

#include <iostream>#include <cstdio>#include <string>#define max 200200 using namespace std;char strTmp[max / 2];string str;int ans[max];int lastPosLoc[26];int n;void getAn...

2018-03-20 12:54:35 230

原创 2013计算机B 统计节点个数

#include <iostream>#include <cstdio>#include <vector>using namespace std;int out[1000];vector<int> map[1000];int main(int argc, char** argv) { int t; scanf("%d", &t...

2018-03-20 09:54:58 197

原创 2015计算机C

#include <iostream>#include <cstdio>#define MAX 100using namespace std;int pic[MAX][MAX];int record[MAX][MAX];// 以当前点为右下角的最大的全0正方形边长int min(int a, int b, int c) { if (a < b &...

2018-03-19 23:00:25 139

原创 2017计算机院D

//2//12 30//0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0//0 0 0 0 1 1 1 1 1 1 0 0 0 0 0 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0//0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0//...

2018-03-19 14:22:35 185

原创 2017计算机院C

#include <iostream>#include <cstdio>#include <string>#define MAX 100using namespace std;struct node { struct node* left; struct node* right; int val;} nodes[MAX];int loc = ...

2018-03-19 10:58:28 232

原创 2017计算机院B

#include <iostream>#include <cstdio>#include <string>#include <sstream>#include <cstdlib>#include <algorithm>using namespace std;string int2string(int i) { ...

2018-03-19 10:12:52 226

原创 2017计算机院A

package JavaTest;import java.math.*;import java.util.*;public class JavaTest { public static void main(String[] args) { Scanner in = new Scanner(System.in); int M = in.nextInt(); while (M--...

2018-03-19 08:57:26 208

原创 288. 奇偶求和-软件14

#include <iostream>#include <cstdio>using namespace std;int main(int argc, char** argv) { int T; scanf("%d", &T); while (T--) { int N; scanf("%d", &N); int odd = 0; ...

2018-03-18 18:56:15 585

原创 289. 最长连续等差子数列-软件14

#include <iostream>#include <cstdio>using namespace std;int nums[100];int main(int argc, char** argv) { int T; scanf("%d", &T); while (T--) { int N; scanf("%d", &N); ...

2018-03-18 18:47:48 594

原创 290. 最近公共祖先-软件14

#include <iostream>#include <cstdio>using namespace std;#define MAX 120int Tree[MAX];int LCA(int u, int v, int N) { int uF[MAX]; int vF[MAX]; for (int i = 1; i <= N; ++i) uF[i]...

2018-03-18 17:07:39 296

原创 291. 数据库检索-软件14

#include <iostream>#include <cstdio>#include <string>#include <cstdlib> #include <vector>#include <map>using namespace std;struct P { string name; int sex;...

2018-03-18 15:33:38 438

原创 299. 分数加法-网研14

#include <iostream>#include <cstdio>#include <cmath>using namespace std;int GCD(int a, int b) { return b == 0 ? a : GCD(b, a % b);}int main(int argc, char** argv) { int T; s...

2018-03-17 20:40:57 337

原创 302. 网络传输-网研14

#include <iostream>#include <cstdio>#include <climits>#include <vector>#include <algorithm>using namespace std;#define MAXPOINT 1010struct E { int next; int c;...

2018-03-17 20:22:51 394

原创 301. 进程管理-网研14

#include <iostream>#include <cstdio>#include <map>#include <vector>using namespace std;map<int, vector<int> > M;vector<int> chains[100];int proIdx = 0;

2018-03-17 15:15:44 293

原创 303. 众数-计算机一2014

#include <iostream>#include <cstdio>#include <map>#include <algorithm>#include <vector>using namespace std;map<int,int> M;bool cmp(const pair<int, int>

2018-03-16 22:59:48 263

原创 304. 旋转图像-计算机一2014

#include <iostream>#include <cstdio>using namespace std;char pic[50][50];char res[50][50];void rotate(char src[50][50], char dst[50][50], int srcRow, int srcCol) { for (int i = 0; i ...

2018-03-16 21:31:55 244

原创 305. 网络的核-计算机一2014

#include <iostream>#include <cstdio>#include <vector>#include <climits>using namespace std;int Mat[51][51];//int Mat[51][51][51];struct C { int idx; int cost;}CORE;/...

2018-03-16 20:34:11 189

原创 306. Python List-计算机一2014

#include <iostream>#include <cstdio>#include <string>#include <map>#include <vector>#include <algorithm>#include <cstdlib>using namespace std;map&

2018-03-16 16:54:08 255

原创 309. 中位数-计算机二2014

#include <iostream>#include <cstdio>#include <algorithm> #include <string>#include <sstream>using namespace std;int nums[100]; string int2string(int i) { stringst...

2018-03-16 15:09:25 254

原创 312. 汇编-计算机二2014

#include <iostream>#include <cstdio>#include <string>#include <cstdlib>#include <bitset> using namespace std;struct row { string opt; string a; string b;};unsi...

2018-03-16 14:42:17 154

原创 310. 内存分配-网研14-计算机二14

#include <iostream>#include <cstdio>#include <string>#include <algorithm>using namespace std;#define NMAX 100int MemNow[NMAX];bool visited[NMAX]; // 每个内存块只访问1次int main(...

2018-03-16 13:48:58 209

原创 311. 图像识别-计算机二2014

// 选择C++11或14,否则会报编译错误#include <iostream>#include <stdio.h>#include <math.h>using namespace std;int Mat[100][100];bool mark[100][100];int res[100];int go[][2] = { -1,-1, -...

2018-03-16 09:40:41 290

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除