随笔分类 - Codeforce
摘要:传送门:http://codeforces.com/problemset/problem/710/E 分析: 让你写一个全由"a"组成的长为n的串,告诉你两种操作,第一种:插入一个字母或者删除一个字母需要花费x秒, 第二种:复制现有的串,并加入到原来的穿上,花费y秒,问你最少花费多少时间? 用dp[
        阅读全文
                
摘要:题目链接: http://codeforces.com/problemset/problem/710/D 分析:给你两个方程 a1k + b1 and a2l + b2,求在一个闭区间【L,R】中有多少个X,X满足 x = a1k' + b1 = a2l' + b2。 由此可以发现这两个方程满足线性
        阅读全文
                
摘要:You are given n points on a line with their coordinates xi. Find the point x so the sum of distances to the given points is minimal. You are given n p
        阅读全文
                
摘要:Find an n × n matrix with different numbers from 1 to n2, so the sum in each row, column and both main diagonals are odd. Find an n × n matrix with di
        阅读全文
                
摘要:output standard output The only king stands on the standard chess board. You are given his position in format "cd", where c is the column from 'a' to 
        阅读全文
                
摘要:C. They Are Everywhere time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output C. They Are Every
        阅读全文
                
摘要:B. Cells Not Under Attack time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output B. Cells Not U
        阅读全文
                
摘要:A. Cards time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output A. Cards time limit per test 1 s
        阅读全文
                
摘要:Description Polycarp has quite recently learned about email aliases. Of course, he used to suspect that the case of the letters doesn't matter in emai
        阅读全文
                
摘要:Description Hooray! Berl II, the king of Berland is making a knight tournament. The king has already sent the message to all knights in the kingdom an
        阅读全文
                
摘要:Description standard input/outputStatements You are given three numbers. Is there a way to replace variables A, B and C with these numbers so the equa
        阅读全文
                
摘要:Description On vacations n pupils decided to go on excursion and gather all together. They need to overcome the path with the length l meters. Each of
        阅读全文
                
摘要:Description Mad scientist Mike has just finished constructing a new device to search for extraterrestrial intelligence! He was in such a hurry to laun
        阅读全文
                
摘要:Description Mad scientist Mike is building a time machine in his spare time. To finish the work, he needs a resistor with a certain resistance value. 
        阅读全文
                
摘要:Description Mad scientist Mike is busy carrying out experiments in chemistry. Today he will attempt to join three atoms into one molecule. A molecule 
        阅读全文
                
摘要:Description Mad scientist Mike entertains himself by arranging rows of dominoes. He doesn't need dominoes, though: he uses rectangular magnets instead
        阅读全文
                
                    
                
浙公网安备 33010602011771号