SMU Summer 2023 Contest Round 14】的更多相关文章

Codeforces Beta Round #14 (Div. 2) http://codeforces.com/contest/14 A 找最大最小的行列值即可 #include<bits/stdc++.h> using namespace std; #define lson l,mid,rt<<1 #define rson mid+1,r,rt<<1|1 #define sqr(x) ((x)*(x)) #define maxn 500005 typedef lon…
Harry And Physical Teacher Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 38    Accepted Submission(s): 34 Problem Description As we all know, Harry Porter learns magic at Hogwarts School. How…
Harry And Physical Teacher Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 91    Accepted Submission(s): 68 Problem Description As we all know, Harry Porter learns magic at Hogwarts School. How…
D. Two Paths 题目连接: http://codeforces.com/contest/14/problem/D Description As you know, Bob's brother lives in Flatland. In Flatland there are n cities, connected by n - 1 two-way roads. The cities are numbered from 1 to n. You can get from one city t…
C. Four Segments 题目连接: http://codeforces.com/contest/14/problem/C Description Several months later Alex finally got his brother Bob's creation by post. And now, in his turn, Alex wants to boast about something to his brother. He thought for a while,…
B. Young Photographer 题目连接: http://codeforces.com/contest/14/problem/B Description Among other things, Bob is keen on photography. Especially he likes to take pictures of sportsmen. That was the reason why he placed himself in position x0 of a long s…
A. Letter 题目连接: http://www.codeforces.com/contest/14/problem/A Description A boy Bob likes to draw. Not long ago he bought a rectangular graph (checked) sheet with n rows and m columns. Bob shaded some of the squares on the sheet. Having seen his mas…
题目链接: http://codeforces.com/contest/14/problem/D D. Two Paths time limit per test2 secondsmemory limit per test64 megabytes 问题描述 As you know, Bob's brother lives in Flatland. In Flatland there are n cities, connected by n - 1 two-way roads. The citie…
题目链接:  http://codeforces.com/problemset/problem/14/D 思路:直接枚举每一天路径的两端,然后求以每一端为树根的树上最长路径,然后相乘就可以了. #include <iostream> #include <cstdio> #include <cstring> #include <algorithm> #include <vector> #define REP(i, a, b) for (int…
题目链接:https://vjudge.net/contest/187496#problem/E E Excellent Engineers You are working for an agency that selects the best software engineers from Belgium, the Netherlands and Luxembourg for employment at various international companies. Given the ve…