Search found 2 matches

by simon_cuet
Wed Feb 24, 2010 5:19 pm
Forum: Volume 117 (11700-11799)
Topic: 11753 - Creating Palindrome
Replies: 8
Views: 4003

Re: 11753 - Creating Palindromes

There is no necessity of "dynamic programming" to solve this problem. It's an "adhoc" problem with a few line code in C++ :D
I solved this problem in 0.324 sec. But to avoid TLE you must need to check a certain condition.
by simon_cuet
Wed Mar 11, 2009 10:38 am
Forum: Volume 106 (10600-10699)
Topic: 10608 - Friends
Replies: 75
Views: 26970

Re: 10608 WA Why???

#include<stdio.h> long edge[30001][33],degree[500001],s=0,cc[30000]={0}; int dfs(long a[30000][33],long start) { long i,y; cc[start]=0; s++; for(i=1;i<=degree[start];i++) { y=edge[start] ; if(cc[y]==1) dfs(a,y); } return 0; } int main() { long n,m,i,j,v1,data,z=0,v2,test=0,start=1,x=0,count; scanf("...

Go to advanced search