当前位置:网站首页>[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!
边栏推荐
猜你喜欢
随机推荐
For in JS Of and for in
Penetration information collection steps (simplified version)
Create dynamic array
buuctf web
Reading and writing of nodejs excel (.Xlsx) files
Compatible with Internet Explorer
Detailed summary of flex layout
What if win11 Bluetooth fails to connect? Solution of win11 Bluetooth unable to connect
Ranorex Studio 10.1 Crack
Various pits encountered in the configuration of yolov3 on win10
Precise delay based on Cortex-M3 and M4 (systick delay of system timer can be used for STM32, aducm4050, etc.)
Conflict between v-mode and v-decorator in Ant Design
Basic bit operation symbols of C language
Student achievement management system based on SSH
In Net 6 using dotnet format formatting code
Matlab notes
The print area becomes smaller after epplus copies the template
Drag modal box
Eyeshot Ultimate 2022 Crack By Xacker
Handwritten promise all









