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 <algorithm> | |
using namespace std; | |
char pic[51][51]; | |
int w, h; | |
void DFS_X(int, int); | |
void DFS_pixel (int i, int j, int &dots) | |
{ | |
if (pic[i][j] == 'X') { |
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 <cstdio> | |
using namespace std; | |
struct team_type{ | |
bool problem_AC[13] = {0}; | |
}team[101]; | |
struct problem_type{ |
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 <cstdio> | |
using namespace std; | |
void Fill(int w, int h, string &str, char grid[][51]) | |
{ | |
int i = 0, j = 0; | |
int move_i = 0, move_j = 1; | |
int L = -1, U = -1, R = w, D = h; |
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 <cstdio> | |
#include <vector> | |
#include <algorithm> | |
using namespace std; | |
string str; | |
int n; | |
void choose_ch (vector<char> &ans,int start) |
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 <algorithm> | |
using namespace std; | |
int main() | |
{ | |
ios::sync_with_stdio(false); | |
int n; | |
string str; | |
cin >> n; | |
while (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 <queue> | |
using namespace std; | |
char dungeon[32][32][32]; | |
int Distance[32][32][32]; | |
int L, R, C; | |
const int direction[6][3] = {{-1,0,0},{1,0,0},{0,-1,0},{0,1,0},{0,0,-1},{0,0,1}}; | |
struct point_type{ | |
int x; |
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; | |
char image[30][30]; | |
void DFS(int &n, int i, int j) | |
{ | |
image[i][j] = '0'; | |
if (i-1 >= 0 && image[i-1][j] == '1') DFS(n, i-1, j); | |
if (i+1 < n && image[i+1][j] == '1') DFS(n, i+1, 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> | |
using namespace std; | |
int main() | |
{ | |
int t,n; | |
int p[30]; | |
int diff[30]; | |
while (scanf("%d%d" ,&t,&n) != EOF){ | |
for (int i=0; i<n; i++) scanf("%d",&p[i]); | |
diff[0] = p[0]; |
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 <cmath> | |
using namespace std; | |
int main() | |
{ | |
const double pi = 2 * asin(1); | |
int Case,N, F; | |
int R[10001]; | |
scanf("%d",&Case); | |
while (Case--){ |
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 <vector> | |
#include <algorithm> | |
#include <string> | |
using namespace std; | |
bool cmp(string a, string b) | |
{ | |
return (a+b) > (b+a); | |
} | |
int main() |