@COCI 2016/2017 Round 3@ Meksikanac】的更多相关文章

目录 @description@ @solution@ @accepted code@ @details@ @description@ 在平面直角坐标系中,给定一个左下角为 (0, 0),右上角为 (Xp, Yp) 的矩形,并给定矩形内的 N 个点. 已知坐标系内有一个 K 边形,现将这个 K 边形平移. 问有多少种方案使最后 K 边形落入给定的矩形,定点在整数点上,且不包含 N 个点中的任意一个(与 K 边形的边.顶点重合也算包含). input 第一行包含三个整数 Xp, Yp, N (1…
[SinGuLaRiTy-1012] Copyright (c) SinGuLaRiTy 2017. All Rights Reserved. 最近神犇喜欢考COCI...... 测试题目 对于所有的题目:Time Limit:1s  |  Memory:256 MB 第一题:银行账户(account)[parato] [题目描述] 大家都知道28定律吧,据说世界上20%的人拥有80%的财富.现在你对一家银行的账户进行检测,看是否符合28定律,或者有更强的定律.比如说,10%的人拥有85%的财富…
链接:知乎 [点击查看大图] 原图来自LearnCodeAcademy最火的视频,learncode是YouTube上最火的Web开发教学频道,介绍包括HTML/CSS/JavaScript/Sublime Text/CSS Layouts/Responsive Design/React.js/Node.js/Angular.js/Backbone.js/Docker/Dev Ops/Server Administration/Deployment Strategies在内的各类教学视频,拥有超…
Codeforces Round #405 (rated, Div. 2, based on VK Cup 2017 Round 1) 全场题解 菜鸡只会A+B+C,呈上题解: A. Bear and Big Brother 题意:我也没看太清,就是给你两个10以内的数a,b.a每天乘以3,b每天乘以2,求多少天后a大于b. 思路:应该是有公式的,不过看到数据这么小直接暴力乘求解.官方题解貌似就是这样,数据小就是水题. const int N=1e3+10; int main() { int a…
官方题解: 官方代码: Code-KARTE: #include <cstdio> #include <iostream> #include <cstring> using namespace std; const int MAXB = 5; const int MAXN = 20; bool bio[MAXB][MAXN]; int getColor(char chr) { if (chr == 'P') return 0; if (chr == 'K') retur…
A. Is it rated? time limit per test:2 seconds memory limit per test:256 megabytes input:standard input output:standard output Is it rated? Here it is. The Ultimate Question of Competitive Programming, Codeforces, and Everything. And you are here to a…
ECMAScript 2016 1. Array.prototype.includes includes是数组上的简单实例方法,并有助于轻松查找某个项是否在Array中(包括NaN不像indexOf) const arr = [ 1, 2, 3, 4, NaN];// es2016不使用if(arr.indexOf(3) >= 0){  console.log(true);}//使用if(arr.includes(3)){  console.log(true);}//ps: 注意 indexOf…
/************************************************************** SQL Server 2012 新增的函数 ***************************************************************/ -- CONCAT ( string_value1, string_value2 [, string_valueN ] ) #字符串相连 SELECT CONCAT('A','BB','CCC','…
A. Is it rated? time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Is it rated? Here it is. The Ultimate Question of Competitive Programming, Codeforces, and Everything. And you are here to a…
很难追踪 JavaScript(ECMAScript)中的新功能. 想找到有用的代码示例更加困难. 因此,在本文中,我将介绍 TC39 已完成 ES2016,ES2017 和 ES2018(最终草案)提案中所有添加的 18 个功能,并展示有用的示例. 这是一个很长的文章,但应该很容易阅读. 可以把它想象成 “Netflix binge reading”.但是到文章结束,我保证你将对所有这些功能有很好的了解. 好的,让我们逐个讨论这些问题. ECMAScript 2016 1.Array.prot…
很难追踪 JavaScript(ECMAScript)中的新功能. 想找到有用的代码示例更加困难. 因此,在本文中,我将介绍 TC39 已完成 ES2016,ES2017 和 ES2018(最终草案)提案中所有添加的 18 个功能,并展示有用的示例. 这是一个很长的文章,但应该很容易阅读. 可以把它想象成 “Netflix binge reading”.但是到文章结束,我保证你将对所有这些功能有很好的了解. 好的,让我们逐个讨论这些问题. ECMAScript 2016 1.Array.prot…
https://community.mindjet.com/mindjet/topics/ensure-2017-64-bit-version-installation Mindmanager should automatically pick same bit rate version based on MS office Bit version while installing.The combined installer detects the bit version of Microso…
D. Robot Rapping Results Report 题目连接: http://www.codeforces.com/contest/655/problem/D Description While Farmer John rebuilds his farm in an unfamiliar portion of Bovinia, Bessie is out trying some alternative jobs. In her new gig as a reporter, Bessi…
地址:http://codeforces.com/contest/807/problem/D 题目: D. Dynamic Problem Scoring time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Vasya and Petya take part in a Codeforces round. The round las…
雷电3外接显卡效果还不错,但是除了akitio node 其他厂家并不会维护自己的固件来适配新机型,我自己买的mbp 2016 15''就出现了和AORUS Gaming Box 1070不兼容的问题,在引导的时候会在win徽标处转圈卡死,我联系了厂家,客服,给他们打了电话发了邮件,都快变成骚扰了,不过并没有解决问题,得到的回复是问题在解决中,不知道什么时候能解决.   后来在egpu.io上找到了解决方案并尝试成功,效果还不错 https://egpu.io/forums/implementa…
D. Jerry's Protest 题目连接: http://www.codeforces.com/contest/626/problem/D Description Andrew and Jerry are playing a game with Harry as the scorekeeper. The game consists of three rounds. In each round, Andrew and Jerry draw randomly without replaceme…
Practice Round Problem A Country Leader (4pt/7pt) Problem B Vote (5pt/8pt) Problem C Sherlock and Parentheses (4pt/7pt) Round A Problem A Square Counting (8pt/17pt) Problem B Patterns Overlap (13pt/22pt) Problem C Space Cubes (14pt/26pt) Round B Prob…
暴力 A - Orchestra import java.io.*; import java.util.*; public class Main { public static void main(String[] args) { Scanner cin = new Scanner (System.in); int r = cin.nextInt (); int c = cin.nextInt (); int n = cin.nextInt (); int k = cin.nextInt ();…
在家补补题   模拟 A - Robot Sequence #include <bits/stdc++.h> char str[202]; void move(int &x, int &y, char ch) { if (ch == 'U') x--; if (ch == 'D') x++; if (ch == 'L') y--; if (ch == 'R') y++; } int main(void) { int n; scanf ("%d", &…
C. Binary Table 题目连接: http://codeforces.com/problemset/problem/662/C Description You are given a table consisting of n rows and m columns. Each cell of the table contains either 0 or 1. In one move, you are allowed to pick any row or any column and i…
题目链接: http://www.codeforces.com/contest/655/problem/D 题意: 题目是要求前k个场次就能确定唯一的拓扑序,求满足条件的最小k. 题解: 二分k的取值,做拓扑排序的时候只要每次只有一个元素没有前驱就可以唯一了. #include<iostream> #include<cstring> #include<cstdio> #include<vector> #include<queue> #includ…
题目链接:http://codeforces.com/contest/626/problem/C 题意就是给你n个分别拿着2的倍数积木的小朋友和m个分别拿着3的倍数积木的小朋友,每个小朋友拿着积木的数量互不相同,求小朋友中拿着最大积木数的最小的情况(有点绕). 那最坏的情况就是2n或者3m,假设最大的积木数为x,x肯定能被2或3整除,那么x/2就是2的倍数个数,x/3就是3的倍数的个数,x/6就是6的倍数的个数. 因为这个数据量很小,那么只要暴力寻找刚好符合x/3 + x/2 - x/6 >=…
C. Lieges of Legendre 题意:给n,m表示有n个为2的倍数,m个为3的倍数:问这n+m个数不重复时的最大值 最小为多少? 数据:(0 ≤ n, m ≤ 1 000 000, n + m > 0) ps:很水的题,主要是策略: 思路:由于里面每隔6就会重复一次,不好直接模拟,并且模拟的效率很低,那就二分吧!二分即上界为2单独的最大倍数与3单独时的最大倍数之和,下界为前面二者的max;之后利用判断是否mid/2 >= n && mid/3 >= m &am…
题目链接:http://codeforces.com/contest/655/problem/D 大意是给若干对偏序,问最少需要前多少对关系,可以确定所有的大小关系. 解法是二分答案,利用拓扑排序看是否所有关系被唯一确定.即任意一次只能有1个元素入度为0入队. #include <iostream> #include <vector> #include <algorithm> #include <string> #include <string.h&g…
A. Vicious Keyboard time limit per test:2 seconds memory limit per test:256 megabytes input:standard input output:standard output Tonio has a keyboard with only two letters, "V" and "K". One day, he has typed out a string s with only t…
FallDream打的AB都FFT了,只剩一个我打的C,没进前一百,之后看看马拉松复活赛有没机会呗. A. Voltage Keepsake 题目大意:n个东西,每个东西一开始有bi能源,每秒消耗ai能源,每秒可以给一个东西加p能源,秒可以为实数,问至多多少秒内所有东西能源一直为正.(n<=100,000) 思路:二分答案,随便check一下.不特判无解可能会炸精度. #include<cstdio> #include<algorithm> using namespace s…
和FallDream组队瞎打一通--B两个人写的都挂了233,最后只剩下FallDream写的A和我写的C,最后我yy了个E靠谱做法结果打挂了,结束之后改了改就A了,难受. AC:AC Rank:180 Rating:2133-8->2125 A.Bear and Friendship Condition 题目大意:问一个无向图是否满足若a到b有边且b到c有边则a到c有边.(n<=150,000) 思路:判定每个连通块是不是团,不是则不满足,复杂度O(n). #include<cstdi…
A. Vicious Keyboard 题意:给你一个字符串,里面只会包含VK,这两种字符,然后你可以改变一个字符,你要求VK这个字串出现的次数最多. 题解:数据范围很小,暴力枚举改变哪个字符,然后check就好. #include<bits/stdc++.h> using namespace std; int main(){ string s; cin>>s; int ans = 0; for(int i=0;i<s.size();i++){ if(s[i]=='V'){…
C. Bear and Different Names 题目连接: http://codeforces.com/contest/791/problem/C Description In the army, it isn't easy to form a group of soldiers that will be effective on the battlefield. The communication is crucial and thus no two soldiers should s…
B. Bear and Friendship Condition 题目连接: http://codeforces.com/contest/791/problem/B Description Bear Limak examines a social network. Its main functionality is that two members can become friends (then they can talk with each other and share funny pic…