摘要: #include <iostream> #include<vector> using namespace std; int main() { vector<int>a; int n; while (cin >> n) { if (n == 0)break; int sum = 0; int i = 阅读全文
posted @ 2023-04-01 17:48 刘海烽 阅读(136) 评论(0) 推荐(0)
摘要: #include <iostream> using namespace std; int cube[105][105]; int main() { int n; cin >> n; for (int i = 1; i <= n; i++) { for (int j = 1; j <= n; j++) 阅读全文
posted @ 2023-04-01 17:27 刘海烽 阅读(20) 评论(0) 推荐(0)
摘要: #include <cstdio> #include <iostream> #include <cstring> using namespace std; bool isprime[40];//用于判断是否为素数 bool isused[20];//用于判断是否重复使用。 int n;//数字个数 阅读全文
posted @ 2023-03-27 21:38 刘海烽 阅读(27) 评论(0) 推荐(0)
摘要: #include<iostream> using namespace std; int main() { int n; while (cin >> n) { int num[10000]; for (int i = 1; i <= n; i++) { cin >> num[i]; } int dp[ 阅读全文
posted @ 2023-03-22 22:12 刘海烽 阅读(20) 评论(0) 推荐(0)
摘要: #include<iostream> #include<math.h> using namespace std; int a[100001]; int z,n; int main(){ while(cin>>a[0]) {cin>>a[1]; cin>>z; for(int j=2;j<z;j++) 阅读全文
posted @ 2023-03-21 11:31 刘海烽 阅读(13) 评论(0) 推荐(0)
摘要: #include<stdio.h> #include<iostream> #include<math.h> #include<algorithm> #include<queue> #include<vector> #define MOD 80112002 using namespace std; i 阅读全文
posted @ 2023-03-14 11:33 刘海烽 阅读(15) 评论(0) 推荐(0)
摘要: 实验四 #include<iostream> #include<cassert> using std::cout; using std::endl; template<class T> class Vector { public: Vector(int n, int m); Vector(int n 阅读全文
posted @ 2022-12-01 17:50 刘海烽 阅读(18) 评论(0) 推荐(0)
摘要: #pragma once #pragma once #include<iostream> #include<string> using namespace std; class MachinePets { public: MachinePets() {} MachinePets(const stri 阅读全文
posted @ 2022-11-28 15:06 刘海烽 阅读(12) 评论(0) 推荐(0)
摘要: #include<iostream> #include<cassert> using std::cout; using std::endl; class vectorInt { public: vectorInt(int n, int m); vectorInt(int n); vectorInt( 阅读全文
posted @ 2022-11-07 21:47 刘海烽 阅读(23) 评论(0) 推荐(0)
摘要: 实验五: #include <iostream> #include <string> #include <iomanip> using namespace std; class Info { private: string nickname; string contact; string city; 阅读全文
posted @ 2022-10-25 17:58 刘海烽 阅读(24) 评论(0) 推荐(0)