模拟
文章平均质量分 65
林闻起
这个作者很懒,什么都没留下…
展开
-
海淀区第三届“智慧杯”中小学生计算机程序设计大赛编程思维类初赛(初中组) 空降兵
题目描述:现在有一队空降兵在执行任务。空降兵一共有 n 名,他们即将一个个空降到战场上。战场已经事先被划分成了 R × C 个方格。在一些方格中,有临时部署好的军事基地。现在给定每个空降兵要降落的位置,请你计算离他降落位置最近的军事基地有多远。我们定义第 i 行第 j 列的方格到第 p 行第 q 列的方格的距离为:(i - p)2 + (j - q)2,即两地之间的欧几里得距离的平方。输入:...原创 2019-11-09 23:31:25 · 1316 阅读 · 0 评论 -
codeforces: Gym 101142A Anniversary Cake
这题仔细想想就能想出来。代码如下:#include <iostream>#include <cstdio>#include <cstring>#include <string>using namespace std;int main(){ freopen("anniversary.in", "r", stdin); //注意文件输入...原创 2019-07-28 15:20:09 · 160 阅读 · 0 评论 -
codeforces 1205A Almost Equal
You are given integer n. You have to arrange numbers from 1 to 2n, using each of them exactly once, on the circle, so that the following condition would be satisfied:For every n consecutive numbers o...原创 2019-08-19 15:49:41 · 598 阅读 · 0 评论