CF 489C 暴力处理】的更多相关文章

题意: 给你 数的长度 m, 数的每个数的和 Sum: 输出 这个数最小值 和最大值 #include<bits/stdc++.h> using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(0); int Sum, m; cin >> m >> Sum; int tmp = Sum; if(Sum > m*9 || (m > 1 && Sum == 0))…
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…
C. Mike and Frog time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Mike has a frog and a flower. His frog is named Xaniar and his flower is named Abol. Initially(at time 0), height of Xaniar…
Description: n * m 的地图,建设k个管道管道只能横竖走,且长度大于等于2,问你任意一种建设方法 Solution: 图里没有障碍,所以先把前k - 1个管道每个分2个长度,最后一个管道一连到底 Code: PS:今天时间没来的急,其实函数可以封装一下的,虽然都是暴力,但也得暴力的优美不是?? #include <iostream> #include <cstdio> using namespace std; int main() { int n,m,k; whil…
B. Forgerytime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputStudent Andrey has been skipping physical education lessons for the whole term, and now he must somehow get a passing grade on this subjec…
Three displays time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output It is the middle of 2018 and Maria Stepanovna, who lives outside Krasnokamensk (a town in Zabaikalsky region), wants to rent t…
题目链接: 传送门 Devu and Partitioning of the Array time limit per test:3 second     memory limit per test:256 megabytes Description You are given n integers a1, a2, ..., an. Find the number of pairs of indexes i, j (i < j) that ai + aj is a power of 2 (i.…
Description: 给你两个数组,顺序一定,问你第一个数组连续的几个值等于下一个数组连续的几个值,然后寻找这个值得最大值,也就是满足就换 Solution: 用两个变量索引,判断即可 #include <iostream> #include <cstdio> using namespace std; const int maxn = 1e6 + 1e3; int a[maxn],b[maxn]; int main() { int n,m; while(~scanf("…
链接:http://codeforces.com/problemset/problem/558/C C. Amr and Chemistry time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Amr loves Chemistry, and specially doing experiments. He is preparing…
A. Strange Addition time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Unfortunately, Vasya can only sum pairs of integers (a, b), such that for any decimal place at least one number has digi…