0 csx_zzh

尚未进行身份认证

我要认证

暂无相关简介

等级
TA的排名 13w+

AYIT-2020 609第十六周训练题 A - Spell checker

You, as a member of a development team for a new spell checking program, are to write a module that will check the correctness of given words using a known dictionary of all correct words in all their forms.If the word is absent in the dictionary then it

2020-06-07 22:08:31

AYIT-2020 609第十六周周赛 F - 并查集 (判断是不是一棵树)

A tree is a well-known data structure that is either empty (null, void, nothing) or is a set of one or more nodes connected by directed edges between nodes satisfying the following properties.There is exactly one node, called the root, to which no directe

2020-06-07 21:52:34

AYIT-2020 609第十六周周赛 E - 字符

一块花布条,里面有些图案,另有一块直接可用的小饰条,里面也有一些图案。对于给定的花布条和小饰条,计算一下能从花布条中尽可能剪出几块小饰条来呢?Input输入中含有一些数据,分别是成对出现的花布条和小饰条,其布条都是用可见ASCII字符表示的,可见的ASCII字符有多少个,布条的花纹也有多少种花样。花纹条和小饰条不会超过1000个字符长。如果遇见#字符,则不再进行工作。Output输出能从花纹布中剪出的最多小饰条个数,如果一块都没有,那就老老实实输出0,每个结果之间应换行。Sample Input

2020-06-07 21:41:16

AYIT-2020 609第十六周周赛 D - 搜索(Knight Moves)

A friend of you is doing research on the Traveling Knight Problem (TKP) where you are to find theshortest closed tour of knight moves that visits each square of a given set of n squares on a chessboardexactly once. He thinks that the most difficult part

2020-06-07 21:38:52

AYIT-2020 609第十六周周赛 C - 素数筛

Bamboo Pole-vault is a massively popular sport in Xzhiland. And Master Phi-shoe is a very popular coach for his success. He needs some bamboos for his students, so he asked his assistant Bi-Shoe to go to the market and buy them. Plenty of Bamboos of all po

2020-06-07 17:21:21

AYIT-2020 609第十六周周赛 A - 闭包传递

N (1 ≤ N ≤ 100) cows, conveniently numbered 1…N, are participating in a programming contest. As we all know, some cows code better than others. Each cow has a certain constant skill rating that is unique among the competitors.The contest is conducted in s

2020-06-07 16:57:28

Spell checker(字符串)

You, as a member of a development team for a new spell checking program, are to write a module that will check the correctness of given words using a known dictionary of all correct words in all their forms.If the word is absent in the dictionary then it

2020-06-02 21:28:42

PTA第9章文件作业9-4 程序查重 (10分)

9-4 程序查重 (10分)文件查重:现有两个数据文件,分别为source.txt和dest.txt,编程统计source.txt中有多少行跟dest.txt中同等位置的行内容重复,输出重复率。如: source.txt内容: 第一行为aaa;第二行为bbb;第三行为ccc; 而dest.txt内容: 第一行为aaa;第二行为ddd;第三行为ccc,第四行为bbb 查重系统会发现source.txt的第一行和第三行与dest.txt的第一行和第三行相同,而dest共有四行,所以source.txt的内容

2020-05-23 10:35:26

PTA第9章文件作业9-5 谁是冠军 (10分)

9-5 谁是冠军 (10分)文件查重:若干名选手参加扣篮大赛,共有5个评委,现有一个二进制文件pf.dat,内容为选手参加扣篮大赛决赛的成绩(总分高者获胜),编程找出谁是champion(输出冠军者姓名)。输出格式:如果冠军是zhangwei,则输出zhangwei is champion!struct person { char name[20]; int score[5]; };编写的源程序命名为test.cpp,提交之前,将pf.dat和test.cpp放...

2020-05-23 09:35:43

The Cow Lexicon(DP)

Few know that the cows have their own dictionary with W (1 ≤ W ≤ 600) words, each containing no more 25 of the characters ‘a’…‘z’. Their cowmunication system, based on mooing, is not very accurate; sometimes they hear words that do not make any sense. For

2020-05-20 22:51:32

Find The Multiple

Given a positive integer n, write a program to find out a nonzero multiple m of n whose decimal representation contains only the digits 0 and 1. You may assume that n is not greater than 200 and there is a corresponding m containing no more than 100 decima

2020-05-19 21:42:19

PTA 第9章文件作业 9-3 统计图书 (10分)

