随笔分类 -  SGU

SGU OJ
SGU 311. Ice-cream Tycoon(线段树)
摘要:311. Ice-cream TycoonTime limit per test: 0.5 second(s)Memory limit: 65536 kilobytesinput: standardoutput: standardYou've recently started an ice-crea... 阅读全文

posted @ 2014-05-02 12:44 kuangbin 阅读(1372) 评论(0) 推荐(0)

SGU 319. Kalevich Strikes Back (线段树)
摘要:319. Kalevich Strikes BackTime limit per test: 0.5 second(s)Memory limit: 65536 kilobytesinput: standardoutput: standardAnd yet again the Berland comm... 阅读全文

posted @ 2014-05-02 11:44 kuangbin 阅读(605) 评论(0) 推荐(0)

SGU 104. Little shop of flowers (DP)
摘要:104. Little shop of flowerstime limit per test: 0.25 sec.memory limit per test: 4096 KBPROBLEMYou want to arrange the window of your flower shop in a most pleasant way. You haveFbunches of flowers, each being of a different kind, and at least as many vases ordered in a row. The vases are glued onto 阅读全文

posted @ 2014-02-08 14:47 kuangbin 阅读(1231) 评论(0) 推荐(0)

SGU 101 Domino (输出欧拉路径)
摘要:101. Dominotime limit per test: 0.25 sec.memory limit per test: 4096 KBDominoes – game played with small, rectangular blocks of wood or other material, each identified by a number of dots, or pips, on its face. The blocks usually are called bones, dominoes, or pieces and sometimes men, stones, or ev 阅读全文

posted @ 2014-02-03 11:18 kuangbin 阅读(1236) 评论(0) 推荐(0)

SGU 275. To xor or not to xor (高斯消元法)
摘要:题目链接:http://acm.sgu.ru/problem.php?contest=0&problem=275题意:给你n个数,可以选择任意个数异或,但是要使得最后的异或值最大。我们把每个数用二进制表示,要使得最后的异或值最大,就是要让高位尽量为1,高位能不能为1就必须用高斯消元判断了。1. 根据数的二进制表示,建立方程组的矩阵,结果那列置为1。2. 从下往上高斯消元(高位放下面),如果该行有未被控制的变元,则该行的结果一定为1,且该变元控制该行。3. 从该行往上依次消掉(异或)该变元。4. 如果该行没有可以用来控制的变元,如果最后一列是0,则该行结果也为1,否则该行结果为0。这里能 阅读全文

posted @ 2014-01-31 01:17 kuangbin 阅读(1807) 评论(0) 推荐(0)

SGU 200. Cracking RSA (高斯消元求自由变元个数)
摘要:题目链接:http://acm.sgu.ru/problem.php?contest=0&problem=200200. Cracking RSAtime limit per test: 0.25 sec.memory limit per test: 65536 KBinput: standardoutput: standardThe following problem is somehow related to the final stage of many famous integer factorization algorithms involved in some crypto 阅读全文

posted @ 2014-01-21 13:25 kuangbin 阅读(2030) 评论(0) 推荐(0)

导航

JAVASCRIPT: