Welcome, Guest! Sign Up RSS

Clever Space

Friday, 11.22.2024
Main » 2013 » October » 21

本来只想测试一下人品如何,没想到。。。

RK的强大让我无力吐槽,

这道题O(nlogn)的人品算法竟然比O(n)还快。

#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<set>
#include<algorithm>
#include<map>
#include<vector>
#include<queue>
#include<iostream>
#include<string>
#include<cmath>
#define PRIME 13331
#define N 8010
#define FOR(i,a,b) for(i=(a);i<=(b);i++)
#define ROF(i,a,b) for(i=(a);i>=(b);i--)
typedef unsigned long long ULL;
using namespace std;
ULL p[N];char s1[N],s2[N];ULL c[N];
void Main()
{
  scanf("%s",s1+1);scanf("%s",s2+1);
  int n=strlen(s1+1),m=strlen(s2+1),i;
  if (n<m) {printf("NO&# ... Read more »
Views: 337 | Added by: dhy0077 | Date: 10.21.2013