把所有合法的进制打出来会发现合法的进制都是在
n/3 n/4 n/5的边上
然后暴力边上的进制数。。
#include
#include
typedef long long ll;
bool ok(ll x, ll y) {
ll v;
while (x > 0) {
v = x % y;
if (v != 3 && v != ...
分类:
其他好文 时间:
2014-08-12 19:11:45
阅读次数:
164
因为瞬间伤害的塔一定是放在终点端的,所以枚举这种塔的个数
然后就能把n^3变成n^2了
#include
#include
#include
typedef long long ll;
const int N = 1500 + 2;
ll d[N][N]; // j = 3;
int Tt = 0, n, x, y, z, t;
inline void up(ll& a, ll...
分类:
其他好文 时间:
2014-08-12 19:08:14
阅读次数:
279
public class tedst { private static final String LL = "Decompiling this copyrighted software is a violation of both your license agreement and the...
分类:
系统相关 时间:
2014-08-12 10:07:43
阅读次数:
299
#include #include #include #include #include #include #define LL __int64#define N 210using namespace std;struct Line{ double x,y1,y2; int f;}line[N];s...
分类:
其他好文 时间:
2014-08-12 00:01:33
阅读次数:
240
ls只是简单的列出目录下文件名,ll更加详细的列出了文件的类型、文件所有者权限、文件所有者组权限、文件大小、文件最后修改时间,etc...我们可以用一个简单的图来说明,如下图1: 图11、第一位就"-",表示普通文件。2、rw- ,表示文件...
分类:
系统相关 时间:
2014-08-12 00:00:53
阅读次数:
330
比较两个串计算后的大小 主要是q^2=q+1 明显是一个斐波那契数列
100000位肯定超LL 我在每一位只取到两个以内 居然ac了
#include
using namespace std;
int a[100020];
char s1[100020],s2[100020];
int main()
{
scanf("%s%s",s1,s2);
int len1=strlen(...
分类:
其他好文 时间:
2014-08-11 12:00:52
阅读次数:
274
题目链接题意 : 中文题不详述。思路 : 由N%Mi=(Mi-a)可得(N+a)%Mi=0;要取最小的N即找Mi的最小公倍数即可。 1 //1788 2 #include 3 #include 4 #include 5 #include 6 #define LL long long 7 8...
分类:
其他好文 时间:
2014-08-11 11:37:52
阅读次数:
160
In this post, I’ll detail how to catch specific key presses and why this can be useful. This is another in my series of “requested” tutorials. There r...
分类:
编程语言 时间:
2014-08-11 02:46:11
阅读次数:
467
解题报告
题意:
求逆序数。
思路:
线段树离散化处理。
#include
#include
#include
#include
#define LL long long
using namespace std;
LL sum[2001000],num[501000],_hash[501000];
void push_up(int rt)
{
sum[rt]=sum[rt...
分类:
其他好文 时间:
2014-08-11 00:22:01
阅读次数:
255
第一次 耍划分树。。。
#include
#include
#include
#include
#include
#include
#include
using namespace std;
#include
#include
#include
#include
#include
#include
typedef long long LL;
const int ...
分类:
其他好文 时间:
2014-08-10 18:37:20
阅读次数:
181