- 博客(4)
- 收藏
- 关注
原创 【家庭财务管理系统】
#include <stdio.h> #include <stdlib.h>//其中包含system函数 #include <conio.h>//定义了通过控制台进行 数据输入 和数据输出的函数,如getch函数。 #include <string.h>//定义字符数组 #include <math.h> #include <iostream> #include <algorithm> using namespace std
2021-12-23 16:22:33 788
原创 巴什博奕问题
巴什博奕 有 n 个石子,两个人轮流取石子,规定每次至少取一个,最多取 m 个。取走 最后一个的人获胜。 称先取的人为先手,后取的人为后手。 请问当 n 与 m 满足什么条件时,先手有必胜策略。当 n 与 m 满足什么条件时, 后手有必胜策略。 #include<stdio.h> int main() { int a; scanf("%d",&a); while(a--) { int n,m; scanf("%d%d",&n,&m); if(n<
2021-01-20 09:07:43 355
原创 求二维数组中的鞍点
求二维数组中的鞍点 题目描述 如果矩阵A中存在这样的一个元素A[i,j]满足条件:A[i,j]是第i行中值最小的元素,且又是第j列中值最大的元素,则称之为该矩阵的一个马鞍点。请编程计算出mn的矩阵A的所有马鞍点。 输入输入m,n然后输入数组中的每个元素输出输出mn的矩阵A的所有马鞍点 样例输入 3 3 1 7 3 5 4 6 17 18 9 样例输出 9 #include<stdio.h> int main() { int m,n; int c=0,d; int i,j;
2021-01-17 17:33:11 1799
原创 Magic Square
问题 I: Magic Square 题目描述 In recreational mathematics, a magic square of n-degree is an arrangement of n2 numbers, distinct integers, in a square, such that the n numbers in all rows, all columns, and both diagonals sum to the same constant. For example, the
2021-01-17 16:52:56 359
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人