Search found 31 matches

by LazyTym
Wed Feb 11, 2015 11:12 am
Forum: Volume 9 (900-999)
Topic: 920 - Sunny Mountains
Replies: 1
Views: 1042

Re: 920 - Sunny Mountains

this problem seems easy but i can not understand this line of the problem
(3) all the X-coordinates are pair-wise distinct;
.
what does this mean and can anyone help me to understand this problem????

thanks in advanced
by LazyTym
Tue Feb 10, 2015 7:30 pm
Forum: Volume 9 (900-999)
Topic: 941 - Permutations
Replies: 7
Views: 6159

Getting WA

i think my code gives right output for all input except this input: input: 1 abcdefghijklmnopqrst 88888888888888888 AC output: aorshnpkdlmiqtgfejbc MY output: aorshnpkdlmiqtgfebcj can anyone help me to fix the bug of my code??? #include<iostream> #include<vector> #include<cstring> #include<cmath> #i...
by LazyTym
Sat Feb 07, 2015 9:37 pm
Forum: Volume 9 (900-999)
Topic: 990 - Diving for Gold
Replies: 11
Views: 5389

WA...Pls Help.......

the procedures i use: 1.taking the depth and number of coin in a structure. 2.then i sort(high to low) the structure according to the number of coin. 3.then take the treasure if it fullfil the condition.that's it. is my procedure wrong? i check all the input from this thread and every AC output matc...
by LazyTym
Wed Feb 04, 2015 11:29 am
Forum: Volume 9 (900-999)
Topic: 929 - Number Maze
Replies: 92
Views: 39726

Why TLE???

i use priority queue and BFS. but i can not understand why getting TLE everytime????please anyone check my code .......... My code below: #include<iostream> #include<cstring> #define M 1000000 #define INF 999999 using namespace std; int dx[4]={-1,+1,0,0}; int dy[4]={0,0,-1,+1}; int A[999][999]; int ...
by LazyTym
Wed Feb 04, 2015 11:27 am
Forum: Volume 9 (900-999)
Topic: 929 - Number Maze
Replies: 92
Views: 39726

Why TLE???

i use priority queue and BFS. but i can not understand why getting TLE everytime????please anyone check my code .......... My code below: #include<iostream> #include<cstring> #define M 1000000 #define INF 999999 using namespace std; int dx[4]={-1,+1,0,0}; int dy[4]={0,0,-1,+1}; int A[999][999]; int ...
by LazyTym
Wed Feb 04, 2015 11:27 am
Forum: Volume 9 (900-999)
Topic: 929 - Number Maze
Replies: 92
Views: 39726

Why TLE???

i use priority queue and BFS. but i can not understand why getting TLE everytime????please anyone check my code .......... My code below: #include<iostream> #include<cstring> #define M 1000000 #define INF 999999 using namespace std; int dx[4]={-1,+1,0,0}; int dy[4]={0,0,-1,+1}; int A[999][999]; int ...
by LazyTym
Thu Dec 11, 2014 8:18 pm
Forum: Volume 1 (100-199)
Topic: 103 - Stacking Boxes
Replies: 200
Views: 18962

Re: 103 - Stacking Boxes

WHY WA.............. my procedure is: 1.first i take dimentions and sort them. 2.then make a directed graph according to (u,v) is the index of boxes and if v fits in u then there is a direction u to v. 3.then find topological sort of the directed graph and take the order in a stack. 4.form the stack...
by LazyTym
Tue Nov 25, 2014 11:30 pm
Forum: Volume 1 (100-199)
Topic: 103 - Stacking Boxes
Replies: 200
Views: 18962

Re: 103 - Stacking Boxes

i solve this problem using LIS then i am trying to solve by DFS(topological sort). But the problem is: 1. how can i find the maximum sequence from the topological order. 2.and the path of the maximum sequence from the topological order. can anyone solve this prob using dfs.......and want some help.
by LazyTym
Sun Nov 09, 2014 10:33 pm
Forum: Volume 1 (100-199)
Topic: 195 - Anagram
Replies: 242
Views: 25428

Re: 195 - Anagram!!!! WA

please help me......what is the problem in my code???? Every time getting Wrong Ans!!!!!!! #include<iostream> #include<cstring> #include<map> using namespace std; map <char,int>M; void Swap (char* a, char* b) { char t = *a; *a = *b; *b = t; } void lexicographical_Permutations(char str[],int n) { for...
by LazyTym
Thu Oct 30, 2014 12:20 am
Forum: Volume 118 (11800-11899)
Topic: 11827 - Maximum GCD
Replies: 22
Views: 3729

Re: 11827 - Maximum GCD

Why getting WA?????????????i think it's an easy problem bt i can not find the bug...........pls help....... #include<iostream> #include<cstdio> using namespace std; int EUCILD(int a,int b) { if(b==0) return a; else EUCILD(b,a%b); } int main() { int A[101]; int t,a; cin>>t; while(t--) { int i=0,c; in...
by LazyTym
Wed Oct 29, 2014 5:25 pm
Forum: Volume 101 (10100-10199)
Topic: 10103 - Karpovich blocks
Replies: 21
Views: 8249

10103 - Karpovich blocks

Help me.....i can't understand what the problem says and the input and output........pls can anyone give me the explanation what the problem says and why the input and output looks like????????

thanks in advance
by LazyTym
Sat Oct 25, 2014 8:19 pm
Forum: Volume 2 (200-299)
Topic: 200 - Rare Order
Replies: 25
Views: 12624

200 - Rare Order

pls help me!!!!!!!! where is the problem to my code???? it's very annoying to me!!! why my code getting Runtime Error and what is the proper meaning of Runtime Error??? #include<iostream> #include<string> using namespace std; int Min(string x,string y) { if(x.length()>y.length()) return (y.length())...
by LazyTym
Sun Oct 19, 2014 6:56 am
Forum: Volume 104 (10400-10499)
Topic: 10449 - Traffic
Replies: 58
Views: 21273

Re: 10449 - Traffic

Help!!
i can not understand the problem statement.........Can anyone help me to understand this problem ?????????

thanks in advance
by LazyTym
Mon Oct 13, 2014 9:30 pm
Forum: Volume 105 (10500-10599)
Topic: 10557 - XYZZY
Replies: 31
Views: 14555

Re: 10557 - XYZZY

why getting Wrong Ans .pls help.......... #include<iostream> #define INF -9999999 #define MAX 10000 using namespace std; int num_edge; struct Edge { public: int start; int des; int weight; }; struct Graph { public: int v; Edge* edge; }; Graph* create_Graph(int v) { Graph* graph=new Graph(); graph->v...
by LazyTym
Mon Oct 13, 2014 5:53 pm
Forum: Volume 5 (500-599)
Topic: 558 - Wormholes
Replies: 30
Views: 14687

Re: 558 - Wormholes

getting WA...i can't find bug to my code and can someone tell me the keyword of the problem..........
my code:

Code: Select all

i got AC and find bug

Go to advanced search