自定义博客皮肤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)
  • 收藏
  • 关注

原创 Tensorflow安装过程

VMware安装 Ubuntu安装 Python3.5设为默认环境python --versionwhereis python3.5cd /usr/binsudo mv python python_baksudo ln -s /usr/bin/python3.5 /usr/bin/pythonPATH=/usr/bin:$PATHpython --versions...

2019-12-17 20:22:41 128

原创 2020 华为笔试题——Trie树

#include <bits/stdc++.h>using namespace std;int main() { int M; cin >> M; vector<vector<int>> nums(3, vector<int>(M)); for (int i = 0; i < 3; i++) { ...

2019-09-06 09:39:34 968 2

原创 2020 优必选笔试题——N皇后

90%#include<bits/stdc++.h>using namespace std;int n;vector<bool> flag(n, 0);struct queen { int x; int y;};stack<queen> s, temp;int result = 0;bool judge(int x, ...

2019-09-03 20:53:15 458

原创 2020 优必选笔试题——两个正整数的最大公约数

#include<bits/stdc++.h>using namespace std;long long gcd(long long a, long long b) { long long max, min; max = a > b ? a : b; min = a > b ? b : a; if (max % min == 0) { ...

2019-09-03 20:50:18 242

原创 2020 优必选笔试题——计算某一天是周几

蔡勒(Zeller)公式W=Y+[Y/4]+[C/4]-2C+[26(M+1)/10]+d-1公式中的符号含义如下:W为星期数;C为世纪;Y为年(两位数); M为月数(M=m(当m>2);M=m+12(m<3));d为日。#include<bits/stdc++.h>using namespace std;int getResult(int year, ...

2019-09-03 20:48:48 316

原创 2020 VIPKID笔试题——输出一个数转成二进制后1的个数

#include<bits/stdc++.h>using namespace std;int main(){ long long n; cin >> n; long long count = 0; while (n > 0) { if (n & 1) { count++; } ...

2019-09-03 17:09:56 763 1

原创 2020 VIPKID笔试题——找出组数中和为0的数对数目

#include<bits/stdc++.h>using namespace std;void split(string & str, vector<long long> & result, char ch = ',') { result.clear(); istringstream is(str); string tmp; ...

2019-09-03 17:07:53 183

原创 2020 虎牙笔试题——字符串转整型

