ADAFIELD - Ada and Field 这个题,如果用一个字来形容的话:-----------------------------------------------嗯! 题意:n*m的空白矩形坐落在XY轴,Q次操作,每次可以在y轴或x轴的矩形区域内画一条直线,是直线啊.问每次操作后最大的矩形面积多大. 对于思路我只能拍手称赞了,一开始想不到怎么优化,想着用优先队列或set来存当前边的最大值,但是更新的时候却 无法实时更新.赛后看其他选手的代码才突然想到可以用map的键值来排序,每次插…
题目链接:http://www.spoj.com/problems/IM/en/ Time limit:491 ms Memory limit:1572864 kB Code length Limit:50000 B Jedi knights, Qui-Gon Jinn and his young apprentice Obi-Wan Kenobi, are entrusted by Queen Padmé Amidala to save Naboo from an invasion by th…
http://www.spoj.com/problems/IM/ 962. Intergalactic Map Problem code: IM Jedi knights, Qui-Gon Jinn and his young apprentice Obi-Wan Kenobi, are entrusted by Queen Padmé Amidala to save Naboofrom an invasion by the Trade Federation. They must leave N…
Intergalactic Map Time Limit: 6000ms Memory Limit: 262144KB This problem will be judged on SPOJ. Original ID: IM64-bit integer IO format: %lld Java class name: Main Jedi knights, Qui-Gon Jinn and his young apprentice Obi-Wan Kenobi, are entrus…
题目 给定 N 张卡⽚,正⾯分别写上 1.2.--.N,然后全部翻⾯,洗牌,在背⾯分别写上 1.2.--. N.将每张牌的正反两⾯数字相减(⼤减⼩),得到 N 个⾮负差值,其中是否存在相等的差? 输⼊格式: 输⼊第⼀⾏给出⼀个正整数 N(2 <= N <= 10000),随后⼀⾏给出 1 到 N 的⼀个洗牌后的排列,第 i 个数表示正⾯写了 i 的那张卡⽚背⾯的数字. 输出格式: 按照"差值 重复次数"的格式从⼤到⼩输出重复的差值及其重复的次数,每⾏输出⼀个结果. 输⼊样例…