5 Glory232

尚未进行身份认证

暂无相关简介

等级
TA的排名 25w+

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

查看更多

勋章 我的勋章
  • 持之以恒
    持之以恒
    授予每个自然月内发布4篇或4篇以上原创或翻译IT博文的用户。不积跬步无以至千里,不积小流无以成江海,程序人生的精彩需要坚持不懈地积累!