
模拟题
SDAU_20175962
这个作者很懒,什么都没留下…
展开
-
【模拟】【水题】Points in Segments
跟洛谷上“校门口的树“”一样的题,不过多解释。#include<iostream>using namespace std;int n,m,i,l,r;int a[105];int main(){ while(cin>>n>>m) { int ans=0; for(i=1;i<=m;i++)...原创 2018-08-03 22:44:50 · 269 阅读 · 0 评论 -
【模拟】蛇形填充数组
蛇形填充数组用数字1,2,3,4,...,n*n这n2个数蛇形填充规模为n*n的方阵。蛇形填充方法为:对于每一条左下-右上的斜线,从左上到右下依次编号1,2,...,2n-1;按编号从小到大的顺序,将数字从小到大填入各条斜线,其中编号为奇数的从左下向右上填写,编号为偶数的从右上到左下填写。比如n=4时,方阵填充为如下形式: 输入输出格式 Input/output输入格...转载 2018-04-21 16:45:28 · 1901 阅读 · 0 评论 -
【模拟】数字黑洞
时间限制 1000 ms 内存限制 32768 KB 代码长度限制 100 KB 题目描述给定任一个各位数字不完全相同的4位正整数,如果我们先把4个数字按非递增排序,再按非递减排序,然后用第1个数字减第2个数字,将得到 一个新的数字。一直重复这样做,我们很快会停在有“数字黑洞”之称的6174,这个神奇的数字也叫Kaprekar常数。 例如,我们从6767开始,将得到 776...原创 2018-07-24 16:53:42 · 315 阅读 · 0 评论 -
【模拟】New Building for SIS
题意:给你n个相邻的建筑(从左到右编号1到n),每个建筑有h层,每个建筑的a层到b层中任意一层c层可以花一秒通过连廊直接到隔壁建筑的c层。上下楼1层需要1秒。求q次查询(建筑a,层a)到(建筑b,层b)的最短时间。#include <iostream>#include <cmath>#include <cstdio>using namespace...原创 2018-08-13 21:35:31 · 412 阅读 · 0 评论 -
CodeForces – 1011B Planning The Expedition
Natasha is planning an expedition to Mars for nn people. One of the important tasks is to provide food for each participant.The warehouse has mm daily food packages. Each package has some food type ...原创 2018-08-18 16:58:51 · 247 阅读 · 0 评论 -
CodeForces – 1011A A. Stages
Natasha is going to fly to Mars. She needs to build a rocket, which consists of several stages in some order. Each of the stages is defined by a lowercase Latin letter. This way, the rocket can be des...原创 2018-08-18 17:00:42 · 317 阅读 · 0 评论