Sonya and Exhibition】的更多相关文章

B. Sonya and Exhibition time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Sonya decided to organize an exhibition of flowers. Since the girl likes only roses and lilies, she decided that only…
B. Sonya and Exhibition time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Sonya decided to organize an exhibition of flowers. Since the girl likes only roses and lilies, she decided that only…
[题目链接] https://codeforces.com/contest/1004/problem/B [算法] 不难发现 , 最优解一定是01010101.... 时间复杂度 : O(N) [代码] #include<bits/stdc++.h> using namespace std; template <typename T> inline void read(T &x) { T f = ; x = ; char c = getchar(); for (; !isd…
http://codeforces.com/group/1EzrFFyOc0/contest/1004/problem/B #include<iostream> #include<cstdio> #include<algorithm> #include<cstring> using namespace std; int main() { int n,m; cin>>n>>m; int a,b; ;i<=m;i++) cin>…
题目链接:http://codeforces.com/contest/1004/problem/B B. Sonya and Exhibition time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Sonya decided to organize an exhibition of flowers. Since the girl…
题目链接: http://codeforces.com/contest/1004/my A. Sonya and Hotels 分类讨论 看第一个样例解释的时候没看到后面第二行还有一个19,想了半天为啥19不算 题意大致是选定一个位置,使得其到达原本那些位置的距离最小的为d 此处应注意,最小为d意味着不能距离小于d 所以可能的住所有三种情况, 1. 两个城市距离小于2d, 那么无法在其间选定 2. 两个城市距离等于2d, 可选定一个点 3. 两个城市距离大于2d, 可选定2个点 #include…
题目 Source http://codeforces.com/problemset/problem/713/C Description Sonya was unable to think of a story for this problem, so here comes the formal description. You are given the array containing n positive integers. At one turn you can pick any ele…
http://poj.org/problem?id=2184   Description "Fat and docile, big and dumb, they look so stupid, they aren't much fun..." - Cows with Guns by Dana Lyons The cows want to prove to the public that they are both smart and fun. In order to do this,…
E. Sonya and Problem Wihtout a Legend time limit per test 5 seconds memory limit per test 256 megabytes input standard input output standard output Sonya was unable to think of a story for this problem, so here comes the formal description. You are g…
C. Sonya and Queries time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Today Sonya learned about long integers and invited all her friends to share the fun. Sonya has an initially empty multi…