目录 Contest Info Solutions B. Counting Inversion C. Divisors of the Divisors of An Integer E. Helping the HR F. Path Intersection G. Techland H. Tile Game J. VAT Man Contest Info Practice Link Solved A B C D E F G H I J 7/10 - O O - O O O Ø - O O 在比赛中…
2018-2019 ACM-ICPC, Asia Xuzhou Regional Contest- H. Rikka with A Long Colour Palette -思维+贪心 [Problem Description] 有\(k\)种颜色,给你\(n\)个区间段,选择一种合适的方案给每个区间段染色,使得最终染色次数等于\(k\)次的长度和最大. [Solution] 将左右端点放在一起排序,但是标记出它是左端点,还是右端点,并且记录每个端点属于第几个区间,排序后,对于每个左端点,从未使…
https://codeforces.com/gym/101981 Problem A. Adrien and Austin 贪心,注意细节 f[x]=1:先手必赢. f[x]: 分成两部分(或一部分),长度分别为a和b,只要存在f[a] xor f[b]=0,则f[x]=1. #include <bits/stdc++.h> using namespace std; #define ll long long #define minv 1e-6 #define inf 1e9 #define…
题目链接:https://codeforces.com/gym/102028/problem/C Lewis likes playing chess. Now he has n rooks on the chessboard with $n$ rows and $n$ columns. All rows of the chessboard are labelled with $1$ through $n$ from top to bottom. All columns of the chessb…
题目链接:http://codeforces.com/gym/101981/attachments There are n heroes and m monsters living in an island. The monsters became very vicious these days,so the heroes decided to diminish the monsters in the island. However, the i-th hero can only kill on…
目录 Contest Info Solutions A. Xu Xiake in Henan Province D. Keiichi Tsuchiya the Drift King E. Resistors in Parallel F. Honeycomb H. Can You Solve the Harder Problem? I. Distance K. Counting Failures on a Trie Contest Info Practice Link Solved A B C D…