A. Pythagorean Theorem II

  • 暴力,\(O(n^2)\)。

B. Calendar

  • 每个日期计算到0年1月1日的天数,相当于转化成前缀和形式。
  • 闰年数计算\[\lfloor\frac{year}{4}\rfloor-\lfloor\frac{year}{100}\rfloor+\lfloor\frac{year}{400}\rfloor\]

C. Lucky Permutation Triple

  • 打表找规律。
  • 当\(n\)是偶数时,无解。
  • 否则,序列a、b为\(、、、、0、1、2、……、n-1\)。

D. Rectangle Puzzle II

  • 因为矩形框要最大,所以矩形框其中一条边会等于\(n\)或\(m\),剩下就是根据剩余条件找最小序。

E. Minimum Modular

  • \(a_i\ mod\ m=a_j\ mod\ m\),相当于差值\(d_ij\ mod\ m = 0\)。
  • 统计所有数对的差值,暴力枚举\(m\)。

Codeforces Round #183 (Div. 2)的更多相关文章

  1. 暴力 Codeforces Round #183 (Div. 2) A. Pythagorean Theorem II

    题目传送门 /* 暴力:O (n^2) */ #include <cstdio> #include <algorithm> #include <cstring> # ...

  2. Codeforces Round #366 (Div. 2) ABC

    Codeforces Round #366 (Div. 2) A I hate that I love that I hate it水题 #I hate that I love that I hate ...

  3. Codeforces Round #354 (Div. 2) ABCD

    Codeforces Round #354 (Div. 2) Problems     # Name     A Nicholas and Permutation standard input/out ...

  4. Codeforces Round #368 (Div. 2)

    直达–>Codeforces Round #368 (Div. 2) A Brain’s Photos 给你一个NxM的矩阵,一个字母代表一种颜色,如果有”C”,”M”,”Y”三种中任意一种就输 ...

  5. cf之路,1,Codeforces Round #345 (Div. 2)

     cf之路,1,Codeforces Round #345 (Div. 2) ps:昨天第一次参加cf比赛,比赛之前为了熟悉下cf比赛题目的难度.所以做了round#345连试试水的深浅.....   ...

  6. Codeforces Round #279 (Div. 2) ABCDE

    Codeforces Round #279 (Div. 2) 做得我都变绿了! Problems     # Name     A Team Olympiad standard input/outpu ...

  7. Codeforces Round #262 (Div. 2) 1003

    Codeforces Round #262 (Div. 2) 1003 C. Present time limit per test 2 seconds memory limit per test 2 ...

  8. Codeforces Round #262 (Div. 2) 1004

    Codeforces Round #262 (Div. 2) 1004 D. Little Victor and Set time limit per test 1 second memory lim ...

  9. Codeforces Round #371 (Div. 1)

    A: 题目大意: 在一个multiset中要求支持3种操作: 1.增加一个数 2.删去一个数 3.给出一个01序列,问multiset中有多少这样的数,把它的十进制表示中的奇数改成1,偶数改成0后和给 ...

随机推荐

  1. C++ 浮点数 为 0 的判断

  2. php表单传值--GET和POST

    一.       传值 1.    传值/接收方法: 1)        GET(5种方式!) a)       表单Form: method = ‘get’   GET接收数据方式: b)      ...

  3. 如何在Liferay 7中创建一个简单的JSF Portlet

    这个将在Liferay IDE 3.1 M3的发布版中提供创建的选项,但是你也可以通过命令行来创建. 1.这是Liferay JSF团队的官网:http://liferayfaces.org/ 你能在 ...

  4. 阿里小二的日常工作要被TA们“接管”了!

    昨天有人偷偷告诉我说 阿里巴巴其实是一家科技公司! 我想了整整一夜 究竟是谁走漏了风声 那么重点来了,阿里到底是如何在内部的办公.生活中,玩转“黑科技”的呢? AI取名:给你专属的“武侠”花名 花名是 ...

  5. scrapy 调用js

    依赖: PyExecJS 使用案例: from execjs import execjs text = response.xpath('//script/text()')[1].get() ctx = ...

  6. Selenium-Switch与SelectApi接口

    Switch 我们在UI自动化测试时,总会出现新建一个tab页面.弹出一个浏览器级别的弹框或者是出现一个iframe标签,这时我们用WebDriver提供的Api接口就无法处理这些情况了.需要用到Se ...

  7. LeetCode21 Merge Two Sorted Lists

    题意: Merge two sorted linked lists and return it as a new list. The new list should be made by splici ...

  8. Date日期类,Canlendar日历类,Math类,Random随机数学类

    Date日期类,SimpleDateFormat日期格式类 Date  表示特定的时间,精确到毫秒 常用方法 getTime() setTime() before() after() compareT ...

  9. TP3.2的URL重写省略index.php问题

    1. 在tp3框架的配置文件里,明确指定了路由的格式,这个配置位于thinkPHP文件夹下的conf文件夹里的convention.php中,修改以下字段 'URL_MODEL' => 2, # ...

  10. springboot对shiro进行mock单元测试

    环境:junit-5.Spring5.0.x.Spring Boot 2.0.x 以下是用来权限测试的接口: @ApiOperation("[可接入]分页查询管理员") @ApiR ...