中石油个人训练
这条街上最靓的妞儿
这个作者很懒,什么都没留下…
展开
-
G: Collecting Balls I
问题 G: Collecting Balls I 时间限制: 1 Sec 内存限制: 128 MB 提交: 339 解决: 228 [提交] [状态] [讨论版] [命题人:admin] 题目描述There are N balls in the xy-plane. The coordinates of the i-th of them is (xi,i). Thus, we hav...原创 2018-07-31 18:01:49 · 265 阅读 · 0 评论 -
UPC 组队训练 K: Harbin Sausage(水题)
问题 K: Harbin Sausage 时间限制: 1 Sec 内存限制: 128 MB 提交: 60 解决: 51 [提交] [状态] [讨论版] [命题人:admin] 题目描述 Harbin Sausage is a kind of food usually made from ground meat, such as pork, beef along with salt a...原创 2018-09-05 16:48:09 · 504 阅读 · 0 评论 -
UPC 组队训练 A: Game with string
问题 A: Game with string 时间限制: 2 Sec 内存限制: 256 MB 提交: 81 解决: 45 [提交] [状态] [讨论版] [命题人:admin] 题目描述 Alice and Bob are playing a game with string. Given a string S = S1…Sn. They choose m substrings f...原创 2018-09-05 16:46:16 · 1132 阅读 · 0 评论 -
UPC 组队训练 A: Taro's Shopping
问题 A: Taro’s Shopping 时间限制: 1 Sec 内存限制: 128 MB 提交: 75 解决: 63 [提交] [状态] [讨论版] [命题人:admin] 题目描述 Mammy decided to give Taro his first shopping experience. Mammy tells him to choose any two items h...原创 2018-09-02 15:24:43 · 173 阅读 · 0 评论 -
UPC 组队训练 Network Report(Floyd)
问题 D: Network Report 时间限制: 1 Sec 内存限制: 128 MB 提交: 139 解决: 58 [提交] [状态] [讨论版] [命题人:admin] 题目描述For time efficiency, data transmission is often done along the shortest path (with minimum number o...原创 2018-08-29 17:37:13 · 232 阅读 · 0 评论 -
UPC 组队训练 Threesome(Floyd)
题意:有N个学生,有n*(n-1)/2行的输入,每行3个数,C(I,J)表示I J 两个同学之间的的社会属性权值是一个值C(I,J),这里需要找出Max i,j,k{C(I,J)+C(J,K)+C(I,K)}。 思路:Floyd算法,注意i=j或i=k或j=k时候剪枝。#include<bits/stdc++.h>using namespace std;int Map...原创 2018-08-29 17:32:53 · 400 阅读 · 0 评论 -
UPC 组队训练 Smooth Sequences(逻辑归类)
问题 A: Smooth Sequences 时间限制: 1 Sec 内存限制: 128 MB 提交: 236 解决: 75 [提交] [状态] [讨论版] [命题人:admin] 题目描述A sequence of n integers is called smooth, if the absolute values of the differences between succ...原创 2018-08-29 17:24:11 · 297 阅读 · 0 评论 -
UPC 组队训练 5215 Fence Building(欧拉示性数)
题意:给一个圆,圆上有N个点,N个点两两连成一条直线,问最多能把这个圆分成几部分。 根据欧拉示性数 常数2=V(点个数)+F(面个数)-E(边条数)。 对欧式性数的解释 得到公式:F=C(n 2)+C(n,4)+1; 对公式的证明 由于取模运算,有对除法的取模运算,需要用到逆元 (a + b) % p = (a%p + b%p) %p (对) (a - b) % p = (a%...原创 2018-08-21 19:54:32 · 219 阅读 · 0 评论 -
UPC组队训练 G:The Mountain
#include<bits/stdc++.h>using namespace std;struct node{ double x; double y;}p[105];int main(){ int t;scanf("%d",&t); while(t--) { int n;scanf("%d",&...原创 2018-08-21 19:25:56 · 165 阅读 · 0 评论 -
UPC 在组队训练 Skyscraper(数学)
问题 C: Skyscraper 时间限制: 1 Sec 内存限制: 128 MB 提交: 72 解决: 53 [提交] [状态] [讨论版] [命题人:admin] 题目描述Mr. Port plans to start a new business renting one or more floors of the new skyscraper with one giga fl...原创 2018-08-23 13:50:32 · 479 阅读 · 0 评论 -
UPC 问题 M: 序列合并
问题 M: 序列合并 时间限制: 1 Sec 内存限制: 64 MB 提交: 748 解决: 176 [提交] [状态] [讨论版] [命题人:admin] 题目描述有两个长度都是N的序列A和B,在A和B中各取一个数相加可以得到N^2个和,求这N^2个和中最小的N个。输入第一行一个正整数N;第二行N个整数Ai,满足Ai<=Ai+1且Ai<=10^9;第三...原创 2018-08-10 19:11:03 · 175 阅读 · 0 评论 -
UPC 问题 F: Not so Diverse
问题 F: Not so Diverse 时间限制: 1 Sec 内存限制: 128 MB 提交: 401 解决: 209 [提交] [状态] [讨论版] [命题人:admin] 题目描述Takahashi has N balls. Initially, an integer Ai is written on the i-th ball. He would like to rew...原创 2018-08-10 19:09:14 · 251 阅读 · 0 评论 -
UPC 问题 L: Shift only
问题 L: Shift only 时间限制: 1 Sec 内存限制: 128 MB 提交: 286 解决: 223 [提交] [状态] [讨论版] [命题人:admin] 题目描述There are N positive integers written on a blackboard: A1,…,AN. Snuke can perform the following opera...原创 2018-08-10 19:04:31 · 291 阅读 · 0 评论 -
C: Restoring Road Network(Floyd拓展应用)
问题 C: Restoring Road Network 时间限制: 1 Sec 内存限制: 128 MB 提交: 894 解决: 183 [提交] [状态] [讨论版] [命题人:admin] 题目描述In Takahashi Kingdom, which once existed, there are N cities, and some pairs of cities are...原创 2018-07-31 18:25:37 · 193 阅读 · 0 评论 -
OddString
问题 D: OddString 时间限制: 1 Sec 内存限制: 128 MB 提交: 374 解决: 218 [提交] [状态] [讨论版] [命题人:admin] 题目描述You are given a string s consisting of lowercase English letters. Extract all the characters in the odd...原创 2018-07-29 19:21:23 · 257 阅读 · 0 评论 -
F: Sandglass2
问题 F: Sandglass2 时间限制: 1 Sec 内存限制: 128 MB 提交: 343 解决: 212 [提交] [状态] [讨论版] [命题人:admin] 题目描述We have a sandglass that runs for X seconds. The sand drops from the upper bulb at a rate of 1 gram pe...原创 2018-07-29 19:22:32 · 259 阅读 · 0 评论 -
J: Derangement
问题 J: Derangement 时间限制: 1 Sec 内存限制: 128 MB 提交: 416 解决: 213 [提交] [状态] [讨论版] [命题人:admin] 题目描述You are given a permutation p1,p2,…,pN consisting of 1,2,..,N. You can perform the following operatio...原创 2018-07-29 19:27:35 · 241 阅读 · 0 评论 -
K: Together
问题 K: Together 时间限制: 1 Sec 内存限制: 128 MB 提交: 371 解决: 197 [提交] [状态] [讨论版] [命题人:admin] 题目描述You are given an integer sequence of length N, a1,a2,…,aN. For each 1≤i≤N, you have three choices: add ...原创 2018-07-29 19:29:46 · 184 阅读 · 0 评论 -
UPC 组队训练 C:Coolest Ski Route(DFS +DP优化)
问题 C: Coolest Ski Route 时间限制: 1 Sec 内存限制: 128 MB 提交: 120 解决: 33 [提交] [状态] [讨论版] [命题人:admin] 题目描述 John loves winter. Every skiing season he goes heli-skiing with his friends. To do so, they rent...原创 2018-09-07 15:21:40 · 348 阅读 · 0 评论