课评: 转出学生归档(王子墨/张立坤/黄俊博)+ 周四班级总结 + 新生章梓皓档案 + C++示例代码

This commit is contained in:
chengzi
2026-09-29 22:43:54 +08:00
parent 6f57dfe67e
commit 73cce4c4f5
116 changed files with 6817 additions and 248 deletions

View File

@@ -0,0 +1,28 @@
#include <bits/stdc++.h>
#define endl '\n'
using namespace std;
int n;
int arr[100100][100100];
int main(){
int n, m;
cin >> n >> m;
for(int i = 1; i <= n; i++){
for(int j = 1; j <= m; j++){
cin >> arr[i][j];
}
}
for(int i = 1; i <= n; i++){
for(int j = 1; j <= m; j++){
cout << arr[i][j];
}
cout << endl;
}
return 0;
}

View File

@@ -0,0 +1,35 @@
#include <bits/stdc++.h>
#define endl '\n'
using namespace std;
int n, m;
int a[110][110];
int b[110][110];
int main(){
cin >> n >> m;
for(int i = 1; i <= n; i++){
for(int j = 1; j <= m; j++){
cin >> a[i][j];
}
}
for(int i = 1; i <= n; i++){
for(int j = 1; j <= m; j++){
cin >> b[i][j];
}
}
int cnt = 0;
for(int i = 1; i <= n; i++){
for(int j = 1; j <= m; j++){
if(a[i][j] == b[i][j]){
cnt++;
}
}
}
cout << fixed << setprecision(2);
cout << 100.0 * cnt / (n * m) ;
return 0;
}

Binary file not shown.

View File

@@ -0,0 +1,33 @@
#include <bits/stdc++.h>
#define endl '\n'
using namespace std;
int n, m, num, cnt = 0;
int arr[110][110];
int main(){
cin >> n >> m;
// 第一幅图
for(int i = 1; i <= n; i++){
for(int j = 1; j <= m; j++){
cin >> arr[i][j];
}
}
// 第二幅图
for(int i = 1; i <= n; i++){
for(int j = 1; j <= m; j++){
// arr[i][j]
cin >> num;
if(num == arr[i][j]){
cnt++;
}
}
}
// 相同的像素块有cnt个 总数 n * m 相同的像素块 / 总数
// int z = n * m;
cout << fixed << setprecision(2) << 100.0 * cnt / (n * m);
return 0;
}

Binary file not shown.

View File

@@ -0,0 +1,39 @@
#include <bits/stdc++.h>
#define endl '\n'
using namespace std;
int n, m;
int cnt = 0;
int a[110][110];
int b[110][110];
int main(){
cin >> n >> m;
// 第一幅画读入
for(int i = 1; i <= n; i++){
for(int j = 1; j <= m; j++){
cin >> a[i][j];
}
}
// 第二幅图
for(int i = 1; i <= n; i++){
for(int j = 1; j <= m; j++){
cin >> b[i][j];
}
}
// 对比两幅图的相同位置进行比较
for(int i = 1; i <= n; i++){
for(int j = 1; j <= m; j++){
if(a[i][j] == b[i][j]){
cnt++;
}
}
}
// 相同点数 除 n * m
cout << fixed << setprecision(2);
cout << 100.0 * cnt / (n * m);
return 0;
}

Binary file not shown.

View File

@@ -0,0 +1,20 @@
#include <bits/stdc++.h>
#define endl '\n'
using namespace std;
int n, m;
int age;
int main(){
cin >> n >> m;
for(int i = 1; i <= n; i++){ // 第i行的所有数据
int maxx = 0;
for(int j = 1; j <= m; j++){
cin >> age;
maxx = max(age, maxx);
}
cout << maxx << endl;
}
return 0;
}

View File

@@ -0,0 +1,22 @@
#include <bits/stdc++.h>
#define endl '\n'
using namespace std;
int n, m, age;
int main(){
cin >> n >> m;
for(int i = 1; i <= n; i++){
int maxx = 0;
for(int j = 1; j <= m; j++){
cin >> age;
maxx = max(maxx, age);
}
cout << maxx << endl;
}
return 0;
}

View File

@@ -0,0 +1,26 @@
#include <bits/stdc++.h>
#define endl '\n'
using namespace std;
int n, m;
int a[110][110];
int main(){
cin >> n >> m;
for(int i = 1; i <= n; i++){
for(int j = 1; j <= m; j++){
cin >> a[i][j];
}
}
for(int j = 1; j <= m; j++){
int maxx = 0;
for(int i = 1; i <= n; i++) {
maxx = max(maxx, a[i][j]);
}
cout << maxx << " ";
}
return 0;
}

Binary file not shown.

View File

@@ -0,0 +1,34 @@
#include <bits/stdc++.h>
#define endl '\n'
using namespace std;
int n, m;
int a[110][110];
int b[110][110];
int main(){
cin >> n >> m;
for(int i = 1; i <= n; i++){
for(int j = 1; j <= m; j++){
cin >> a[i][j];
}
}
for(int i = 1; i <= n; i++){
for(int j = 1; j <= m; j++){
cin >> b[i][j];
}
}
int cnt = 0;
for(int i = 1; i <= n; i++){
for(int j = 1; j <= m; j++){
a[i][j] += b[i][j];
cout << a[i][j] << " ";
}
cout << endl;
}
return 0;
}

Binary file not shown.

View File

@@ -0,0 +1,28 @@
#include <bits/stdc++.h>
#define endl '\n'
using namespace std;
int n;
int arr[110][110];
int main(){
int n, m;
cin >> n >> m;
for(int i = 1; i <= n; i++){
for(int j = 1; j <= m; j++){
cin >> arr[i][j];
}
}
for(int i = 1; i <= n; i++){
for(int j = 1; j <= m; j++){
cout << arr[i][j] << " ";
}
cout << endl;
}
return 0;
}

Binary file not shown.