This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <string> | |
#include <map> | |
using namespace std; | |
int main() | |
{ | |
ios::sync_with_stdio(false); | |
int N; | |
string str; | |
while (cin >> N) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <cstdio> | |
#include <map> | |
using namespace std; | |
int main() | |
{ | |
map<int,int> Map; | |
int instruction, priority, number; | |
while (scanf("%d", &instruction)) { | |
switch (instruction) { | |
case 1: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <cstdio> | |
#include <vector> | |
using namespace std; | |
struct point_type{ | |
int nxt; | |
int len; | |
}; | |
vector<point_type> toPoint[10005]; | |
int ans; | |
int DFS(int point, int prev_point) // DFS回傳該點能走的最深路徑的距離 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <cstdio> | |
#include <vector> | |
#include <queue> | |
using namespace std; | |
int R, C; | |
int Maze[1001][1001]; // -2:'F', 0:'.', -1:'#' | |
struct point_type{ | |
int x; | |
int y; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <cstdio> | |
#include <queue> | |
#include <algorithm> | |
using namespace std; | |
int X, Y; | |
char grid[55][55]; | |
struct hole_type { | |
char ch; | |
int num; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <cstdio> | |
using namespace std; | |
int n; | |
int fighter, enemy, fighting_group; | |
char grid[51][51]; | |
const int direction[4][2] = {{-1,0},{1,0},{0,-1},{0,1}}; | |
bool DFS_2(char, int ,int); | |
void DFS_1(int i, int j, int &fighter, int &enemy) // DFS_1用來走遍'*',如果遇到'B'或'P'則進入DFS_2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <cstdio> | |
#include <cstring> | |
#include <queue> | |
using namespace std; | |
int W, H; | |
int Maze[300][300]; | |
struct point_type{ | |
int i; | |
int j; | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <cstdio> | |
#include <iostream> | |
#include <string> | |
#include <algorithm> | |
using namespace std; | |
struct dictionary{ | |
string Word; | |
int Hash; | |
}dic[102]; | |
bool cmp (dictionary a, dictionary b) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <cstdio> | |
#include <iostream> | |
#include <queue> | |
#include <vector> | |
#include <map> | |
using namespace std; | |
map<string, int> Map; | |
vector<string> toPoint[10001]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <cstdio> | |
#include <queue> | |
#include <vector> | |
using namespace std; | |
int N,I; | |
vector<int> toPoint[205]; | |
bool BFS(int Start) | |
{ |