当前位置:网站首页>[pan Wai 1] Huawei computer test
[pan Wai 1] Huawei computer test
2022-06-25 05:15:00 【Jornhitom】
note1. again!
ctrl + F + again! to find the problems that need a double check
hj7. casting
float i;
int j = (int) i;
hj9. unordered_set
unordered_set
reverse(str.begin(), str.end())
set.count
set.insert
hj46. sub string
string s;
s.substr(0, 3); // 3 is not included
hj58. sort vector
vector v;
sort(v.begin(), v.end());
hj2. getline
string array;
getline(cin, array); // this gets more than cin
hj5. ASCII
‘0’ is ASCII 48
‘A’ is ASCII 65
if (s[i] >= ‘0’ && s[i] <= ‘9’)
ans += base * ((int)(s[i]-55));
hj6. prime factor
again!
hj8. map
map<int, int> m;
map<int, int>::iterator it;
it = m.find(a);
m[a] = it->second + b;
it=m.begin(); it!=m.end();it++
hj15. bitset and binary
bitset<32> b(5);
int ans = b.count(); // number of bits that are set
// in this case ans = 2
hj21. password and string.find()
// don’t ever try to to_string(char) because it turns it into its ASCII value
// check https://www.geeksforgeeks.org/string-find-in-cpp/
hj22. a strange question
again!
hj23. a very good practice question
again!
hj31. how to reverse words in a string?
again!
边栏推荐
- Redis (17)
- Working principle of asemi three-phase rectifier bridge
- Baidu ueeditor set toolbar initial value
- ThinkPHP 5 log management
- Abuse unlimited authorization -- is your address safe?
- Go deep into the working principle of browser and JS engine (V8 engine as an example)
- Google Earth Engine(GEE)——全球JRC/GSW1_1/YearlyHistory数据集的批量下载(中国区域)
- CTFHUB SSRF
- Database query optimization method
- Matlab notes
猜你喜欢

How to install the blue lake plug-in to support Photoshop CC 2017

Array: force deduction dichotomy

Eyeshot Ultimate 2022 Crack By Xacker

EL & JSTL (XIII)

How to open the DWG file of the computer

What if win11 Bluetooth fails to connect? Solution of win11 Bluetooth unable to connect

Read the general components of antd source code

How to use the Magic pig system reinstallation master

In depth understanding of line height and vertical align

Small sample learning data set
随机推荐
TeeChart Pro ActiveX 2022.1
Reading and writing of nodejs excel (.Xlsx) files
How micro engine uploads remote attachments
2021-03-23
buuctf web
Database low-end SQL query statement fragment
Svg code snippet of loading animation
What is Ethernet and how to connect the computer
Array and simple function encapsulation cases
Kotlin compose listens to the soft keyboard and clicks enter to submit the event
Penetration test - right raising topic
Try block and exception handling
Deeply understand the characteristics of standard flow and off standard elements
Database overview
Example of dynamic programming 3 leetcode 55
Student achievement management system based on SSH
How to make colleagues under the same LAN connect to their own MySQL database
JS verification code input number auto skip
Drag modal box
Basic knowledge of web pages (URL related)