- 博客(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
2095
原创 【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
3702
原创 牛客网-剑指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
207
原创 牛客网-剑指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
160
原创 牛客网-剑指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
195
原创 牛客网-剑指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
167
原创 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
19715
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
358
原创 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
652
原创 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
685
原创 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
530
原创 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
545
原创 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
349
原创 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
493
原创 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
322
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人