摘要:
Description Given a prime P, 2 <= P < 231, an integer B, 2 <= B < P, and an integer N, 1 <= N < P, compute the discrete logarithm of N, base B, modulo 阅读全文
摘要:
A ZS the Coder and Chris the Baboon are travelling to Udayland! To get there, they have to get on the special IOI bus. The IOI bus has nrows of seats. 阅读全文
摘要:
A Kolya is going to make fresh orange juice. He has n oranges of sizes a1, a2, ..., an. Kolya will put them in the juicer in the fixed order, starting 阅读全文
摘要:
【未完待续】 A 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 'h' and dis th 阅读全文
摘要:
A Small, but very brave, mouse Brain was not accepted to summer school of young villains. He was upset and decided to postpone his plans of taking ove 阅读全文
摘要:
Task 1 小 W 和小 M 一起玩拼图游戏啦~ 小 M 给小 M 一张 N 个点的图,有 M 条可选无向边,每条边有一个甜蜜值,小 W 要选 K条边,使得任意两点间最多有一条路径,并且选择的 K条边甜蜜值之和最大。 对于 100%的数据:N,M<=100000 最小生成树裸题 时间复杂度 O(n 阅读全文
摘要:
Task1 为了测试小 W 的数学水平,果果给了小 W N 个点,问他这 N 个点能构成的三角形个数。 对于 100%的数据:N<=100,保证任意两点不重合,坐标<=10000 恶心题(卡精度) Task2 为了测试小 M 的英语水平,Mr.R 让小 M 写英语作文,小 M 则把作文交给了小 W 阅读全文
摘要:
Task1 小 W 得到了一堆石子,要放在 N 条水平线与 M 条竖直线构成的网格的交点上。因为小 M 最喜欢矩形了, 小 W 希望知道用 K 个石子最多能找到多少四边平行于坐标轴的长方形,它的四个角上都恰好放着一枚石子。 对于 100%的数据:N<=30000,保证任意两点不重合,K<=N*M 简 阅读全文
摘要:
给定一个 n 行 m 列的方格,每个格子里有一个正整数 a,1 ≤ a ≤ k,k ≤ n∗m 假设你当前时刻站在 (i,j) 这个格子里,你想要移动到 (x,y),那必须满足以下三个条件 1:i < x 2:j < y 3:第 i 行第 j 列格子里的数不等于第 x 行第 y 列格子里的数 求从 阅读全文