突然很想刷刷题,LeetCode是一个不错的选择,忽略了输入输出,更好的突出了算法,省去了不少时间. dalao们发现了任何错误,或是代码无法通过,或是有更好的解法,或是有任何疑问和建议的话,可以在对应的随笔下面评论区留言,我会及时处理,在此谢过了. 过程或许会很漫长,也很痛苦,慢慢来吧. 编号 题名 过题率 难度 1 Two Sum 0.376 Easy 2 Add Two Numbers 0.285 Medium 3 Longest Substring Without Repeating C…
打这场的时候迷迷糊糊的,然后掉分了( A Prison Break: 题面很复杂,但是题意很简单,仅需求出从这个点到四个角的最大的曼哈顿距离即可 #include <bits/stdc++.h> using namespace std; typedef long long ll; int times; int n,m,r,c; int main() { ios::sync_with_stdio(false); cin.tie(0),cout.tie(0); cin >> times…
我要举报本次校赛出题人的消极出题!!! 官方题解请戳:http://3.scnuacm2015.sinaapp.com/?p=89(其实就是一堆代码没有题解) A. 树链剖分数据结构板题 题目大意:我没看,看不懂. 基本思路:我不会. 参考代码:找Oyk老师和Czj老师去. B. The background of water problem 题目大意(大写加粗的水题):给定$N$个学生和他们$K$个科目的成绩$S_i$,再给出各科目$K_i$的权重顺序$Q_i$,求排名之后,拥有id为$X$的…
Given n points in the plane that are all pairwise distinct, a "boomerang" is a tuple of points (i, j, k) such that the distance between i and j equals the distance between i and k (the order of the tuple matters). Find the number of boomerangs.…
Problems # Name A Infinite Sequence standard input/output 1 s, 256 MB x3509 B Restoring Painting standard input/output 1 s, 256 MB x2519 C Money Transfers standard input/output 1 s, 256 MB x724 D Tree Construction standard input/outp…
A.Relic Discovery_hdu5982 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 57 Accepted Submission(s): 49 Problem Description Recently, paleoanthropologists have found historical remains on an…
Given n points in the plane that are all pairwise distinct, a "boomerang" is a tuple of points (i, j, k) such that the distance between iand j equals the distance between i and k (the order of the tuple matters). Find the number of boomerangs. Y…
Bayan 2015 Contest Warm Up http://codeforces.com/contest/475 A - Bayan Bus B - Strongly Connected City C - Kamal-ol-molk's Painting A. Bayan Bus 题意:输入人数k,输出一辆公交车!优先坐最后,同一排优先坐左边. 题解:暴力找地方坐啊! //#pragma comment(linker, "/STACK:102400000,102400000")…
BestCoder Round #7 Start Time : 2014-08-31 19:00:00 End Time : 2014-08-31 21:00:00Contest Type : Register Public Contest Status : Ended Current Server Time : 2014-08-31 21:12:12 Solved Pro.ID Title Ratio(Accepted / Submitted) 1001 Little Pony…