原创 POJ-1315
這樣的水題,打出這麼爛的代碼,我有種想死的衝動 #include <stdio.h> char board[4][5]; int n, max; int rookX[10][2], rookY[10][2]; void rookMax
原创 POJ-2259
#include <stdio.h> #include <string.h> #include <malloc.h> typedef struct node *node_pointer; struct node { int
原创 POJ-2159
#include<stdio.h> #include<stdlib.h> #include<string.h> int scmp(const void *a, const void *b) { return *(char*)a
原创 POJ-2243
#include <stdio.h> #include <string.h> int chessboard[8][8]; char s1[2], s2[2]; int queue[100], top, rear; int positio
原创 POJ-2262
#include<stdio.h> #include<math.h> int prime(long num) { long i; long temp = sqrt(num); for (i = 2; i <= te
原创 POJ-1056
IMMEDIATE DECODABILITY Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 8644 Accepted: 4103 Descripti
原创 POJ-1932
#include <stdio.h> #define MAX 110 #define QMAX 1000 int energys[MAX][MAX]; int cost[MAX][MAX]; int doors; // 計算有向圖的
原创 POJ-3094
#include<stdio.h> main() { char c; int i, sum; i = sum = 0; while ((c = getchar()) != '#') {
原创 POJ-2246
#include<stdio.h> int main() { int matrix[26][2] = {0}; int link[26][2] = {0}; int n, top = -1, sum = 0;
原创 POJ-2251
#include <stdio.h> #include <string.h> #define MAX 30000 char dungeon[30][30][30]; int visits[30][30][30]; int queue[
原创 POJ-3195
#include <stdio.h> int main() { int toys[1000], top = -1; int size, sum = 0; while (scanf("%d", &size
原创 POJ-3006
#include<stdio.h> #include<math.h> int prime(long num) { if (num == 1) return 0; int temp = sqrt(num); int
原创 POJ-2258
#include <stdio.h> #include <string.h> int node[25][25]; int rear[25], visit[25]; int edges[25][25]; int max; void dfs
原创 POJ-22551
#include<stdio.h> #include<string.h> int n; void find(char *src, char *str, char *c, char *left, char *right) { ch
原创 POJ-1011
Sticks Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 95944 Accepted: 21585 Description George t