- 博客(20)
- 资源 (1)
- 收藏
- 关注
原创 线性DP WA
C题:#include #include #include using namespace std;const int MaxN = 1005;int dp[MaxN][MaxN];int mymax (int a, int b){ return ((a > b) ? a : b);}int main(){ char a[MaxN], b[MaxN];
2014-07-19 13:15:18 486
原创 贪心
M题:#include #include #include using namespace std;const int MaxN = 15;int a[MaxN];inline bool cmp(int a, int b){ return (a > b);}int main(){ int n; while (~scanf("%d", &n) &&
2014-07-18 16:47:18 397
原创 二分
A题:#include #include #include #define N 4013using namespace std;long long sum[N*N];int binsearch (long long a[], int n, int key);int main(){ int n; long long ans = 0; cin>> n;
2014-07-17 11:50:30 467
原创 深搜 WA
G题:#include #include #include #include #define N 10using namespace std;const int dx[8] = {-2, -2, -1, -1, 1, 1, 2, 2};const int dy[8] = {-1, 1, -2, 2, -2, 2, -1, 1};int vis[N][N], fa[N*N];
2014-07-16 15:32:55 447
原创 广搜搜索 WA
A题:#include #include using namespace std;#define INF 100005int main(){ int n = 0, k = 0; cin >> n >> k; queue q; q.push (n); int dist[100005] = {INF}; for (int i=0; i<IN
2014-07-14 17:06:50 649
原创 UVA 10780 Again Prime? No time
Again Prime? No time.Input: standard inputOutput: standard outputTime Limit: 1 secondThe problem statement is very easy. Given a number n you have to determine the largest power of m, not ne
2014-07-13 22:15:15 470
原创 UVA 10474 Where is the Marble?
Raju and Meena love to play with Marbles. They have got a lot of marbles with numbers written on them. At the beginning, Raju would place the marbles one after another in ascending order of the number
2014-07-13 22:06:34 441
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人