随笔分类 - 基本算法-模拟
摘要:A. Chores time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output A. Chores time limit per test
阅读全文
摘要:给定一个集合s(集合元素数量<=30),求出此集合所有子集元素之和。 输入输出格式 输入格式: 集合中的元素(元素<=1000) 输出格式: 和 输入输出样例 输入样例#1: 2 3 输出样例#1: 10 输入样例#1: 2 3 输出样例#1: 10 说明 子集为: [] [2] [3] [2 3]
阅读全文
摘要:题目描述 给出起点和终点的坐标及接下来T个时刻的风向(东南西北),每次可以选择顺风偏移1个单位或者停在原地。求到达终点的最少时间。 如果无法偏移至终点,输出“-1”。 输入输出格式 输入格式: 第一行两个正整数x1,y1,表示小明所在位置。 第二行两个正整数x2,y2,表示小明想去的位置。 第三行一
阅读全文
摘要:题目描述 小强很喜欢数列。有一天,他心血来潮,写下了一个数列。 阿米巴也很喜欢数列。但是他只喜欢其中一种:波动数列。 一个长度为n的波动数列满足对于任何i(1 <= i < n),均有: a[2i-1] <= a[2i] 且 a[2i] >= a[2i+1](若存在) 或者 a[2i-1] >= a
阅读全文
摘要:P3926 SAC E#1 - 一道不可做题 Jelly 【链接】:https://www.luogu.org/problem/show?pid=3926 题目背景 SOL君(炉石主播)和SOL菌(完美信息教室讲师)是好朋友。 题目描述 SOL君很喜欢吃蒟蒻果冻。而SOL菌也很喜欢蒟蒻果冻。 有一天
阅读全文
摘要:题目1 : Visiting Peking University 题目1 : Visiting Peking University 时间限制:1000ms 单点时限:1000ms 内存限制:256MB 描述 Ming is going to travel for n days and the dat
阅读全文
摘要:A. Mahmoud and Ehab and the MEX time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output A. Mahmo
阅读全文
摘要:Problem Description The Chinese Zodiac, known as Sheng Xiao, is based on a twelve-year cycle, each year in the cycle related to an animal sign. These
阅读全文
摘要:#include<iostream> #include<cstdio> #include<cmath> #include<cstring> #include<algorithm> #include<set> #include<bitset> #include<map> #include<queue>
阅读全文
摘要:A HDU - 6023 【题意】:求AC题数和总时长。 【分析】:模拟。设置标记数组记录AC与否,再设置错题数组记录错的次数。罚时罚在该题上,该题没AC则不计入总时间,AC则计入。已经AC的题不用再管,因为不会再罚时。 【代码】: #include<cstdio> #include<cstring
阅读全文

浙公网安备 33010602011771号