自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 【Postman】在Tests中获取 headers/body 的信息并填入 environment 中

Postman在tests中获取headers/body的信息并填入environment中# 获取headers中的信息var jsonData = pm.response.headers.get("Connection");pm.environment.set("Connection", jsonData);# 获取body中的信息填入environmentvar jsonData = pm.response.json();var token = jsonData.json.toke

2020-08-29 19:30:43 1855

原创 【Postman】Postman中tests简单语法及使用

Postman中的Tests工具可以帮助我们写一些非常简单的断言帮助我们测试,如果你不熟悉JavaScript语法的话postman还为用户提供了几种模板来写断言。以下是几种比较常用的断言pm.test("响应状态码为200", function () { pm.response.to.have.status(200);});pm.test("响应数据中包含json_key1", function () { pm.expect(pm.response.text()).to..

2020-08-29 18:00:52 3414

原创 牛客网-剑指offer-重建二叉树

运行时间:7ms占用内存:476k/** * Definition for binary tree * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), left(NULL), right(NULL) {} * };...

2018-05-03 16:20:39 168

原创 牛客网-剑指offer-从尾到头打印链表

运行时间:3ms占用内存:608k/*** struct ListNode {* int val;* struct ListNode *next;* ListNode(int x) :* val(x), next(NULL) {* }* };*/class Solution {public:...

2018-05-03 11:20:37 132

原创 牛客网-剑指offer-替换空格

运行时间:6ms占用内存:608kclass Solution {public: void replaceSpace(char *str,int length) { for(int i = 0; i < length - 1; i++) { if(str[i] == ' ') { ...

2018-05-03 11:08:43 148

原创 牛客网-剑指offer-二维数组中的查找

运行时间:13ms占用内存:1496kclass Solution {public: bool Find(int target, vector<vector<int> > array) { int rows = 0; int cols = array[0].size() - 1; while(rows < ar...

2018-05-03 11:00:04 131

原创 c++ string find() 返回值

网上找了半天也没找到谁写的彻底一点,还不如自己动手。#include using namespace std;int main(){ string s; while(cin >> s) { int f = s.find("o"); cout << f << endl; } return 0;}结论:找到就

2016-11-21 13:14:16 19149 5

原创 hdu 2035

http://acm.hdu.edu.cn/showproblem.php?pid=2035#include <iostream>using namespace std;int _pow(int a, int b){ long long sum(1); a %= 1000; while(b > 1) { if(b % 2 == 1) sum = (s

2015-11-11 11:25:39 316

原创 hdu 2022

海选女主角Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 43474 Accepted Submission(s): 19378Problem Description potato老师虽然很喜欢教书,但是迫于生活压力,不得不想办法

2015-10-30 00:06:12 603

原创 hdu 2011

多项式求和Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 54704 Accepted Submission(s): 31792Problem Description 多项式的描述如下: 1 - 1/2 + 1/3 - 1/4

2015-10-15 17:37:23 651

原创 cf 325-B

B. Laurenty and Shoptime limit per test:1 second memory limit per test:256 megabytes input:standard input output:standard output A little boy Laurenty has been playing his favourite game Nota for

2015-10-13 18:24:43 487

原创 cf 325 A

A. Alena’s Schedule time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard output Alena has successfully passed the entrance exams to the university and

2015-10-13 17:49:57 507

原创 hdu 2010

水仙花数Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 130677 Accepted Submission(s): 38395Problem Description 春天是鲜花的季节,水仙花就是其中最迷人的代表,数学上有个水仙花

2015-10-13 17:37:14 311

原创 hdu 2009

求数列的和Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 58441 Accepted Submission(s): 35873Problem Description 数列的定义如下: 数列的第一项为n,以后各项为前一项的平方根

2015-10-13 17:18:45 460

原创 hdu 2008

数值统计Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 73753 Accepted Submission(s): 36832Problem Description 统计给定的n个数中,负数、零和正数的个数。Input 输入数据

2015-10-13 17:05:33 292

空空如也

空空如也

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

TA关注的人

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