自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(23)
  • 收藏
  • 关注

转载 实现软甲架构质量属性的战术

架构设计为满足架构需求的质量属性寻找适当的战术,对如何实现特定的质量属性感兴趣。质量需求指定了软件的响应,以实现业务目标。我们感兴趣的是设计使用模式、架构模式或架构策略创建设计的“战术”。是什么使一个设计具有了可移植性,一个设计具有了高性能,而另一个设计具备了可集成性?实现这些质量属性依赖于基本的设计策略。我们将对这些被称为“战术”的设计决策进行分析。战术就是影响质量属性响应控制的设计决策。战术集合称为“架构策略”。架构模式以某种方式将战术打包在一起。

2022-12-03 14:48:38 249

原创 PAT甲级1011 World Cup Betting

题目:With the 2010 FIFA World Cup running, football fans the world over were becoming increasingly excited as the best players from the best teams doing battles for the World Cup trophy in South Africa. Similarly, football betting fans were putting their m

2022-04-08 09:37:49 105

原创 PAT甲级1010 Radix(23分)

题目:Given a pair of positive integers, for example, 6 and 110, can this equation 6 = 110 be true? The answer isyes, if 6 is a decimal number and 110 is a binary number.Now for any pair of positive integersN1​andN2​, your task is to find the radix of...

2022-04-07 17:46:57 116

原创 PAT甲级1009 Product of Polynomials

题目:This time, you are supposed to findA×BwhereAandBare two polynomials.Input Specification:Each input file contains one test case. Each case occupies 2 lines, and each line contains the information of a polynomial:KN1​aN1​​N2​aN2​​...NK...

2022-04-01 10:52:14 82

原创 PAT甲级1008 Elevator

题目:The highest building in our city has only one elevator. A request list is made up withNpositive numbers. The numbers denote at which floors the elevator will stop, in specified order. It costs 6 seconds to move the elevator up one floor, and 4 secon..

2022-04-01 10:44:04 75

原创 PAT甲级1007 Maximum Subsequence Sum

题目:Given a sequence ofKintegers {N1​,N2​, ...,NK​}. A continuous subsequence is defined to be {Ni​,Ni+1​, ...,Nj​} where1≤i≤j≤K. The Maximum Subsequence is the continuous subsequence which has the largest sum of its elements. For example, give...

2022-04-01 09:31:56 98

原创 PAT甲级1006 Sign In and Sign Out

题目:At the beginning of every day, the first person who signs in the computer room will unlock the door, and the last one who signs out will lock the door. Given the records of signing in's and out's, you are supposed to find the ones who have unlocked an

2022-03-31 17:34:12 62

原创 PAT甲级1005 Spell It Right

