实验
实验二代码SM3
#include <stdio.h> #include <stdlib.h> #include <string.h> #define SHL(x,n) (x<<n) #define SHR(x,n) (x>>n) #define ROTL(x,n) ((x<<n)|(x>>(32-n))) #def ......
实验二 OpenSSL API使用
sm3代码 #include <stdio.h> #include <openssl/evp.h> #include <openssl/err.h> #include <openssl/rand.h> void handleErrors(void) { ERR_print_errors_fp(std ......
实验1
task 1 1 // 标准库string, vector, array基础用法 2 #include <iostream> 3 #include <string> 4 #include <vector> 5 #include <array> 6 // 函数模板 7 // 对满足特定条件的序列类型T ......
实验一
#include<iostream> #include<string> #include<vector> #include<array> template<typename T> void output1(const T &obj){ for (auto i: obj) std::cout << " ......
实验一
实验任务一 #include <iostream> #include <string> #include <vector> #include <array> template<typename T> void output1(const T &obj) { for(auto i: obj) std: ......
实验一 类和对象
实验任务1: 1 #include<iostream> 2 #include<string> 3 #include<vector> 4 #include<array> 5 6 7 // 函数模板 8 // 对满足特定条件的序列类型T对象,使用范围for输出 9 template<typename T ......
实验1 类和对象_基础编程1
实验一 实验代码: // 标准库string, vector, array基础用法 #include <iostream> #include <string> #include <vector> #include <array> // 函数模板 // 对满足特定条件的序列类型T对象,使用范围for输 ......
实验1 类和对象
// 标准库string, vector, array基础用法 #include <iostream> #include <string> #include <vector> #include <array> // 函数模板 // 对满足特定条件的序列类型T对象,使用范围for输出 template ......
实验1 类和对象
实验任务1 1 #include <iostream> 2 #include <string> 3 #include <vector> 4 #include <array> 5 // 函数模板 6 // 对满足特定条件的序列类型T对象,使用范围for输出 7 template<typename T> ......
实验二
实验任务1 1 #include<stdio.h> 2 #include<stdlib.h> 3 #include<time.h> 4 5 #define N 5 6 #define N1 374 7 #define N2 465 8 9 int main() 10 { 11 int number; ......
实验2
task1.c #include <stdio.h> #include <stdlib.h> #include <time.h> #define N 5 #define N1 374 #define N2 465 int main(){ int number; int i; srand(time(0 ......
实验1 类和对象
task 1: #include <iostream> #include <string> #include <vector> #include <array> template<typename T> void output1(const T &obj) { for (auto i : obj) ......
智能优化算法第一次实验
智能优化算法第一次实验 一、实验目的 (1) 掌握梯度下降法的基础知识及其应用过程; (2) 利用梯度下降法求解简单优化问题。 二、实验原理 梯度下降法是一种最优化算法,由于函数在该点梯度的模代表着函数值在该点最大的变化率,我们可以让函数沿着梯度方向迭代移动逼近函数最值,这就是梯度下降法的基本原理。 ......
实验1
任务1 //标准库string,vector,array基础用法 #include<iostream> #include<string> #include<vector> #include<array> //函数模板 //对满足特定条件的序列类型T对象,使用范围for输出 template<type ......
实验1 类和对象
实验任务一: 1 #include <iostream> 2 #include <string> 3 #include <vector> 4 #include <array> 5 template<typename T> 6 void output1(const T &obj) 7 { 8 for( ......
实验一
任务一 点击查看代码 #include<iostream> #include<string> #include<vector> #include<array> template<typename T> void output1(const T &obj){ for(auto i:obj) std:: ......
实验1 类与对象最终版
// 标准库string, vector, array基础用法#include <iostream>#include <string>#include <vector>#include <array> // 函数模板// 对满足特定条件的序列类型T对象,使用范围for输出template<typen ......
实验一
#include <iostream> #include <string> #include <vector> #include <array> template<typename T> void output1(const T& obj) { for (auto i : obj) std::cou ......
实验一 类与对象
Task 1: #include<iostream> #include<string> #include<vector> #include<array> template<typename T> void output1(const T &obj){ for (auto i: obj) std::c ......
实验1_OOP_22物联网1班_张文瑞
1.实验任务1: 实验源代码: 1 // 标准库string, vector, array基础用法 2 #include <iostream> 3 #include <string> 4 #include <vector> 5 #include <array> 6 // 函数模板 7 // 对满足特 ......
实验二.
test1 #include <stdio.h> #include <stdlib.h> #include <time.h> #define N 5 #define N1 374 #define N2 465 int main() { int number; int i; srand(time(0) ......
实验1 类与对象
实验任务1 源代码: 1 #include<iostream> 2 #include<string> 3 #include<vector> 4 #include<array> 5 6 7 template<typename T> 8 void output1(const T &obj){ 9 for ......
oop 实验1类和对象基础编程
#include <iostream> #include <string> #include <vector> #include <array> // 通用函数(此处是模板函数)用于输出容器中的元素,支持范围for(范围for循环,是一种用于遍历容器、数组和其他序列容器的现代C++迭代循环结构。它提 ......
实验一
1.实验任务一 task1源代码: 1 // 标准库string, vector, array基础用法 2 3 #include<iostream> 4 #include<string> 5 #include<vector> 6 #include<array> 7 8 // 函数模板 9 // 对满 ......
实验二
task.2 #include <stdio.h> int main() { char n; while(scanf("%c", &n)!=EOF) { getchar(); switch(n){ case'r':printf("stop!\n");break; case'g':printf("go ......
实验2 代码
#include <stdio.h>#include <string.h>#include <openssl/evp.h>#include <openssl/err.h>void tDigest(){ unsigned char md_value[EVP_MAX_MD_SIZE]; unsigned ......
山东省实验中学 2023 秋提高级友好学校赛前联测 3 T4
子序列 (sequence) 题目描述 给定一个长度为 \(N\) 的序列 \(A\)。对于一个子序列,若任意两个在子序列中相邻的元素 \(A_x,A_y (x<y)\),都满足 \(A_x < A_y\),且原序列的区间 \([x,y)\) 中不存在严格大于 \(A_x\) 的值,那么我们就说这个 ......
山东省实验中学 2023 秋提高级友好学校赛前联测 3 T3
零一串 (string) 题目描述 给定一个长度为 \(n\) 的 01 串,你需要将它划分成若干段,每一段的长度都不超过 \(m\),且满足以下两种条件之一: 这个段中全部为 \(0\) 或全部为 \(1\). 这个段中 \(0,1\) 数量之差不超过 \(k\). 你需要求出该 01 串合法的划 ......
实验二
实验一 1 #include<stdio.h> 2 #include<stdlib.h> 3 #include<time.h> 4 5 #define N 5 6 #define N1 374 7 #define N2 465 8 int main() 9 { 10 int number; 11 i ......