- 博客(5)
- 收藏
- 关注
原创 python一行以空格隔开输入数组,提交代码显示“RE”,解决方案:
python使用“nums=[map(int,input().split()]"或者"nums=[int(i) for i in input().split()]"以空格隔开输入数组时,如果一行输入的数据太多会导致出现"RE"解决方法:换成这样子输出n=int(input()) #数组长度nums=[]while len(nums)<n: nums+=[int(i) for i in input().split()]就可以完美解决了!...
2022-01-01 10:16:37
996
原创 广西大学oj1510(类Fibonacci数列求值)
运用了矩阵快速幂的方法#include<iostream>#include<cstring>typedef long long ll;const int mod = 1000000007;using namespace std;ll base[3][3];ll ans[3][3];ll temp[3][3];//初始化void NO(ll a,ll b){ memset(base, 0, sizeof base); memset(ans, 0, s..
2021-12-22 11:57:50
260
原创 广西大学oj(给定两个整数 n 和 k,返回范围 [1, n] 中所有可能的 k 个数的组合)
#include<iostream>#include<string>#include<vector>#include<algorithm>using namespace std;vector<vector<int>> result; // 存放符合条件结果的集合vector<int> path; // 用来存放符合条件结果void backtracking(int n, int k, int startI.
2021-12-07 19:35:12
753
原创 广西大学oj1042(小西的数据结构作业)
直接源码,采用的麻烦点个赞呗!#include<iostream>#include<cstdio>#include<cstring>using namespace std;typedef unsigned long long LL;LL arr[5000000] = {};int main(){ LL n, m; LL a, b, c, sum = 0; int t; while (cin >> n >> m) {
2021-12-07 19:30:57
298
原创 广西大学oj1037(小西的c语言作业)
直接展示源码,采用或者用于参考的,麻烦给个赞呗,谢谢!#include <iostream>#include <cmath>#include <string>using namespace std;int main(){ string s; while (cin >> s) { string a, b; char ch = ' '; int A = 0, B = 0; int flag = 1, cnt = 0, unt
2021-12-07 19:23:51
677
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人