pat-basic basic 1036 pat

PAT 甲级【1012 The Best Rank】

本题用java极容易超时,提交了好几次才成功 另外90 88 77 77 50,名次应该是1 2 3 3 5 ,不是1 2 3 3 4 import java.io.*; public class Main { @SuppressWarnings("unchecked") public static ......
甲级 1012 Best Rank PAT

PAT_B1003 我要通过!

“答案正确”是自动判题系统给出的最令人欢喜的回复。本题属于 PAT 的“答案正确”大派送 —— 只要读入的字符串满足下列条件,系统就输出“答案正确”,否则输出“答案错误”。 得到“答案正确”的条件是: 字符串中必须仅有 P、 A、 T这三种字符,不可以包含其它字符; 任意形如 xPATx 的字符串都 ......
我要 PAT_B 1003 PAT

PAT 甲级【1011 World Cup Betting】

import java.io.IOException; import java.io.InputStreamReader; import java.io.StreamTokenizer; public class Main { @SuppressWarnings("unchecked") publi ......
甲级 Betting World 1011 PAT

PAT 甲级【1010 Radix】

本题范围long型(35)^10 枚举radix范围上限pow(n/a0,1/m)上,考虑上限加1.范围较大。使用二分查找枚举 代码如下 import java.io.BufferedReader; import java.io.IOException; import java.io.InputSt ......
甲级 Radix 1010 PAT

PAT_A1029 Median

two_pointers;令两个序列的最后都添加一个很大的数作为哨兵节点,可以简化代码,解决数组问题;使用cin、cout会超时。 ......
Median PAT_A 1029 PAT

PAT 甲级【1009 Product of Polynomials】

/* 系数为0不输出 貌似runtime异常也显示答案不正确*/import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.io.StreamToke ......
甲级 Polynomials Product 1009 PAT

PAT 甲级1008【1008 Elevator】

import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.io.StreamTokenizer; public class Main { @Supp ......
甲级 1008 Elevator PAT

PAT_A1089 Insert or Merge

According to Wikipedia: Insertion sort iterates, consuming one input element each repetition, and growing a sorted output list. Each iteration, insert ......
Insert PAT_A Merge 1089 PAT

PAT 甲级【1007 Maximum Subsequence Sum】

本题是考察动态规划与java的快速输入: max[i]表示第i个结尾的最大的连续子串和。b begin[i]表示第[begin[i],i]为最大和的开始位置 超时代码: import java.io.BufferedReader; import java.io.IOException; import ......
甲级 Subsequence Maximum 1007 PAT

PAT_A1044 Shopping in Mars

Shopping in Mars is quite a different experience. The Mars people pay by chained diamonds. Each diamond has a value (in Mars dollars M$). When making ......
Shopping PAT_A 1044 Mars PAT

PAT 甲级1005【1005 Spell It Right】

用JAVA可以用BigInteger解决。 import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.math.BigInteger; import ......
甲级 1005 Spell Right PAT

PAT 甲级考试【1003 Emergency】

PAT 甲级考试: dfs+dijktasla算法。 import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.*; public cla ......
甲级 Emergency 1003 PAT

PAT_A 1010 Radix

Given a pair of positive integers, for example, 6 and 110, can this equation 6 = 110 be true? The answer is yes, if 6 is a decimal number and 110 is a ......
PAT_A Radix 1010 PAT

Greedy algorithm basic principle

贪心算法是以动态规划方法为基础的,在每个贪心算法之下,几乎总有一个更繁琐的动态规划算法。 贪心算法和动态规划不同之处在于:是否需要考虑子问题的解 贪心算法并不考虑子问题,直接在当前步骤中做出选择 动态规划无论是自底向上, 贪心算法设计步骤 将最优化问题转化为这样的形式:对其做出一次选择后,只剩下一个 ......
algorithm principle Greedy basic

Dynamic programming basic principle

There is a confusing question, i.e. the name of this method is dynamic programming, how can we understand it ? The dynamic programming in chinese is " ......
programming principle Dynamic basic

PAT_A 1085 Perfect Sequence

Given a sequence of positive integers and another positive integer p. The sequence is said to be a perfect sequence if M≤m×p where M and m are the max ......
Sequence Perfect PAT_A 1085 PAT

华为路由器配置NAT,PAT

NAT概述 NAT(Network Address Translation)又称为网络地址转换,用于实现私有网络和公有网络之间的互访。 私有网络地址和公有网络地址 私有网络地址(以下简称私网地址)是指内部网络或主机的IP地址,公有网络地址(以下简称公网地址)是指在互联网上全球唯一的IP地址。IANA ......
路由 路由器 NAT PAT

PAT_A 1038 Recover the Smallest Number

Given a collection of number segments, you are supposed to recover the smallest number from them. For example, given { 32, 321, 3214, 0229, 87 }, we c ......
Smallest Recover Number PAT_A 1038

PAT_A1067 Sort with Swap(0, i)

使用p数组存放各元素当前所处位置,e数组在这里无用。在寻找没有归位的元素时,如果每次从头开始寻找会超时。 ......
PAT_A 1067 Sort with Swap

Secure Code Warrior C# Basic OWASP Web Top 10 2017 8: Insecure deserialization, 9: Using Components with Known Vulnerabilities, 10: Insufficient Logging and Monitoring

Last but not least. These set challenges consist of 8: Insecure deserialization, 9: Using Components with Known Vulnerabilities, 10: Insufficient Logg ......

Secure Code Warrior C# Basic OWASP Web Top 10 2017 5: Broken Access Control, 6: Security Misconfiguration and 7: XSS vulnerabilities

Learn the ropes or hone your skills in secure programming here. These challenges will give you an understanding of 5: Broken Access Control, 6: Securi ......

Secure Code Warrior C# Basic OWASP Web Top 10 2017 1: Injection Flaws and 2: Broken Authentication vulnerabilities 3: Sensitive Data Exposure and 4: XXE vulnerabilities

Let's continue with some other very common application weaknesses. This set of levels will focus on 3: Sensitive Data Exposure and 4: XXE vulnerabilit ......

Secure Code Warrior C# Basic OWASP Web Top 10 2017 1: Injection Flaws and 2: Broken Authentication vulnerabilities

Let's start with the most critical application weaknesses. These challenges get you the foundations of 1: Injection Flaws and 2: Broken Authentication ......

PAT_A1070 Mooncake

Mooncake is a Chinese bakery product traditionally eaten during the Mid-Autumn Festival. Many types of fillings and crusts can be found in traditional ......
Mooncake PAT_A 1070 PAT

PythonNotes_Basic1

基本数据类型 标准数据类型 常见数据类型: Number(数字) String(字符串) bool(布尔类型) List(列表) Tuple(元组) Set(集合) Dictionary(字典) 六个标准数据类型中: 不可变数据(3 个):Number(数字)、String(字符串)、Tuple(元 ......
PythonNotes_Basic PythonNotes Basic

PythonNotes_Basic

Python3 基础 目录 1 基本数据类型 2 数据类型转换 3 算术运算符 4 条件控制 5 条件控制 6 条件控制 ......
PythonNotes_Basic PythonNotes Basic

PAT_B1033 旧键盘打字

旧键盘上坏了几个键,于是在敲一段文字的时候,对应的字符就不会出现。现在给出应该输入的一段文字、以及坏掉的那些键,打出的结果文字会是怎样? 输入格式: 输入在 2 行中分别给出坏掉的那些键、以及应该输入的文字。其中对应英文字母的坏键以大写给出;每段文字是不超过 105 个字符的串。可用的字符包括字母 ......
键盘 PAT_B 1033 PAT

C# RestSharp 添加 Basic Auth 验证

var client = new RestClient("http://example.com"); var Username="123"; var Password="123"; client.Authenticator = new HttpBasicAuthenticator(Username, ......
RestSharp Basic Auth

Basic concepts of complex number

目录虚数的引入复数和虚数的关系Example - 分辨一个数判断两个复数是否相等的条件共轭复数复数的几何意义、复平面的认识求复数的模 虚数的引入 假设有一个数,可以叫它狗逼数,但是不太好听,改成高大上一点,叫成虚数吧! 对它的定义如下: 虚数=i \(i^2\) = -1 这样搞有什么好处吗? 假设 ......
concepts complex number Basic of

PAT 甲级:1002 A+B for Polynomials,测试点说明

1002 A+B for Polynomials 25分 题解:(类似于把两个多项式合并同类项:指数相同的项把系数相加),最后输出新多项式的项数、各项。 需要注意的测试点: 1.输出的新项格式要与输入的一致:[项数] [指数1] [系数1] [指数2] [系数2] ...;且指数递减 2.指数是整型 ......
甲级 Polynomials 1002 PAT for
共300篇  :2/10页 首页上一页2下一页尾页