题目:Given a non-negative integer N, your task is to compute the sum of all the digits of N, and output every digit of the sum in English.Input Specification:Each input file contains one test case. Each case occupies one line which contains an N (≤10^1

2022-03-31 17:24:43 98

原创 PAT甲级1004 Counting Leaves

题目:A family hierarchy is usually presented by a pedigree tree. Your job is to count those family members who have no child.Input Specification:Each input file contains one test case. Each case starts with a line containing0<N<100, the number o.

2022-03-30 16:13:06 123

原创 PAT甲级1003 Emergency

题目:As an emergency rescue team leader of a city, you are given a special map of your country. The map shows several scattered cities connected by some roads. Amount of rescue teams in each city and the length of each road between any pair of cities are m

2022-03-30 15:55:39 64

原创 PAT甲级1002 A+B for Polynomials

题目:This time, you are supposed to findA+BwhereAandBare two polynomials.Input Specification:Each input file contains one test case. Each case occupies 2 lines, and each line contains the information of a polynomial:KN1​aN1​​N2​aN2​​...NK...

2022-03-28 10:24:38 57

原创 PAT甲级1001 A+B Format

题目:Calculate a+b and output the sum in standard format -- that is, the digits must be separated into groups of three by commas (unless there are less than four digits).Input Specification:Each input file contains one test case. Each case contains a p

2022-03-28 10:18:42 265

原创 64位Windows10+Code::Blocks+CUDA安装教程

在做毕设的时候用到了,但再网上没有找到完整而且全面的教程。根据找到的一部分资料、导师的指导还有我自己试出来的解决方案,总结出了如下详细教程。一共包括四个部分:Code::Blocks软件下载,Visual Stdio 2019软件下载,CUDA工具包下载,以及Code::Blocks软件编译器配置。1、Code::Blcoks软件下载本文使用的Code::Blocks软件版本号20.031、登录Code::Blocks官网https://www.codeblocks.org2、点击左侧Down

2021-06-16 21:13:38 1351

原创 自测-5 PAT甲级1042 Shuffling Machine (20 分)

Shuffling is a procedure used to randomize a deck of playing cards. Because standard shuffling techniques are seen as weak, and in order to avoid “inside jobs” where employees collaborate with gamblers by performing inadequate shuffles, many casinos employ

2021-02-16 11:34:06 151

原创 自测-4 Have Fun with Numbers (20 分)

Notice that the number 123456789 is a 9-digit number consisting exactly the numbers from 1 to 9, with no duplication. Double it we will obtain 246913578, which happens to be another 9-digit number consisting exactly the numbers from 1 to 9, only in a diffe

2021-02-16 10:55:46 137

原创 自测-3 数组元素循环右移问题 (20 分)

一个数组A中存有N(>0)个整数,在不允许使用另外数组的前提下,将每个整数循环向右移M(≥0)个位置,即将A中的数据由(A​0​​ A​1​​ ⋯A​N−1​​ )变换为(A​N−M​​ ⋯A​N−1​​ A​0​​ A​1​​ ⋯A​N−M−1​​ )(最后M个数循环移至最前面的M个位置)。如果需要考虑程序移动数据的次数尽量少,要如何设计移动的方法?输入格式:每个输入包含一个测试用例,第1行输入N(1≤N≤100)和M(≥0);第2行输入N个整数,之间用空格分隔。

2021-02-16 10:34:53 189

原创 7-22 龟兔赛跑 (20分)

乌龟与兔子进行赛跑,跑场是一个矩型跑道,跑道边可以随地进行休息。乌龟每分钟可以前进3米,兔子每分钟前进9米;兔子嫌乌龟跑得慢,觉得肯定能跑赢乌龟,于是,每跑10分钟回头看一下乌龟,若发现自己超过乌龟,就在路边休息,每次休息30分钟,否则继续跑10分钟;而乌龟非常努力,一直跑,不休息。假定乌龟与兔子在同一起点同一时刻开始起跑,请问T分钟后乌龟和兔子谁跑得快?输入格式:输入在一行中给出比赛时间T(分钟)。输出格式:在一行中输出比赛的结果:乌龟赢输出@@,兔子赢输出_,平局则输出--;后跟1空格,再输出胜

2021-01-11 16:51:57 152

原创 实验11-1-9 藏尾诗 (20分)

(感觉叫藏尾诗更适合这一题)本题要求编写一个解密藏尾诗的程序。输入格式:输入为一首中文藏尾诗,一共四句。每句一行,但句子不一定是等长的,最短一个汉字,最长九个汉字。注意:一个汉字占两个字节。输出格式:取出每句的最后一个汉字并连接在一起形成一个字符串并输出。同时在末尾输入一个换行符。输入样例:悠悠田园风然而心难平兰花轻涌浪兰香愈幽静输出样例:`风平浪静答案:#include<stdio.h>struct sentence{ char op[20];

2020-09-27 17:54:32 943

原创 实验7-2-10 简易连连看 (20分)

本题要求实现一个简易连连看游戏模拟程序。给定一个2N×2N的方阵网格游戏盘面,每个格子中放置一些符号。这些符号一定是成对出现的,同一个符号可能不止一对。程序读入玩家给出的一对位置(x​1​​ ,y​1​​ )、(x​2​​ ,y​2​​ ),判断这两个位置上的符号是否匹配。如果匹配成功,则将两个符号消为“*”并输出消去后的盘面;否则输出“Uh-oh”。若匹配错误达到3次,则输出“Game Over”并结束游戏。或者当全部符号匹配成功,则输出“Congratulations!”,然后结束游戏

2020-09-25 19:08:53 2338 6

原创 实验7-2-9 螺旋方阵 (20分)

所谓“螺旋方阵”,是指对任意给定的N,将1到N×N的数字从左上角第1个格子开始,按顺时针螺旋方向顺序填入N×N的方阵里。本题要求构造这样的螺旋方阵。输入格式:输入在一行中给出一个正整数N(<10)。输出格式:输出N×N的螺旋方阵。每行N个数字,每个数字占3位。输入样例:5输出样例:1 2 3 4 516 17 18 19 615 24 25 20 714 23 22 21 813 12 11 10 9这题很有意思的。解题思路是给整个矩阵加上下左右四个边框,沿着

2020-09-25 14:36:59 538

原创 找鞍点

一个矩阵元素的“鞍点”是指该位置上的元素值在该行上最大、在该列上最小。本题要求编写程序,求一个给定的n阶方阵的鞍点。输入格式:输入第一行给出一个正整数n(1≤n≤6)。随后n行,每行给出n个整数,其间以空格分隔。输出格式:输出在一行中按照“行下标 列下标”(下标从0开始)的格式输出鞍点的位置。如果鞍点不存在,则输出“NONE”。题目保证给出的矩阵至多存在一个鞍点。输入样例1:41 7 4 14 8 3 61 6 1 20 7 8 9输出样例1:2 1输入样例2:21 74

2020-09-25 10:47:53 5255

原创 实验7-1-11 求整数序列中出现次数最多的数 (15分)

本题要求统计一个整型序列中出现次数最多的整数及其出现次数。输入格式:输入在一行中给出序列中整数个数N(0<N≤1000),以及N个整数。数字间以空格分隔。输出格式:在一行中输出出现次数最多的整数及其出现次数,数字间以空格分隔。题目保证这样的数字是唯一的。输入样例:10 3 2 -1 5 3 4 3 0 3 2输出样例:3 4#include<stdio.h>int main(void){ int a[1000][2];//用第二维标志是否存放数据 int i,j,

2020-09-25 09:02:19 722

原创 实验10-3 递归求阶乘和 (15分)

本题要求实现一个计算非负整数阶乘的简单函数,并利用该函数求 1!+2!+3!+…+n! 的值。函数接口定义:double fact( int n );double factsum( int n );函数fact应返回n的阶乘,建议用递归实现。函数factsum应返回 1!+2!+…+n! 的值。题目保证输入输出在双精度范围内。裁判测试程序样例:#include <stdio.h>double fact( int n );double factsum( int n );int m

2020-09-24 18:50:34 1739

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除