A gourmet came into the banquet hall, where the cooks suggested n dishes for guests. The gourmet knows the schedule: when each of the dishes will be served. For i-th of the dishes he knows two integer moments in time ai and bi (in seconds from the be…
链接:https://codeforces.com/contest/1154 A - Restoring Three Numbers - [水] #include<bits/stdc++.h> using namespace std; ]; int main() { cin>>a[]>>a[]>>a[]>>a[]; sort(a,a+); ;i<=;i++) printf(]-a[i]); } B - Make Them Equal - […
A. Restoring Three Numbers 代码: #include <bits/stdc++.h> using namespace std; ]; int a, b, c; int main() { ; i < ; i ++) scanf("%d", &n[i]); sort(n, n + ); a = n[] - n[]; b = n[] - n[]; c = n[] - n[]; printf("%d %d %d\n", a…
A - Restoring Three Numbers CodeForces - 1154A Polycarp has guessed three positive integers aa, bb and cc. He keeps these numbers in secret, but he writes down four numbers on a board in arbitrary order — their pairwise sums (three numbers) and sum o…
Problem Codeforces #541 (Div2) - D. Gourmet choice Time Limit: 2000 mSec Problem Description Input Output The first line of output should contain "Yes", if it's possible to do a correct evaluation for all the dishes, or "No" otherwis…
学了这么久,来打一次CF看看自己学的怎么样吧 too young too simple 1152B. Neko Performs Cat Furrier Transform 题目链接:"https://codeforces.com/contest/1152/problem/B" 题目描述: Cat Furrier Transform is a popular algorithm among cat programmers to create longcats. As one of th…
F. Gourmet and Banquet time limit per test 2 seconds memory limit per test 512 megabytes input standard input output standard output A gourmet came into the banquet hall, where the cooks suggested n dishes for guests. The gourmet knows the schedule:…
A gourmet came into the banquet hall, where the cooks suggested n dishes for guests. The gourmet knows the schedule: when each of the dishes will be served. For i-th of the dishes he knows two integer moments in time ai and bi (in seconds from the be…
Mr. Apple, a gourmet, works as editor-in-chief of a gastronomic periodical. He travels around the world, tasting new delights of famous chefs from the most fashionable restaurants. Mr. Apple has his own signature method of review — in each restauran…
After waking up at hh:mm, Andrew realised that he had forgotten to feed his only cat for yet another time (guess why there's only one cat). The cat's current hunger level is H points, moreover each minute without food increases his hunger by D points…
题目链接:http://codeforces.com/contest/580/problem/C #include<cstdio> #include<vector> #include<cstring> #define MAX 100010 using namespace std; vector <int> a[MAX]; int visit[MAX]; int cat[MAX]; int leaf[MAX]; int ans,m; void dfs(int…
C. Kefa and Park Time Limit: 1 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/contest/580/problem/C Description Kefa decided to celebrate his first big salary by going to the restaurant. He lives by an unusual park. The park is a rooted tree con…
D. Mahmoud and a Dictionary time limit per test 4 seconds memory limit per test 256 megabytes input standard input output standard output Mahmoud wants to write a new dictionary that contains n words and relations between them. There are two types of…
D. Mahmoud and a Dictionary time limit per test:4 seconds memory limit per test:256 megabytes input:standard input output: standard output Mahmoud wants to write a new dictionary that contains n words and relations between them. There are two types o…
Problem D. Grumpy Cat 题目连接: http://www.codeforces.com/gym/100253 Description This problem is a little bit unusual. Here you are to implement an interaction with a testing system. That means that you can make queries and get responses in the online mo…
A. Mahmoud and Longest Uncommon Subsequence time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output While Mahmoud and Ehab were practicing for IOI, they found a problem which name was Longest comm…
D. Mahmoud and a Dictionary time limit per test 4 seconds memory limit per test 256 megabytes input standard input output standard output Mahmoud wants to write a new dictionary that contains n words and relations between them. There are two types of…
D. Gourmet choice time limit per test 2 seconds memory limit per test 256 megabytes 题目链接: https://codeforces.com/problemset/problem/1131/D Discribe Mr. Apple, a gourmet, works as editor-in-chief of a gastronomic periodical. He travels around the…