![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
刷题及经验总结
Cantredo
此等萌新也只能划划水,仰望dalao的背影了....
展开
-
51Nod 1113 矩阵快速幂
1113 矩阵快速幂3 秒131,072 KB40 分4 级题给出一个N * N的矩阵,其中的元素均为正整数。求这个矩阵的M次方。由于M次方的计算结果太大,只需要输出每个元素Mod (10^9 + 7)的结果。输入第1行:2个数N和M,中间用空格分隔。N为矩阵的大小,M为M次方。(2 <= N <= 100, 1 <= M <= 10^9)第2 - N ...原创 2018-11-26 22:30:16 · 195 阅读 · 0 评论 -
POJ 1562 Oil Deposits
Oil Deposits| Time Limit: 1000MS | | Memory Limit: 10000K || Total Submissions: 21879 | | Accepted: 11397 |DescriptionThe GeoSurvComp geologic survey company is responsible for detecting under...原创 2018-10-31 22:56:33 · 210 阅读 · 0 评论 -
51Nod 1062 序列中最大的数
1062 序列中最大的数题目来源: Ural 1079基准时间限制:1 秒 空间限制:131072 KB 分值: 10 难度:2级算法题描述有这样一个序列a:a[0] = 0a[1] = 1a[2i] = a[i]a[2i+1] = a[i] + a[i+1]输入一个数N,求a[0] - a[n]中最大的数。a[0] = 0, a[1] = 1, a[2] = 1, a[3] ...原创 2018-10-26 21:55:32 · 133 阅读 · 0 评论 -
HihoCoder 1409 Smallest Sub Array
1409 : Smallest Sub Array时间限制:10000ms单点时限:1000ms内存限制:256MB描述Given an array of integers A, find the smallest contiguous sub array B of A such that when you sort B in ascending order the whole arra...原创 2018-10-29 22:52:54 · 128 阅读 · 0 评论 -
Codeforces Round #517(Div2) A.Golden Plate
A. Golden Platetime limit per test1 secondmemory limit per test256 megabytesinput:standard inputoutput:standard outputYou have a plate and you want to add some gilding to it. The plate is a rec...原创 2018-10-21 22:01:05 · 295 阅读 · 0 评论 -
HDU 1035 Robot Motion
Robot MotionTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 13940 Accepted Submission(s): 6510Problem DescriptionA robot has been progra...原创 2018-10-25 22:28:14 · 142 阅读 · 0 评论 -
HihoCoder 1408 The Lastest Time
1408 : The Lastest Time时间限制:10000ms单点时限:1000ms内存限制:256MB描述What is latest time you can make with 4 digits A, B, C and D?For example if the 4 digits are 1, 0, 0, 0, you can make 4 times with them:...原创 2018-10-28 21:36:35 · 141 阅读 · 0 评论 -
51Nod 1264 线段相交
1264 线段相交基准时间限制:1 秒 空间限制:131072 KB 分值: 0 难度:基础题 收藏 关注描述给出平面上两条线段的两个端点,判断这两条线段是否相交(有一个公共点或有部分重合认为相交)。 如果相交,输出"Yes",否则输出"No"。Input第1行:一个数T,表示输入的测试数量(1 <= T <= 1000)第2 - T + 1行:每行8个数,x1,y1,x...原创 2018-10-20 22:47:35 · 125 阅读 · 0 评论 -
51Nod 1004 n^n的末位数字
1004 n^n的末位数字题目来源: Author Ignatius.L (Hdu 1061)基准时间限制:1 秒 空间限制:131072 KB 分值: 5 难度:1级算法题 收藏 关注描述给出一个整数N,输出N^N(N的N次方)的十进制表示的末位数字。Input一个数N(1 &lt;= N &lt;= 10^9)Output输出N^N的末位数字Input示例13Outpu...原创 2018-10-22 21:23:17 · 154 阅读 · 0 评论 -
HrbustOJ 1109 店长终极推荐
店长终极推荐Time Limit: 2000 MS Memory Limit: 65536 KTotal Submit: 743(214 users) Total Accepted: 261(195 users) Rating: Special Judge: NoDescription玩腻了两个工具之后,店长决定要好好学习.玩工具伤身体啊!!店长决定教大家学习阅读,店长总能总学习中找到乐...原创 2018-10-10 23:13:17 · 440 阅读 · 0 评论 -
HDU 3789 奥运排序问题
奥运排序问题Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 3989 Accepted Submission(s): 1050Problem Description按要求,给国家进行排名。Input有多组数据。第一行给出...原创 2018-10-19 21:44:34 · 236 阅读 · 0 评论 -
P1097 统计数字 洛谷(map)
直接用map容器建立对应关系水过…首先别忘记清空整个map容器,最后输入键使对应的值+1就好了。代码如下:#include <cstdio>#include <iostream>#include <algorithm>#include <string>#include <cstring>#include <cmath&g...原创 2018-10-09 22:10:18 · 320 阅读 · 0 评论 -
洛谷 P1223 排队接水
简单的贪心问题,将需要接水时间最小的放到最前面可使整体接水时间最少。排一下序算一下总时间平均值。代码如下:#include <cstdio>#include <iostream>#include <algorithm>#include <string>#include <cstring>#include <cmath&g...原创 2018-10-15 22:41:30 · 244 阅读 · 0 评论 -
51Nod 1174 区间中最大的数
1174 区间中最大的数基准时间限制:1 秒 空间限制:131072 KB 分值: 0 难度:基础题 收藏 关注描述给出一个有N个数的序列,编号0 - N - 1。进行Q次查询,查询编号i至j的所有数中,最大的数是多少。例如: 1 7 6 3 1。i = 1, j = 3,对应的数为7 6 3,最大的数为7。(该问题也被称为RMQ问题)Input第1行:1个数N,表示序列的长度。(2...原创 2018-10-18 23:08:25 · 152 阅读 · 0 评论 -
POJ 1852 Ants
Ants| Time Limit: 1000MS | | Memory Limit: 30000K || Total Submissions: 25649 | | Accepted: 10081 |DescriptionAn army of ants walk on a horizontal pole of length ...原创 2018-10-24 22:46:44 · 139 阅读 · 0 评论 -
HihoCoder 1448 Split Array
1448 : Split Array时间限制:10000ms单点时限:1000ms内存限制:256MB描述You are given an sorted integer array A and an integer K. Can you split A into several sub-arrays that each sub-array has exactly K continuous...原创 2018-10-27 22:14:22 · 158 阅读 · 0 评论 -
POJ 2387 Til the Cows Come Home
Til the Cows Come Home| Time Limit: 1000MS | | Memory Limit: 65536K || Total Submissions: 76501 | | Accepted: 25456 |DescriptionBessie is out in the field and wan...原创 2018-10-30 23:05:21 · 244 阅读 · 0 评论 -
HDU 1702 ACboy needs your help again!
ACboy needs your help again!**Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 11902 Accepted Submission(s): 5949**Problem DescriptionACbo...原创 2018-11-24 21:26:56 · 171 阅读 · 0 评论 -
HDU 6292 赛题分析
赛题分析Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 512000/512000 K (Java/Others)Total Submission(s): 862 Accepted Submission(s): 503Problem Description著名出题人小Q每次比赛后都会写一份《赛题分析》,包含比赛概况、每题...原创 2018-11-08 23:00:36 · 243 阅读 · 0 评论 -
HrbustOJ 1167 每种面值的货币要多少
每种面值的货币要多少Time Limit: 1000 MS Memory Limit: 65536 KTotal Submit: 596(357 users) Total Accepted: 370(335 users) Rating: Special Judge: NoDescription组织终于发工资了,等了好久的工资终于来了。。。为了让大家能在领工资的时候能尽量快,组织决定一次...原创 2018-11-13 23:05:41 · 328 阅读 · 0 评论 -
HDU 5533 Dancing Stars on Me
Dancing Stars on MeTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 262144/262144 K (Java/Others)Total Submission(s): 2827 Accepted Submission(s): 1636Problem DescriptionThe sky was brus...原创 2018-11-11 23:13:16 · 192 阅读 · 0 评论 -
HDU 1032 The 3n + 1 problem
The 3n + 1 problemTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 48038 Accepted Submission(s): 17355Problem DescriptionProblems in Compu...原创 2018-11-05 22:43:32 · 213 阅读 · 0 评论 -
Codeforces Round #132(Div2) A.Bicycle Chain
A. Bicycle Chaintime limit per test 2 secondstime limit per test1 secondmemory limit per test256 megabytesinput:standard inputoutput:standard outputVasya’s bicycle chain drive consists of two ...原创 2018-11-10 23:00:19 · 132 阅读 · 0 评论 -
ZOJ 1760 Doubles
DoublesTime Limit: 2 Seconds Memory Limit: 65536 KBAs part of an arithmetic competency program, your students will be given randomly generated lists of from 2 to 15 unique positive integers a...原创 2018-11-12 23:17:07 · 163 阅读 · 0 评论 -
Hrbust 2093 真·找规律
真•找规律Time Limit: 500 MS Memory Limit: 65536 KTotal Submit: 1431(910 users) Total Accepted: 1059(880 users) Rating: Special Judge: NoDescription传说大家最喜欢找规律了是不是。 _参见附表,表中都是5位数,他们有很强烈的规律性呦~当然他们肯定不止这...原创 2018-11-04 22:58:03 · 248 阅读 · 0 评论 -
HrbustOJ 1644 水水更健康
水水更健康Time Limit: 1000 MS Memory Limit: 32768 KTotal Submit: 559(275 users) Total Accepted: 223(206 users) Rating: Special Judge: NoDescription水神为了越来越健康,于是决定每天一道水题~Input本题有多组测试数据,每组测试数据占n+1行。第一...原创 2018-11-02 23:04:10 · 203 阅读 · 0 评论 -
51Nod 1137 矩阵乘法
1137 矩阵乘法给出2个N * N的矩阵M1和M2,输出2个矩阵相乘后的结果。输入第1行:1个数N,表示矩阵的大小(2 <= N <= 100)第2 - N + 1行,每行N个数,对应M1的1行(0 <= M1[i] <= 1000)第N + 2 - 2N + 1行,每行N个数,对应M2的1行(0 <= M2[i] <= 1000)输出输出共N行...原创 2018-11-09 20:02:56 · 195 阅读 · 0 评论 -
HDU 6297 CCPC直播
CCPC直播Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 512000/512000 K (Java/Others)Total Submission(s): 1337 Accepted Submission(s): 550Problem De...原创 2018-11-06 22:35:31 · 258 阅读 · 0 评论 -
CSU 2079 觉醒!MACROSS!
觉醒!MACROSS!描述西元2999年,一颗不明的巨大“流星”坠落在位于地球上的CSU(California State University)校园内。为此全世界的专家蜂拥而至,对此展开了密集研究。经过调查证实这其实是一艘外星人的宇宙船!之後世界的某些强国为了将其修复并弥补坠落时对地球环境所造成的破坏而组成了统合政府,交由新组建的地球统合军将其改造成为全长1200公尺的超大型主力战舰,并将其...原创 2018-11-03 23:11:23 · 188 阅读 · 0 评论 -
POJ 2299 Ultra QuickSort
Ultra-QuickSort| Time Limit: 7000MS | | Memory Limit: 65536K || Total Submissions: 72479 | | Accepted: 27197 |DescriptionIn this problem, you have to analyze a particular sorting algorithm. T...原创 2018-11-01 22:49:35 · 209 阅读 · 0 评论 -
51Nod 1384 全排列
STL的应用。想到全排列就想到了STL中的 next_permutation() 函数。用字符串读取输入,用 sort() 对其进行排序,再用 next_permutation() 输出结果。代码如下:#include <cstdio>#include <iostream>#include <algorithm>#include <string&g...原创 2018-10-08 23:22:23 · 172 阅读 · 0 评论 -
P1068 分数线划定 洛谷 (C++)(结构体排序)
简单的结构体排序,代码如下#include <iostream>#include <cstdio>#include <algorithm>#include <cstring>#include <map>#include <cmath>#include <queue>#include &l原创 2018-09-29 20:55:28 · 575 阅读 · 0 评论 -
P1583 魔法照片 洛谷 (C++)(结构体排序)
基本步骤就是先按照weight排一次序,再按增加了额外的权值后再排一次序就好了,注意对应关系,简单的结构体排序。#include <iostream>#include <cmath>#include <stdio.h>#include <cstring>#include <algorithm>#include <cs...原创 2018-09-30 21:15:09 · 416 阅读 · 0 评论 -
[快速幂]a^b
问题 A: 【快速幂】a^b时间限制: 1 Sec 内存限制: 128 MB提交: 703 解决: 159[提交] [状态] [讨论版] [命题人:admin]题目描述求 a 的 b 次方对 p 取模的值,其中 1≤a,b,p≤109输入三个用空格隔开的整数a,b和p。输出一个整数,表示ab mod p的值。样例输入2 3 9样例输出8快速幂模板,代码如下:...原创 2018-09-24 19:54:16 · 545 阅读 · 0 评论 -
P1618 三连击(升级版)洛谷 (C++) (NEXT_PERMUTATION)
与并不是升级版的版本一样的解法…利用STL中的 next_permutation 全排列算法可轻松得到答案注意判断的更改,详情见代码#include <iostream>#include <vector>#include <algorithm>using namespace std ;int main(){ int a , b , ...原创 2018-09-23 17:20:55 · 481 阅读 · 0 评论 -
POJ 2503 Babelfish (c++)(map容器)
BabelfishTime Limit: 3000MS Memory Limit: 65536KTotal Submissions: 48043 Accepted: 20144DescriptionYou have just moved from Waterloo to a big city. The people here speak an incomprehensible dialect of...原创 2018-06-29 18:40:59 · 385 阅读 · 0 评论 -
Codeforces Round #490 (Div. 3) B. Reversing Encryption
B. Reversing Encryptiontime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputA string ss of length nn can be encrypted by the following algorithm:iterate...原创 2018-06-22 11:58:57 · 174 阅读 · 0 评论 -
Twice Equation (ICPC2017 Naning) (java 大数)
5210: Twice Equation时间限制: 1 Sec 内存限制: 128 MB提交: 113 解决: 46[提交][状态][讨论版][命题人:admin]题目描述For given L, find the smallest n no smaller than L for which there exists an positive integer m for which 2m(m +...原创 2018-04-07 21:03:09 · 446 阅读 · 0 评论 -
STring (AtCoder Grand Contest 005) (c++) (栈)
问题 I: STring时间限制: 1 Sec 内存限制: 128 MB提交: 221 解决: 76[提交][状态][讨论版][命题人:admin]题目描述We have a string X, which has an even number of characters. Half the characters are 'S', and the other half are 'T'.Taka...原创 2018-04-14 12:05:37 · 315 阅读 · 0 评论 -
Multiplication Game (RMRC2017) (c++) (质因数分解)
问题 E: Multiplication Game时间限制: 5 Sec 内存限制: 128 MB提交: 256 解决: 59[提交][状态][讨论版][命题人:admin]题目描述Alice and Bob are in their class doing drills on multiplication and division. They quickly get bored and in...原创 2018-05-05 10:42:12 · 344 阅读 · 0 评论