1 /*
2 Problem link
3 Type: Complete Search
4 Algorithm:
5 Just do as it says
6 */
Introduction
This is my blog of programming, I take notes and leave codes of computer science problems I solved here. Be my guest to comment :)
Showing posts with label Complete search. Show all posts
Showing posts with label Complete search. Show all posts
Wednesday, January 15, 2014
Uva 256 - Quirksome Squares
Saturday, June 22, 2013
Friday, June 21, 2013
Thursday, May 23, 2013
uva 410 - Station Balance
1 /*
2 Problem link
3 Type: Recursion - Greedy
4 Algorithm:
Monday, March 18, 2013
uva 216 - Getting in Line
1 /*
2 Problem link
3 Type: DP - TSP
4 Algorithm: Brute force, back-tracking
5 */
Wednesday, January 23, 2013
Saturday, November 3, 2012
uva 471 - Magic Numbers
I still dont know why this approach got AC. Try N = 5 and it's
definitely got TLE. I tried to approach this problem by recursive backtracking but it got TLE, although it is faster for some single test cases.
Problem link
#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
using namespace std;
const long long maxn = 9876543210;
uva 386 - Perfect Cubes
Problem link
#include <iostream>
#include <cstdio>
#include <cmath>
#include <cstring>
#include <cstdlib>
using namespace std;
const double eps = 1E-9;
//-----------------------------
class ans { public: int a; int b; int c; int d;};
//-----------------------------
ans kq[225];
Subscribe to:
Posts (Atom)