Problem A. Alien Visit 题目连接: http://codeforces.com/gym/100714 Description Witness: "First, I saw only one UFO. It was shining with cold-blue light. Closer to the center of the object, the light was pink. It hung over the field, then began to blink an…
Problem D. Distance 题目连接: http://codeforces.com/gym/100714 Description In a large city a cellular network operator is holding a competition for subscribers to promote their new "pedestrian navigator" service. The main prize will be awarded to th…
Problem C. Contest 题目连接: http://codeforces.com/gym/100714 Description The second round of the annual student collegiate programming contest is being held in city N. To be prepared for the inrush of participants, the jury needs to know the number of t…
题目来源:http://codeforces.com/group/aUVPeyEnI2/contest/229511 时间限制:1s 空间限制:512MB 题目大意: 给定一个n 随后跟着2n行输入 "+ t":表示在t时刻获得了一样东西 "- t":表示在t时刻使用了一样东西 求每件东西等待时间的期望(得到的东西无先后顺序) 数据范围: 1 ≤ n ≤ 100 000 t ≤ 1e9 样例: 题目解法: 使用递推式从后往前推 代码: #include <al…
Problem K. KMC Attacks 题目连接: http://codeforces.com/gym/100714 Description Warrant VI is a remote planet located in the Koprulu Sector. Warrant VI features a strange huge field, which was discovered by the Kel-Morian Combine (KMC). The KMC is involved…
Problem J. Joke 题目连接: http://codeforces.com/gym/100714 Description The problem is to cut the largest possible number of circles with diameter y out of a stripe of length x and width y. Input The only line of input consists of two positive real number…
Problem I. Interest Targeting 题目连接: http://codeforces.com/gym/100714 Description A unique display advertisement system was developed at the department of advertising technologies, Yaagl Inc. The system displays advertisements that meet the interests…
Problem H. Hometask 题目连接: http://codeforces.com/gym/100714 Description Kolya is still trying to pass a test on Numbers Theory. The lecturer is so desperate about Kolya's knowledge that she gives him the same task every time. The problem is to check i…
Problem F. Finance 题目连接: http://codeforces.com/gym/100714 Description The Big Boss Company (BBC) principal is going to prepare a vacation schedule for the next year. Each employee of BBC gets a four-week vacation each year. A vacation can be divided…
Problem C. Equivalent Cards 题目连接: http://www.codeforces.com/gym/100253 Description Jane is playing a game with her friends. They have a deck of round cards of radius 100. Each card has a set of disjoint rectangles strictly within the bounding circle.…
目录 2018-2019 ICPC, NEERC, Southern Subregional Contest (Codeforces 1070) A.Find a Number(BFS) C.Cloud Computing(线段树) D.Garbage Disposal(模拟) E.Getting Deals Done(二分) F.Debate(贪心) H.BerOS File Suggestion(后缀自动机) I.Privatization of Roads in Berland(网络流)…
2018-2019 ICPC, NEERC, Southern Subregional Contest 闲谈: 被操哥和男神带飞的一场ACM,第一把做了这么多题,荣幸成为7题队,虽然比赛的时候频频出锅,差点被鸽,但还算打完了5h 总的来说这场还是不算难的,7题还是少了点 A 题目: 给出a,b,求出一个数满足是a的倍数,且数字和为b 题解: 男神懒得写博客就甩锅了 直接宽搜,宽搜时队列中的状态保存为x,y,x表示当前的数%a==x,y表示数字和 然后记录状态和方案就行了 参考代码: #inclu…
Problem G. Garden Gathering Input file: standard input Output file: standard output Time limit: 3 seconds Memory limit: 512 megabytes Many of you may have been to St. Petersburg, but have you visited Peterhof Palace? It is a collection of splendid pa…
Problem D. Delay Time Input file: standard input Output file: standard output Time limit: 1 second Memory limit: 512 megabytes Petr and Egor are measuring the gravitational acceleration g on their physics lessons using a special device. An electromag…
2016 NEERC, Moscow Subregional Contest K. Knights of the Old Republic 题意:有一张图,第i个点被占领需要ai个兵,而每个兵传送至该点需要bi的费用.占领第i条边需要其两端点的兵数之和大等于ci.对于已占领的点或边可以免费通行.因此兵达到一个点的手段有传送和沿路走.图上的兵可以在已占领的点.边随意调度. 求占领所有点的最小花费. 思路:将边按ci进行升序排列,对于每条边两端点所在的连通块进行合并,合并细节见代码.这里有一点值得思…
题目来源:http://codeforces.com/group/aUVPeyEnI2/contest/229510 时间限制:2s 空间限制:256MB 题目大意: 给定一个数字c 用 "max" "min" "+" "-" "" "/"对随机数 "?" 进行处理,使最后式子得到c的概率超过1/2 (所有数字均在0~255之间,"+" "…
第一次打ACM比赛,和yyf两个人一起搞事情 感觉被两个学长队暴打的好惨啊 然后我一直做傻子题,yyf一直在切神仙题 然后放一波题解(部分) A. Find a Number LINK 题目大意 给你d和s,求你一个最小的数满足是d的倍数且数字和是s 思路 从高位到低位考虑广搜,把当前的长度和模d的余数作为状态,然后添加一个数就在对应的位置上加 一个模数只记录长度最小的状态,然后可以反着贪心回去 yyf的神仙code: #include <iostream> #include <cstd…
I. Illegal or Not? time limit per test 1 second memory limit per test 512 megabytes input standard input output standard output The Schengen Agreement was signed by a number of countries to uniform many visa-related questions and to allow tourists fr…
从这里开始 题目列表 瞎扯 Problem A Find a Number Problem B Berkomnadzor Problem C Cloud Computing Problem D Garbage Disposal Problem E Getting Deals Done Problem F Debate Problem G Monsters and Potions Problem H BerOS File Suggestion Problem I Privatization of…
秉承ACM团队合作的思想懒,这篇blog只有部分题解,剩余的请前往星感大神Star_Feel的blog食用(表示男神汉克斯更懒不屑于写我们分别代写了下...) C. Cloud Computing 扫描线搞一搞区间(主席树也OK啊,只是空间玄学,主席树理论空间nlogn实际上开小那么10倍8倍没什么锅啊zzzz),对于权值建立权值线段树,然后记录每个权值出现的次数以及区间权值和,然后在线段树上二分求答案即. #include<cstdio> #include<cstring> #i…
A. Altitude 从小到大加入每个数,用set查找前驱和后继即可. 时间复杂度$O(n\log n)$. #include <bits/stdc++.h> using namespace std ; const int Maxn=100020,Inf=1e9; typedef pair<int,int>pi; int n; int a[Maxn]; vector<pi>V; set<int>S; int ans,rep1,rep2,rep3; int…
K. King's Rout time limit per test 4 seconds memory limit per test 512 megabytes input standard input output standard output The great rout will be held this evening in the palace of his majesty Nassah II, the king of Occorom. There are n guests invi…
H. Hashing time limit per test 1 second memory limit per test 512 megabytes input standard input output standard output In this problem you are given a byte array a. What you are going to do is to hash its subsequences. Fortunately you don't have to…
C. Colder-Hotter time limit per test 1 second memory limit per test 512 megabytes input standard input output standard output This is an interactive problem. Egor and Petr are playing a game called «Colder-Hotter» on a 2D plane. At the beginning of t…
A. Anagrams time limit per test 1 second memory limit per test 512 megabytes input standard input output standard output Consider the positional numeral system with a given base b. A positive integer x is called b-anagram of a positive integer y if t…
F. Friends time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Three friends Alex, Dmitry and Petr want to go abroad for a better life. They start at 09:00 in the morning in their home city A …
E. Equal Digits time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output For the given integer N and digit D, find the minimal integer K ≥ 2 such that the representation of N in the positional nume…
D. Do it Right! time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Given two distinct positive integers A and B, find out if it is possible to find a third positive integer C so that a triang…
C. CIA Datacenter time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output The CIA has decided to keep up with technology advancements and try to capture all the information passing in the internet…
A. Advanced 2048 time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Only lazy did not play the 2048 game last year. Soon, the secret of success had been revealed and interest to the game has…