Search found 30 matches

by kier.guevara
Mon Feb 11, 2013 2:32 am
Forum: Volume 102 (10200-10299)
Topic: 10282 - Babelfish
Replies: 48
Views: 19261

Re: 10282 - Babelfish

Thanks brianfy for the tip! got AC!
by kier.guevara
Sun Feb 10, 2013 9:23 pm
Forum: Volume 102 (10200-10299)
Topic: 10282 - Babelfish
Replies: 48
Views: 19261

Re: 10282 - Babelfish

Code: Select all

ACCEPTED
Why did I get a TLE? I used the sort function and do a binary search. Is the sort and binary search not efficient enough for this problem?
by kier.guevara
Mon Jan 28, 2013 6:36 am
Forum: Volume 100 (10000-10099)
Topic: 10066 - The Twin Towers
Replies: 35
Views: 12935

Re: 10066 - The Twin Towers

#include <iostream> #include <vector> #include <algorithm> using namespace std; int main() { int n, m; vector <int> twin_1; vector <int> twin_2; vector <int> numTiles; int input, testC = 1; while(cin >> n >> m ) { if(m == 0 && n ==0) break; for(int i = 0; i < n; i++) { cin >> input; twin_1.push_bac...
by kier.guevara
Fri Jan 25, 2013 3:28 pm
Forum: Volume 106 (10600-10699)
Topic: 10699 - Count the factors
Replies: 27
Views: 11243

Re: 10699 - Count the Factors

Code: Select all

 got AC
Just forgot to include the number itself to check as a prime
by kier.guevara
Mon Jan 21, 2013 3:13 pm
Forum: Volume 102 (10200-10299)
Topic: 10252 - Common Permutation
Replies: 150
Views: 50658

Re: 10252 - Common Permutation

Thanks Shadek for the input and output! I now know what's wrong with my code!
by kier.guevara
Mon Jan 21, 2013 11:05 am
Forum: Volume 102 (10200-10299)
Topic: 10252 - Common Permutation
Replies: 150
Views: 50658

Re: 10252 - Common Permutation

Code: Select all

Code Removed After AC!
by kier.guevara
Sun Jan 20, 2013 7:17 pm
Forum: Volume 102 (10200-10299)
Topic: 10252 - Common Permutation
Replies: 150
Views: 50658

Re: 10252 - Common Permutation

Code Removed After AC!
by kier.guevara
Tue Jan 08, 2013 10:15 am
Forum: Volume 5 (500-599)
Topic: 543 - Goldbach's Conjecture
Replies: 109
Views: 23535

Re: 543-goldbach's conjecture..WHY AM I GETTING TLE??

#include <iostream> #include <vector> #include <cmath> using namespace std; void primeNumbers(vector <int> &prime, int n) { short array[1000000] = {0}; for(int i = 2; i <= sqrt(n); i++) { if(array[i] == 0) { for(int k = i+1; k < n; k++) { if(k % i == 0) array[k] = 1; } } } for(int i = 3; i < n; i++...
by kier.guevara
Wed Sep 26, 2012 10:10 am
Forum: Volume 4 (400-499)
Topic: 401 - Palindromes
Replies: 196
Views: 30535

Re: 401- Palindromes

I tried all the test cases here but I still got WA.. What's wrong with it? #include <iostream> using namespace std; bool mirrored(string palindrome) { int counter = 0; char mirr[20][2] = {{'A','A'},{'E','3'},{'H','H'},{'I','I'} ,{'J','L'},{'L','J'},{'M','M'} ,{'O','O'},{'T','T'},{'U','U'} ,{'V','V'}...
by kier.guevara
Wed Sep 05, 2012 9:44 am
Forum: Volume 101 (10100-10199)
Topic: 10196 - Check The Check
Replies: 77
Views: 23240

Re: 10196 - Check The Check

Thanks brianfry! my code got accepted!
by kier.guevara
Tue Sep 04, 2012 3:49 pm
Forum: Volume 101 (10100-10199)
Topic: 10196 - Check The Check
Replies: 77
Views: 23240

Re: 10196 - Check The Check

Tried another solution but still wrong.
What is wrong with this?

Code: Select all

//code accepted
by kier.guevara
Tue Sep 04, 2012 3:56 am
Forum: Volume 101 (10100-10199)
Topic: 10196 - Check The Check
Replies: 77
Views: 23240

Re: 10196 - Check The Check

I tested all the cases but I still got wrong answer..
Here is my code:

Code: Select all

//code accepted
}

can you guys help me find my mistake?
by kier.guevara
Sat Jul 21, 2012 8:12 am
Forum: Volume 6 (600-699)
Topic: 696 - How Many Knights
Replies: 29
Views: 12633

Re: 696 - How Many Knights

Thank you so much! i got AC now! :D
by kier.guevara
Fri Jul 20, 2012 9:36 am
Forum: Volume 6 (600-699)
Topic: 696 - How Many Knights
Replies: 29
Views: 12633

Re: 696 - How Many Knights

I fixed it and my output for 2 100 is 100 knights.
here is my code:

Code: Select all

deleted
It is still WA.
by kier.guevara
Thu Jul 19, 2012 11:30 pm
Forum: Volume 6 (600-699)
Topic: 696 - How Many Knights
Replies: 29
Views: 12633

Re: 696 - How Many Knights

I've tried every test cases. I don't know what is wrong with my code..

Code: Select all

deleted
Can you guys help me on this?

Go to advanced search