
小米OJ
SYaoJun
这个作者很懒,什么都没留下…
展开
-
找出单独出现的数字
#include <bits/stdc++.h> using namespace std; int main() { int a; int ans = 0; while(cin>>a){ ans^=a; } cout<<ans<<endl; return 0; }原创 2019-09-04 16:41:56 · 239 阅读 · 0 评论 -
大数相减
#include <iostream> #include <vector> #include <algorithm> using namespace std; int main(){ string str; while(cin>>str){ string a, b, res; int k = str.find('-'); a = ...原创 2019-09-04 16:43:04 · 99 阅读 · 0 评论 -
找出旋转有序数列的中间值
#include <iostream> #include <vector> #include <algorithm> #include <cstdio> using namespace std; vector<int> nums; int main(){ char c; int x; while(scanf("%d", &x...原创 2019-09-04 16:43:46 · 144 阅读 · 0 评论 -
第一个缺失正数
#include <iostream> #include <vector> #include <algorithm> #include <cstdio> #include <map> using namespace std; int main(){ int x; char c; map<int, bool> mp; w...原创 2019-09-04 16:44:21 · 143 阅读 · 0 评论 -
爬楼梯
#include <iostream> #include <vector> #include <algorithm> #include <cstdio> #include <map> typedef long long LL; const int N = 100; LL f[N]; using namespace std; int mai...原创 2019-09-04 16:44:54 · 139 阅读 · 0 评论 -
构建短字符串
#include <unordered_map> #include <iostream> using namespace std; int main(){ string a, b; cin>>a>>b; unordered_map<char, int> mp; for(auto c: b) mp[c]++; for(auto c...原创 2019-09-04 16:45:36 · 91 阅读 · 0 评论 -
在一个有序的经过旋转的数组里查找一个数
#include <unordered_map> #include <iostream> #include <vector> using namespace std; int main(){ int x; char c; vector<int> nums; while(cin>>x){ c = getchar(); nu...原创 2019-09-04 16:46:15 · 257 阅读 · 0 评论 -
分糖果
#include <unordered_map> #include <iostream> #include <vector> #include <bitset> #include <algorithm> int res = 0; int f(int apple, int plate){ if(plate > apple) ret...原创 2019-09-05 07:45:29 · 183 阅读 · 0 评论