06 2021 档案
摘要:题目—吉祥物 (shiyancang.cn) 1 #include<bits/stdc++.h> 2 using namespace std; 3 int n,x; 4 int pos(int n) 5 { 6 int s=1,j=1; 7 while(s<n) 8 { 9 s+=j++; 10 }
阅读全文
摘要:题目—01字符串 (shiyancang.cn) 1 #include<bits/stdc++.h> 2 using namespace std; 3 4 int main() 5 { 6 string a="0"; 7 int n; 8 cin>>n; 9 string ans=""; 10 if
阅读全文
摘要:题目—统计单词前缀数 (shiyancang.cn) 1 #include<bits/stdc++.h> 2 using namespace std; 3 map<string,int> ans; 4 int main() 5 { 6 string st; 7 while(getline(cin,s
阅读全文
摘要:题目—祝福短信 (shiyancang.cn) 1 #include<bits/stdc++.h> 2 using namespace std; 3 map<string,bool> ans; 4 int n,m,res; 5 string low(string s) 6 { 7 for(int i
阅读全文
摘要:题面描述 MasMas在面试某大厂时遇到了一道有趣的题。面试官要求MasMas写一个程序找出几个数中,出现次数为奇数的那个数。MasMas抓耳挠腮,请你帮帮他。 输入描述 第一行输入一个数nn (1 \leq n \leq 10^7 ,n\mod\ 2\ =\ 1 )(1≤n≤107,nmod 2
阅读全文