CODE FESTIVAL 2017 qual B B - Problem Set 确实水题,但当时没想到map,用sort后逐个比较解决的,感觉麻烦些,虽然效率高很多.map确实好写点. 用map: #include<iostream> #include<cstdio> #include<cstdlib> #include<map> using namespace std; map<int,int>mp; int main() { int n,…
Nasty Hacks Time Limit: 3000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 3049 Accepted Submission(s): 2364 Problem Description You are the CEO of Nasty Hacks Inc., a company that creates small pieces of…