- 博客(2)
- 收藏
- 关注
原创 7-52 两个有序链表序列的交集 STL做法
用好STL内置的求交集函数 #include <bits/stdc++.h> using namespace std; int main() { vector<long long> a,b,c; long long x,length,i; while(true) { scanf("%ld",&x); if(x==-1) break;
2020-11-30 19:57:06
243
原创 7-21 求前缀表达式的值 ~递归的美妙使用
虽然在时间上会比常规作法慢一点点,但看起来实在是十分的简洁易懂 基本的思路还是从右往左计算 #include <bits/stdc++.h> using namespace std; int length, i; double x; double f() { char s[30]; if (!~scanf("%s", s))exit(0); //“!~”意味着没有输入了就返回 if (s[0] == '+' && s[1] != '\0') //处理数字
2020-11-30 19:02:58
707
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人
RSS订阅