import java.util.Scanner;public class Main4 { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); String str = scanner.nextLine(); System.out.println(res(str)...

2019-09-03 00:01:09 245

原创 2020 虎牙笔试题——简易版算术表达式编辑器

import java.util.Scanner;public class Main { public static void main(String[] args) { Scanner in = new Scanner(System.in); if(in.hasNext()) { System.out.println(cal(in.nextLine())); } }...

2019-09-02 22:22:57 268

原创 2020 虎牙笔试题——N个人过桥最短时间

#include<iostream>#include<vector>#include<algorithm>using namespace std;int main(){ int m; cin >> m; while (m--) { int n; cin >> n; ...

2019-09-02 22:05:38 544

原创 2020 腾讯笔试题——学习状态评分最高的时间段

60%#include <bits/stdc++.h>using namespace std;int main() { long long n; cin >> n; long long max = 0; vector<long long> a(n); long long i = 0; long long j = ...

2019-09-01 23:57:21 220

原创 2020 腾讯笔试题——顾客不满意度总和最小

#include <iostream>#include <vector>#include <algorithm>using namespace std;struct sat{ long a; long b;};bool cmp(sat a, sat b){ return (a.a - a.b) > (b.a -...

2019-09-01 23:55:21 632

原创 2020 腾讯笔试题——优先级最高的前N个数

#include <bits/stdc++.h>using namespace std;int main() { long long n, m; cin >> n >> m; vector<long long> box(n); vector<long long> key(m); long long ...

2019-09-01 23:52:03 170

原创 2020 拼多多笔试题——数中第K大的值

#include <bits/stdc++.h>using namespace std;int main() { long long n, m, k; cin >> n >> m >> k; if (n == 1 && m == 1) { if (k == 1) { cout ...

2019-09-01 19:26:23 483

原创 2020 拼多多笔试题——输出优先级最高的N个数

AC#include <bits/stdc++.h>using namespace std;void split(string &str, set<long long> &nums, char s = ',') { nums.clear(); string tmp; istringstream is(str); whil...

2019-09-01 18:31:36 296

原创 2020 农行笔试题——软开

现场笔试,笔试四部分(2h)数学(10题,各5题) 智力题 数字计算题 英语(2篇,各5个题) 阅读理解 专业知识 数据库(单选、多选) 数据结构 计算机网络(单选、多选) Linux C\JAVA 测试 性格测试...

2019-09-01 18:29:23 11279 2

原创 2020 瓜子笔试题——最长不连续子序列

瓜子笔试题 求数组高度 保存的是j - i 若求最长不连续子序列个数,dp[i] = max(dp[j] + (i - j), dp[i]); 改成dp[i] = max(dp[j] + 1, dp[i]); #include<iostream>#include<vector>#include<algorithm>#include<c...

2019-08-27 19:00:48 219

原创 2020 瓜子笔试题——大写字母

#include<iostream>#include<string>using namespace std;bool detectCapitalUse(string word) { int len = word.length(); if (len == 0) { return false; } int count = 0; ...

2019-08-27 18:56:50 128

原创 2020 BIGO笔试题——Set Matrix Zeroes

class Solution {public: void setZeroes(vector<vector<int>>& matrix) { int row = matrix.size(); int col = matrix[0].size(); int i, j; int check[r...

2019-08-27 18:55:18 206

原创 2020 BIGO笔试题——Merge k Sorted Lists

/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), next(NULL) {} * }; */class Solution {public: ListNode* m...

2019-08-27 18:19:29 283

原创 2020 BIGO笔试题——findPeakElement

class Solution {public: int findPeakElement(vector<int>& nums) { int front = 0, back = (int)nums.size() - 1, center; while (front < back) { center = (fro...

2019-08-27 18:01:46 234

原创 2020 华为笔试题——剩余可用字符

#include <iostream>#include <string>using namespace std;int main() { string str; getline(cin, str); if (!str.size()) { return 0; } string usedstr = str.substr(str....

2019-08-27 10:36:34 1100

原创 2020 网易笔试题——求两个大数的最大公约数

#include <iostream>#include <string>using namespace std;long long gcd(long long a, long long b) { if (!b) { return a; } else { return gcd(b, a%b); }}int mai...

2019-08-26 21:49:43 261

原创 2020 贝壳笔试题——最小增加总和

#include <iostream>#include <string>#include <vector>#include <sstream>#include<algorithm>using namespace std;int main() { int n; cin >> n; vector...

2019-08-26 21:46:16 282

原创 2020 贝壳笔试题——举重大赛

#include <iostream>#include <string>#include <vector>#include <sstream>#include<algorithm>using namespace std;bool good(int a, int b) { int max = a >= b ? ...

2019-08-26 21:40:34 457

原创 2020 贝壳笔试题——严格最长上升子序列的长度

#include <iostream>#include <algorithm>#include <vector>using namespace std;int main(){ int n, x; vector<int> v, vec; cin >> n; for (int i = 0; i < ...

2019-08-26 21:37:34 131

原创 2020 贝壳笔试题——相邻两数差的绝对值最小

#include <iostream>#include <string>#include <vector>using namespace std;int main() { long long n; cin >> n; vector<long long> temp(n); for (long long ...

2019-08-26 21:08:17 674

原创 2020 SHOPEE笔试题——表达式求值

#include <bits/stdc++.h>using namespace std;map<char, int> priority = { { '+', 1 },{ '-', 1 },{ '*', 2 },{ '/', 2 },{ '(', 0 }};vector<string> poststr;stack<char> o...

2019-08-26 20:57:42 2110

原创 2020 华为笔试题——逻辑运算

#include <bits/stdc++.h>using namespace std;map<char, int> priority = { { '|', 1 },{ '&', 2 },{ '!', 3 },{ '(', 0 }};vector<string> poststr;stack<char> op;voi...

2019-08-26 20:02:49 771

空空如也

空空如也

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

TA关注的人

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