目录 Cookies Distinct Sub-palindromes Fibonacci Sum Finding a MEX Leading Robots Math is Simple Minimum Index Mow Cookies 先简单二分出最后查的是哪个标号. 然后发现这个可以快速处理出一段区间的答案,分段打表即可. 注意代码长度限制不要爆了我就白打了 10min Code ll n, k, a[N]; ll S[4001] = { ... }; int m; inline ll c…
Problem F. Grab The Tree Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 524288/524288 K (Java/Others) Total Submission(s): 2004 Accepted Submission(s): 911 Problem Description Little Q and Little T are playing a game on a tree. There are …
Game Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 1770 Accepted Submission(s): 1089 Problem Description Alice and Bob are playing a game. The game is played on a set of positive integers…
Maximum Multiple Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 3985 Accepted Submission(s): 926 Problem Description Given an integer n, Chiaki would like to find three positive integers x,…
Solved A HDU 6298 Maximum Multiple Solved B HDU 6299 Balanced Sequence Solved C HDU 6300 Triangle Partition Solved D HDU 6301 Distinct Values E HDU 6302 Maximum Weighted Matching F HDU 6303 Period Sequence Solved G HDU 6304 Chiaki Sequence Revisi…
1009,直接贪心,只要让后面的尽量小,第一位和第二位尽量大即可. 1011,直接统计奇数的字母的个数,然后用偶数的个数平均分配到它们上面即可.代码如下: #include <stdio.h> #include <algorithm> #include <string.h> using namespace std; int main() { int T; scanf("%d",&T); while(T--) { int n; , even =…