首页
Python
Java
前端
数据库
Linux
Chatgpt专题
开发者工具箱
3208专题
HDU 3208 Integer’s Power 指数和、容斥
题意: 输入l,r,求出[l, r]区间内,表示成指数形式的指数和。 要求a^b,a尽量小,b尽量大。例如,16应该表示成2^4,而不是4^2。 思路: 参考自:http://blog.csdn.net/acdreamers/article/details/10977785 这算是容斥吧?初学的我也不大懂。 如果我们可以知道每个指数所表示的个数,那么问题就可以解决了。 感觉像
阅读更多...
Acwing-3208. Z字形扫描
输入样例:41 5 3 93 7 5 69 4 6 47 3 1 3 代码: #include <iostream>#include <vector>using namespace std;int dxy[][2] = { {0,1},{1,-1},{1,0},{ -1,1 } }; //偏移量数组int main(){int n;cin >> n;vecto
阅读更多...