Submission #7033

# Submission time Handle Problem Language Result Execution time Memory
7033 2014-07-12T22:23:21 Z gs13068 CATS (NOI14_cats) C++
0 / 25
1500 ms 262144 KB
#include<cstdio>

long long X,L,N;

int F(long long A)
{
	if(A>L)
	{
		X--;
        if(X==0)
		{
			printf("%lld\n",A);
			return 1;
		}
		return 0;
	}
    F(A+N+N);
    F((A+N+N)^1);
}

int main()
{
	int tcn;
	scanf("%d",&tcn);
	while(tcn--)
	{
		long long T;
		scanf("%lld%lld%lld",&X,&L,&N);
        for(T=0;!F(T);T^=1);
	}
}
# Verdict Execution time Memory Grader output
1 Execution timed out 1500 ms 1088 KB Program timed out
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Execution timed out 1500 ms 1088 KB Program timed out
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Execution timed out 1500 ms 1088 KB Program timed out
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Execution timed out 1500 ms 1256 KB Program timed out
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Memory limit exceeded 24 ms 262144 KB Memory limit exceeded
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Memory limit exceeded 40 ms 262144 KB Memory limit exceeded
2 Halted 0 ms 0 KB -