【CF Edu 28 A. Curriculum Vitae】】的更多相关文章

time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Hideo Kojima has just quit his job at Konami. Now he is going to find a new place to work. Despite being such a well-known person, he still n…
time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output You are given an array of n integer numbers. Let sum(l, r) be the sum of all numbers on positions from l to r non-inclusive (l-th element is…
time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Polycarp takes part in a math show. He is given n tasks, each consists of k subtasks, numbered 1 through k. It takes him tj minutes to solve…
[2020.11.28提高组模拟]T1染色(color) 题目 题目描述 给定 \(n\),你现在需要给整数 \(1\) 到 \(n\) 进行染色,使得对于所有的 \(1\leq i<j\leq n\),若 \(i - j\) 为质数,则 \(i\) 和 \(j\) 不同色. 求出颜色尽可能少的染色方案.如果有多种方案,输出任意一种即可. 输入格式 第一行一个整数 \(n\). 输出格式 第一行一个整数 \(k\),表示颜色数. 第二行 \(n\) 个整数 \(col_i\)(\(1 \leq…
time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Merge sort is a well-known sorting algorithm. The main function that sorts the elements of array a with indices from [l, r) can be implement…
time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output You are given a string s consisting only of characters 0 and 1. A substring [l, r] of s is a string slsl + 1sl + 2... sr, and its length equa…
time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output In a building where Polycarp lives there are equal number of flats on each floor. Unfortunately, Polycarp don't remember how many flats are o…
序列(array) 题目描述 ​给定一个长为 \(m\) 的序列 \(a\). 有一个长为 \(m\) 的序列 \(b\),需满足 \(0\leq b_i \leq n\),\(\sum_{i=1}^m a_ib_i \leq D\) 且 \(b_i\) 为整数. ​求 \(\sum b_i + k \min_{i=1}^m{b_i}\) 的最大值. 输入格式 ​第一行一个正整数 \(T\),表示数据组数. ​对于每组数据,第 \(1\) 行四个整数 \(n, m, k, D\). ​第 \(2…
B. Lost Number[CF交互题 暴力] This is an interactive problem. Remember to flush your output while communicating with the testing program. You may use fflush(stdout) in C++, system.out.flush() in Java, stdout.flush() in Python or flush(output) in Pascal to…
A. Little Pony and Expected Maximum time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Twilight Sparkle was playing Ludo with her friends Rainbow Dash, Apple Jack and Flutter Shy. But she kept…