Atcoder Contest069F:Flag】的更多相关文章

题目:https://arc069.contest.atcoder.jp/tasks/arc069_d 题意就是让你在n对数字每一对都选一个数使得任意两个数做差的绝对值最小值最大. 关系显然是一个2-sat,然后我们发现二份答案如果差值为x那么a-x+1到a+x-1是绝对不能选的, 也就是选完以后剩下的一定是这些,所以线段树优化连边覆盖区间.然后在线段树的底层端点再反过来一下即可. By:大奕哥 #include<bits/stdc++.h> using namespace std; ; in…
D - Menagerie Time limit : 2sec / Memory limit : 256MB Score : 500 points Problem Statement Snuke, who loves animals, built a zoo. There are N animals in this zoo. They are conveniently numbered 1 through N, and arranged in a circle. The animal numbe…
C - Candies 链接:https://arc090.contest.atcoder.jp/tasks/arc090_a 题意:从左上角走到右下角,只能向右和向下走,问能最多能拿多少糖果. 思路:dp[i][j]=max(dp[i-1][j],dp[i][j-1])+dp[i][j]; 代码: #include <iostream> #include <cstdio> #include <cstring> #include <algorithm> us…
A - Product 题目链接:https://abc086.contest.atcoder.jp/tasks/abc086_a Time limit : 2sec / Memory limit : 256MB Score : 100 points Problem Statement AtCoDeer the deer found two positive integers, a and b. Determine whether the product of a and b is even o…
A - Already 2018 题目链接:https://abc085.contest.atcoder.jp/tasks/abc085_a Time limit : 2sec / Memory limit : 256MB Score : 100 points Problem Statement On some day in January 2018, Takaki is writing a document. The document has a column where the curren…
A - New Year 题目链接:https://abc084.contest.atcoder.jp/tasks/abc084_a Time limit : 2sec / Memory limit : 256MB Score : 100 points Problem Statement How many hours do we have until New Year at M o'clock (24-hour notation) on 30th, December? Constraints 1…
题目链接:http://abc069.contest.atcoder.jp/assignments A - K-City Time limit : 2sec / Memory limit : 256MB Score : 100 points Problem Statement In K-city, there are n streets running east-west, and m streets running north-south. Each street running east-w…
题目链接:http://abc066.contest.atcoder.jp/tasks/abc066_b Time limit : 2sec / Memory limit : 256MB Score : 200 points Problem Statement We will call a string that can be obtained by concatenating two equal strings an even string. For example, xyzxyz and a…
题目链接:http://abc043.contest.atcoder.jp/tasks/arc059_b Time limit : 2sec / Memory limit : 256MB Score : 400 points Problem Statement Given a string t, we will call it unbalanced if and only if the length of t is at least 2, and more than half of the le…
A - Cookie Exchanges 题面 Takahashi, Aoki and Snuke love cookies. They have A, B and C cookies, respectively. Now, they will exchange those cookies by repeating the action below: Each person simultaneously divides his cookies in half and gives one half…