E. The Architect Omar   time limit per test 1.0 s memory limit per test 256 MB input standard input output standard output Architect Omar is responsible for furnishing the new apartments after completion of its construction. Omar has a set of living…
这几天一直在宿舍跑PY模型,学校的ACM寒假集训我也没去成,来学校的时候已经18号了,突然加进去也就上一天然后排位赛了,没学什么就去打怕是要被虐成渣,今天开学前一天,看到最后有一场大的排位赛,就上去试了一下,果然被虐成渣,十二道题目在有限时间内就做了四道,还有一道疯狂的WA,拿出两道一些有趣的想法出来分享一下. 今天打题就遇到了大数计算的问题,本来昨晚想解决这个难题,也没来得及,所以打题的时候大数计算那道就放弃了,过几天我一定会扔上来的. 今日兴趣新闻: 年度最惨小学生!在姥姥家热炕头写作业,写…
E. The Architect Omar time limit per test 1.0 s memory limit per test 256 MB input standard input output standard output Architect Omar is responsible for furnishing the new apartments after completion of its construction. Omar has a set of living ro…
题目链接  Power Tower 题意  给定一个序列,每次给定$l, r$ 求$w_{l}^{w_{l+1}^{w_{l+2}^{...^{w_{r}}}}}$  对m取模的值 根据这个公式 每次递归计算. 因为欧拉函数不断迭代,下降到$1$的级别大概是$log(m)$的,那么对于每一次询问最多需要递归$log(m)$次 注意每次求解欧拉函数的时候要用map存下来,方便以后查询 #include <bits/stdc++.h> using namespace std; #define re…
K. Malek and Summer Semester   time limit per test 1.0 s memory limit per test 256 MB input standard input output standard output Malek registered n courses for the summer semester. Malek has a success rate m, which means he has to succeed at least i…
还有J题,J题自己并不是,套的板子,大家写的都一样,因为大家都是套板子过的,贴一下代码,等学会了写一篇博客... J.Boxes Game 代码: 1 //J. Boxes Game-取数博弈-不会,套的板子 2 #include<iostream> 3 #include<algorithm> 4 #include<cstdio> 5 #include<cstring> 6 #include<cmath> 7 using namespace st…
I. Move Between Numbers   time limit per test 2.0 s memory limit per test 256 MB input standard input output standard output You are given n magical numbers a1, a2, ..., an, such that the length of each of these numbers is 20 digits. You can move fro…
H. Eyad and Math   time limit per test 2.0 s memory limit per test 256 MB input standard input output standard output Eyad was given a simple math problem, but since he is very bad at math he asked you to help him. Given 4 numbers, a, b, c, and d. Yo…
F. Building Numbers   time limit per test 3.0 s memory limit per test 256 MB input standard input output standard output In this problem, you can build a new number starting from 1, by performing the following operations as much as you need: Add 1 to…
B. Linear Algebra Test   time limit per test 3.0 s memory limit per test 256 MB input standard input output standard output Dr. Wail is preparing for today's test in linear algebra course. The test's subject is Matrices Multiplication. Dr. Wail has n…