Codeforces Round #183 (Div. 2)
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)的更多相关文章
- 暴力 Codeforces Round #183 (Div. 2) A. Pythagorean Theorem II
题目传送门 /* 暴力:O (n^2) */ #include <cstdio> #include <algorithm> #include <cstring> # ...
- 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 ...
- Codeforces Round #354 (Div. 2) ABCD
Codeforces Round #354 (Div. 2) Problems # Name A Nicholas and Permutation standard input/out ...
- Codeforces Round #368 (Div. 2)
直达–>Codeforces Round #368 (Div. 2) A Brain’s Photos 给你一个NxM的矩阵,一个字母代表一种颜色,如果有”C”,”M”,”Y”三种中任意一种就输 ...
- cf之路,1,Codeforces Round #345 (Div. 2)
cf之路,1,Codeforces Round #345 (Div. 2) ps:昨天第一次参加cf比赛,比赛之前为了熟悉下cf比赛题目的难度.所以做了round#345连试试水的深浅..... ...
- Codeforces Round #279 (Div. 2) ABCDE
Codeforces Round #279 (Div. 2) 做得我都变绿了! Problems # Name A Team Olympiad standard input/outpu ...
- 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 ...
- 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 ...
- Codeforces Round #371 (Div. 1)
A: 题目大意: 在一个multiset中要求支持3种操作: 1.增加一个数 2.删去一个数 3.给出一个01序列,问multiset中有多少这样的数,把它的十进制表示中的奇数改成1,偶数改成0后和给 ...
随机推荐
- 微信端的user-Agent
在iPhone下,返回 Mozilla/5.0 (iPhone; CPU iPhone OS 5_1 like Mac OS X) AppleWebKit/534.46 (KHTML, like Ge ...
- nth-child和nth-of-type的使用案列
HTML: <div id="footer-f"> <ul class="trajectory"> <li> <div ...
- 【JZOJ4935】【NOIP2017GDKOI模拟1.12】b
Boring 构造一棵包含1号结点的连通子集个数刚好为给定的n的树. 这棵树的结点不能多于60. 1<=n<=109 Gai 容易得到,计算给定一棵树的Ans1,其中Ansi表示包含i号结 ...
- D3D10/11中的遮挡查询的使用
原文:D3D10/11中的遮挡查询的使用 在D3D10/11中,有D3D10_QUERY/D3D11_QUERY接口,通过QUERY接口,我们可以查询GPU的一些状态,比如GPU的时间戳信 ...
- python 正则表达式语法
- firefox扩展开发(二):用XUL创建窗口控件
firefox扩展开发(二):用XUL创建窗口控件 2008-06-11 16:57 1.创建一个简单的窗口 <?xml version="1.0"?> <?xm ...
- IDEA-servlet项目创建web项目
准备:1. 安装jdk1.82. 安装tomcat9.0(idea只支持4.0 9.0的服务器) 一.创建并设置javaweb工程 1.创建javaweb工程File --> New --&g ...
- hdu4310 贪心
考虑每次血口的要少 就按照一滴血多少伤害来计算.由于直接相除有小数.考虑x/y > a/b => x*b >y*a; #include<stdio.h> #inclu ...
- thinkphp5.0验证码使用
如果没有安装验证码类,可在composer.json 文件的require里面添加 "topthink/think-captcha":"1.*",然后compo ...
- Idea创建maven项目 标签: idea 2016-12-28 21:51 605人阅读 评论(27) 收藏
很久之前就听说了idea,界面也的确比eclipse好看,不过一直没有机会使用,这两天试用了一下,代码提示方面的确很好用,不过使用习惯跟eclipse还是有一些差距的,下面介绍一下如何用idea创建一 ...