This file contains 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
import os | |
from shutil import copyfile | |
import cv2 | |
def selfie(): | |
base_dir = 'selfie' | |
train_dir = 'trainA' | |
if not os.path.exists(train_dir): | |
os.makedirs(train_dir) |
This file contains 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 <algorithm> | |
#include <string> | |
#include <queue> | |
using namespace std; | |
struct node | |
{ | |
int x; |
This file contains 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<cstring> | |
using namespace std; | |
int m,n; | |
int dir[8][2] = {{-1,0},{-1,1},{0,1},{1,1}, | |
{ 1,0},{1,-1},{0,-1},{-1,-1}}; | |
bool vis[105][105]; | |
char map[105][105]; | |
struct Node{ int x,y; }; |
This file contains 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; | |
int median(int arr[], int n) | |
{ | |
if (n%2 == 0) | |
return (arr[n/2] + arr[n/2-1])/2; | |
else | |
return arr[n/2]; |
This file contains 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 <fstream> | |
#include <numeric> | |
using namespace std; | |
int t[10]; | |
int b[10]; | |
int s[10]; | |
int path[1000]; | |
int pnum; |
This file contains 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 <stdio.h> | |
#include <string.h> | |
int main() | |
{ | |
freopen("input.txt", "r", stdin); | |
char a[5000]; | |
char b[5000]; | |
while (~scanf("%s%s", a, b)) | |
{ | |
int m1 = 0, m2 = 0; |