Why wrong answer??????????????????????????????????????????????????
#include<stdio.h>
#include<string.h>
#define maxn 100000+10
char a[maxn],b[maxn],next[maxn];
void NEXT(int len)
{
int i,j;
next[0]=j=-1;
for(i=1;i<len;i++)
{
while(j>-1&&b[j+1]!=b[i])
j=next[j];
if(b[j+1]==b[i])
j ...
Search found 2 matches
- Fri Jan 27, 2012 12:46 pm
- Forum: Volume 114 (11400-11499)
- Topic: 11475 - Extend to Palindrome
- Replies: 32
- Views: 20687
- Sun Oct 30, 2011 8:21 am
- Forum: Volume 105 (10500-10599)
- Topic: 10515 - Powers Et Al.
- Replies: 124
- Views: 45663
Re: 10515 - Power et al.
Why TLE?
import java.math.*;
import java.util.*;
public class Main
{
public static void main(String[] args)
{
Scanner in=new Scanner(System.in);
BigInteger a,b,c;
c=BigInteger.TEN;
while(in.hasNext())
{
a=in.nextBigInteger();
b=in.nextBigInteger();
if(a.compareTo(BigInteger.ZERO)==0&&b ...
import java.math.*;
import java.util.*;
public class Main
{
public static void main(String[] args)
{
Scanner in=new Scanner(System.in);
BigInteger a,b,c;
c=BigInteger.TEN;
while(in.hasNext())
{
a=in.nextBigInteger();
b=in.nextBigInteger();
if(a.compareTo(BigInteger.ZERO)==0&&b ...