Header img   

楚虽三户,亡秦必楚



PAT(A) 1074. Reversing Linked List (25)

原题目:

原题链接:https://www.patest.cn/contests/pat-a-practise/1074

1074. Reversing Linked List (25)


Given a constant K and a singly linked list L, you are supposed to reverse the links of every K elements on L. For example, given L being 1→2→3→4→5→6, if K = 3, then you must output 3→2→1→6→5→4; if K = 4, you must output 4→3→2→1

Read More
PAT(A) 1073. Scientific Notation (20)

原题目:

原题链接:https://www.patest.cn/contests/pat-a-practise/1073

1073. Scientific Notation (20)


Scientific notation is the way that scientists easily handle very large numbers or very small numbers. The notation matches the regular expression [+-][1-9]"."[0-9]+E[+-][0-9]+ which means that the integer portion has exactly one

Read More
PAT(A) 1072. Gas Station (30)

原题目:

原题链接:https://www.patest.cn/contests/pat-a-practise/1072

1072. Gas Station (30)


A gas station has to be built at such a location that the minimum distance between the station and any of the residential housing is as far away as possible. However it must guarantee that all the houses are in its service range.

Now give

Read More
PAT(A) 1071. Speech PATterns (25)

原题目:

原题链接:https://www.patest.cn/contests/pat-a-practise/1071

1071. Speech Patterns (25)


People often have a preference among synonyms of the same word. For example, some may prefer "the police", while others may prefer "the cops". Analyzing such patterns can help to narrow down a speaker's identity, which is useful when va

Read More
PAT(A) 1070. Mooncake (25)

原题目:

原题链接:https://www.patest.cn/contests/pat-a-practise/1070

1070. Mooncake (25)


Mooncake is a Chinese bakery product traditionally eaten during the Mid-Autumn Festival. Many types of fillings and crusts can be found in traditional mooncakes according to the region's culture. Now given the inventory amounts and the prices

Read More
PAT(A) 1069. The Black Hole of Numbers (20)

原题目:

原题链接:https://www.patest.cn/contests/pat-a-practise/1069

1069. The Black Hole of Numbers (20)


For any 4-digit integer except the ones with all the digits being the same, if we sort the digits in non-increasing order first, and then in non-decreasing order, a new number can be obtained by taking the second number from t

Read More
PAT(A) 1001. A+B Format (20)

原题目:

原题链接:https://www.patest.cn/contests/pat-a-practise/1001

1001. A+B Format (20)


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 Each input file contains one test case. Each case contains a pa

Read More
直接以管理员身份运行bat代码

直接以管理员身份运行bat代码

``` @echo off

nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system" if '%errorlevel%' NEQ '0' ( goto UACPrompt ) else ( goto gotAdmin ) :UACPrompt echo Set UAC = CreateObject^("Shell.Application"^) > "%temp%\getadmin.vbs" echo UAC.ShellExecute "%~s0", "", "", "runas", 1 >> "%temp%\getadmin.vbs" "%temp

Read More
关于api-ms-win-crt-runtimel1-1-0.dll缺失的解决方案

关于api-ms-win-crt-runtimel1-1-0.dll缺失的解决方案

目录

有时我们在使用文件程序的时候,碰到一些问题,提示dll文件缺失,例如标题中的。 错误提示 有些情况下载这些dll文件补上就行,有些则不行,像标题这种情况,则需要安装一个小程序。

安装VC redit.exe程序解决

是VC的一个程序:[VC redit.exe][1] 链接:https://www.microsoft.com/zh-cn/download/details.aspx?id=48145

下载时选择x86还是x64的根据自己系统的需求,安装成功就可以了。

但是对于有

Read More
PHP 防止文件盗链而读入内存之后下载

PHP 防止文件盗链而读入内存之后下载

给班级做作业管理系统,提供作业打包下载功能。但是因为盗链存在。。使得流量总是超出,导致网站停止。 我用的是万网的免费主机,当年活动免费申请的,免费使用两年。给了1G的空间和每月10G的流量。 我的网站的功能就是学生分别提交自己的作业,等时间差不多了,再由学习委员打包下载。 后来突然有一天邮件提醒我的流量使用超过了限制。。访问网页也提示流量耗尽了。 流量耗尽图片 其实我每月才交一两次作业,每个作业的大小大概是300k,一共50人。反正再怎么使用都不会超过10G的。。引起了我的怀疑。准备查查流量的报告。 ![流量使用报告](http://img.blog.c

Read More