随笔分类 - OI
摘要:[BZOJ1220][POJ1091][HNOI2002]跳蚤 试题描述 Z城市居住着很多只跳蚤。在Z城市周六生活频道有一个娱乐节目。一只跳蚤将被请上一个高空钢丝的正中央。钢丝很长,可以看作是无限长。节目主持人会给该跳蚤发一张卡片。卡片上写有N+1个自然数。其中最后一个是M,而前N个数都不超过M,卡
阅读全文
摘要:[POJ1936]All in All 试题描述 You have devised a new encryption technique which encodes a message by inserting between its characters randomly generated st
阅读全文
摘要:[Educational Codeforces Round 16]E. Generate a String 试题描述 zscoder wants to generate an input file for some programming competition problem. His input
阅读全文
摘要:[Educational Codeforces Round 16]D. Two Arithmetic Progressions 试题描述 You are given two arithmetic progressions: a1k + b1 and a2l + b2. Find the number
阅读全文
摘要:[Educational Codeforces Round 16]C. Magic Odd Square 试题描述 Find an n × n matrix with different numbers from 1 to n2, so the sum in each row, column and
阅读全文
摘要:[Educational Codeforces Round 16]B. Optimal Point on a Line 试题描述 You are given n points on a line with their coordinates xi. Find the point x so the s
阅读全文
摘要:[Educational Codeforces Round 16]A. King Moves 试题描述 The only king stands on the standard chess board. You are given his position in format "cd", where
阅读全文
摘要:Day 1 理论上,我现在不应该坐在电脑前打字,因为早在今天上午 6:20 全体新高一同学就坐车前往军(无)训(尽)基(炼)地(狱)了,而今天上午 6:20 我还在被窝里呢…… 没错,我旷掉了军训,然而不幸的是还得写“军训日记”,所以我便在博客上出版这一期文章,记下这几天的回忆和感受,做个念想。 早
阅读全文
摘要:[POJ1383]Labyrinth 试题描述 The northern part of the Pyramid contains a very large and complicated labyrinth. The labyrinth is divided into square blocks,
阅读全文
摘要:[POJ1157]LITTLE SHOP OF FLOWERS 试题描述 You want to arrange the window of your flower shop in a most pleasant way. You have F bunches of flowers, each be
阅读全文
摘要:[POJ1338]Ugly Numbers 试题描述 Ugly numbers are numbers whose only prime factors are 2, 3 or 5. The sequence 1, 2, 3, 4, 5, 6, 8, 9, 10, 12, ... shows the
阅读全文
摘要:[POJ1004]Financial Management 试题描述 Larry graduated this year and finally has a job. He's making a lot of money, but somehow never seems to have enough
阅读全文
摘要:[BZOJ2908]又是nand 试题描述 首先知道A nand B=not(A and B) (运算操作限制了数位位数为K)比如2 nand 3,K=3,则2 nand 3=not (2 and 3)=not 2=5。 给出一棵树,树上每个点都有点权,定义树上从a到b的费用为0与路径上的点的权值顺
阅读全文
摘要:[BZOJ1018][SHOI2008]堵塞的交通traffic 试题描述 有一天,由于某种穿越现象作用,你来到了传说中的小人国。小人国的布局非常奇特,整个国家的交通系统可以被看成是一个2行C列的矩形网格,网格上的每个点代表一个城市,相邻的城市之间有一条道路,所以总共有2C个城市和3C-2条道路。
阅读全文
摘要:[BZOJ1024][SCOI2009]生日快乐 试题描述 windy的生日到了,为了庆祝生日,他的朋友们帮他买了一个边长分别为 X 和 Y 的矩形蛋糕。现在包括windy,一共有 N 个人来分这块大蛋糕,要求每个人必须获得相同面积的蛋糕。windy主刀,每一切只能平行于一块蛋糕的一边(任意一边),
阅读全文
摘要:[BZOJ2724][Violet 6]蒲公英 试题描述 输入 修正一下 l = (l_0 + x - 1) mod n + 1, r = (r_0 + x - 1) mod n + 1 修正一下 l = (l_0 + x - 1) mod n + 1, r = (r_0 + x - 1) mod
阅读全文
摘要:[BZOJ1101][POI2007]Zap 试题描述 FGD正在破解一段密码,他需要回答很多类似的问题:对于给定的整数a,b和d,有多少正整数对x,y,满足x<=a,y<=b,并且gcd(x,y)=d。作为FGD的同学,FGD希望得到你的帮助。 输入 第一行包含一个正整数n,表示一共有n组询问。(
阅读全文
摘要:[BZOJ2820]YY的GCD 试题描述 神犇YY虐完数论后给傻×kAc出了一题给定N, M,求1<=x<=N, 1<=y<=M且gcd(x, y)为质数的(x, y)有多少对kAc这种 傻×必然不会了,于是向你来请教……多组输入 神犇YY虐完数论后给傻×kAc出了一题给定N, M,求1<=x<=
阅读全文
摘要:[BZOJ2818]Gcd 试题描述 给定整数N,求1<=x,y<=N且Gcd(x,y)为素数的数对(x,y)有多少对. 输入 一个整数N 输出 如题 输入示例 输出示例 数据规模及约定 1<=N<=10^7 题解 对于每个质数 p,求数对 (x, y) ∈ [1, n] 满足 gcd(x, y)
阅读全文
摘要:[BZOJ1009][HNOI2008]GT考试 试题描述 阿申准备报名参加GT考试,准考证号为N位数X1X2....Xn(0<=Xi<=9),他不希望准考证号上出现不吉利的数字。他的不吉利数学A1A2...Am(0<=Ai<=9)有M位,不出现是指X1X2...Xn中没有恰好一段等于A1A2...
阅读全文

浙公网安备 33010602011771号