有一个存放图书信息的二进制数据文件book.dat(书名,购买年份,价格),统计低于平均书价的图书记录并保存到二进制文件cheapbk.dat。struct books { char sm[30]; int gmrq; int price; };编写的源程序命名为test.cpp,提交之前,将系统提供的book.dat和test.cpp放在src文件夹下,然后在src文件夹的上层文件夹中压缩src.zip,保证这个zip文件中有src文件夹和其中的test.cpp文件。注意:以下example程序为方

2020-05-15 16:40:40

PTA 第9章文件实验 9-2 统计素数 (10分)

实验9 文件 一、实验目的(1)掌握文件以及缓冲文件系统、文件指针的概念。(2)学会使用文件打开、关闭、读写等文件操作函数。(3)掌握对文件进行字符写、块读写的方法。(4)巩固文件教学单元的知识。二、实验内容1、一批整数保存在文本文件in.txt中,统计出的所有素数,保存在out.txt文件中。重要提示:自己编写的程序命名为test.cpp,本地测试test.cpp时,访问in.txt和out.txt不用带路径,当打包提交时test.cpp中in.txt和out.txt的路径修改为./src/

2020-05-14 21:18:49

PTA 第9章文件实验 9-1 求平均值 (10分)

实验9 文件 一、实验目的(1)掌握文件以及缓冲文件系统、文件指针的概念。(2)学会使用文件打开、关闭、读写等文件操作函数。(3)掌握对文件进行字符写、块读写的方法。(4)巩固文件教学单元的知识。二、实验内容1、一批学生数据(包括学号、姓名、3门课成绩)存储在stud.dat文件中,编程实现计算出总的平均成绩并保存在average.dat文件中。提示:平均成绩保留2位小数。struct student{ char num[10]; char name[20]; int score[3];

2020-05-13 19:56:35

PTA 第9章文件作业9-1 统计得分率 (10分)

有一个二进制数据文件zy.dat,内容为一批学生期末考试4道题的得分情况(姓名,成绩1,成绩2,成绩3,成绩4),统计本次考试中每道题(1~4)的得分率并保存到二进制文件result.dat(数据之间用空格隔开)。如:0.783 0.795 0.845 0.914重要提示:自己编写的程序命名为test.cpp,本地测试test.cpp时,访问zy.dat和result.dat不用带路径,当打包提交时将zy.dat和result.dat的路径修改为./src/提交之前,将系统提供的原始zy.dat和te

2020-05-13 17:27:17

K-th Not Divisible by n

You are given two positive integers n and k. Print the k-th positive integer that is not divisible by n.For example, if n=3,and k=7, then all numbers that are not divisible by 3 are: 1,2,4,5,7,8,10,11,13…The 7-th number among them is 10.The first line co

2020-05-10 21:54:58

记忆化搜索

FatMouse has stored some cheese in a city. The city can be considered as a square grid of dimension n: each grid location is labelled (p,q) where 0 <= p < n and 0 <= q < n. At each grid location Fatmouse has hid between 0 and 100 blocks of chee

2020-05-10 09:36:10

搜索

Ignatius被魔王抓走了,有一天魔王出差去了,这可是Ignatius逃亡的好机会.魔王住在一个城堡里,城堡是一个ABC的立方体,可以被表示成A个B*C的矩阵,刚开始Ignatius被关在(0,0,0)的位置,离开城堡的门在(A-1,B-1,C-1)的位置,现在知道魔王将在T分钟后回到城堡,Ignatius每分钟能从一个坐标走到相邻的六个坐标中的其中一个.现在给你城堡的地图,请你计算出Ignatius能否在魔王回来前离开城堡(只要走到出口就算离开城堡,如果走到出口的时候魔王刚好回来也算逃亡成功),如果可

2020-05-09 21:11:09

拓扑

John has n tasks to do. Unfortunately, the tasks are not independent and the execution of one task is only possible if other tasks have already been executed.InputThe input will consist of several instances of the problem. Each instance begins with a lin

2020-05-09 20:20:12

约数

A number whose only prime factors are 2,3,5 or 7 is called a humble number. The sequence 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 14, 15, 16, 18, 20, 21, 24, 25, 27, … shows the first 20 humble numbers.Now given a humble number, please write a program to calcul

2020-05-08 20:41:12

查看更多

勋章 我的勋章
  • 持之以恒
    持之以恒
    授予每个自然月内发布4篇或4篇以上原创或翻译IT博文的用户。不积跬步无以至千里,不积小流无以成江海,程序人生的精彩需要坚持不懈地积累!
  • 勤写标兵Lv4
    勤写标兵Lv4
    授予每个自然周发布9篇以上(包括9篇)原创IT博文的用户。本勋章将于次周周三上午根据用户上周的博文发布情况由系统自动颁发。