进化之地(Evoland) Time Limit: 1000ms Case Time Limit: 1000ms Memory Limit: 65536KB 64-bit integer IO format: %lld Java class name: Main Submit Status PID: 49102 Font Size: 最近xhyu和hwq欢乐地通了一款RPG(Role-playing game)神作——<进化之地>,这是一部用RPG讲述RPG发展史的RPG.随 着…
A Matrix Time Limit: 2000ms Memory Limit: 65536KB 64-bit integer IO format: %lld Java class name: Main Prev Submit Status Statistics Discuss Next Font Size: + - Chaos King loves permutation and matrix, now he is trying to find out some relatio…
http://www.bnuoj.com/bnuoj/problem_show.php?pid=29376 我直接暴力搜索的. 剪枝: 1.步骤最多只有4步,超过4步则退出 2.油的行程相加后的总和距离大于剩余距离时也退出 AC代码: #include<iostream> #include<cstdio> #include<algorithm> using namespace std; int yn; int a[1010]; bool cmp(int a, int b…
http://www.bnuoj.com/bnuoj/problem_show.php?pid=29364 这个题被坑了. 题意:密码就是那些数字里面的数,转换成二进制后1最少的那个数,当1的个数相同的时候,要选最小的那个数. AC代码: #include<iostream> #include<cstdio> #include<algorithm> using namespace std; bool cmp(int a, int b) { return a < b…
链接: http://www.bnuoj.com/bnuoj/problem_show.php?pid=26579 http://www.bnuoj.com/bnuoj/contest_show.php?cid=2318#problem/25687 Andrew the Ant Time Limit: 4000ms Memory Limit: 65536KB 64-bit integer IO format: %lld Java class name: Main Prev S…
http://www.bnuoj.com/bnuoj/problem_show.php?pid=1596 这个题一开始以为要求最少移动次数,把我吓到了,原来只要求最少移动几个方块就行了..这一下就变简单很多了.. AC代码: #include<iostream> #include<cstdio> #include<algorithm> using namespace std; bool cmp(int a, int b) { return a<b; } int m…
二进制++高精度取模 #include<cstdio> #include<cstring> #include<algorithm> using namespace std; ; long long a[maxn]; long long sumA[maxn]; int aa,bb; int len; long long n; int Base[maxn]; int tot; int ans[maxn]; void init1() { memset(sumA,,sizeof…
#include<cstdio> #include<algorithm> using namespace std; +; struct Homework { long long st; long long len; }h[maxn]; int n; bool cmp(const Homework&a,const Homework&b) { return a.st<b.st; } int main() { int T; scanf("%d",…
#include<cstdio> #include<cstring> #include<cmath> #include<algorithm> using namespace std; int ans; int T; int a,b; int main() { scanf("%d",&T); while(T--) { scanf("%d%d",&a,&b); ans=max(a,b)*; ) an…