Skip to content

Instantly share code, notes, and snippets.

View vumbumy's full-sized avatar

HanBeom Seo vumbumy

View GitHub Profile
int maxMagtd = -1;
/*
* ■ □ □
* ■ □ □
* ■ □ □
*/
for (int i = 0; i < height; i++)
{
int now = rgbToY(image.GetPixel(0, i));
#include <iostream>
#include <algorithm>
#define MAX_ELEMENT 10
using namespace std;
typedef struct{
int key;
}element;
#pragma warning(disable:4996)
#include<iostream>
#include<string>
#include<cstdio>
#include<vector>
#include<queue>
#include<algorithm>
using namespace std;
vector<vector<int> > h;
using System.Collections;
using System;
using System.IO;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
#include<iostream>
#include<vector>
using namespace std;
int sum = 0;
void func(int n,bool one,int val){
if (n == 0){
sum+=val;
return;
// Set root directory path
String rootPath = "C:\\Users\\HanBum\\Documents\\Samples";
String filePath = rootPath + "\\images\\8.jpg";
// Open image file
CogImageFile imageFile = new CogImageFile();
imageFile.Open(filePath,CogImageFileModeConstants.Read);
// Convert image
CogImage8Grey image8Grey = CogImageConvert.GetIntensityImage(imageFile[0], 0, 0, imageFile[0].Width, imageFile[0].Height);
// Set root directory path
String rootPath = "C:\\Users\\HanBum\\Documents\\Samples";
String filePath = rootPath + "\\images\\4.png";
// Open image file
CogImageFile imageFile = new CogImageFile();
imageFile.Open(filePath,CogImageFileModeConstants.Read);
// Convert image
CogImage8Grey image8Grey = CogImageConvert.GetIntensityImage(imageFile[0], 0, 0, imageFile[0].Width, imageFile[0].Height);
#include <iostream>
 
using namespace std;
 
void swap(int* a, int* b)
{
    int* temp;
 
    temp = a;
    a = b;
#include <iostream>
 
using namespace std;
 
void swap(int* a, int* b)
{
    int* temp;
 
    temp = a;
    a = b;
#include<stdio.h>
#define SWAP(x,y,t) ((t)=(x),(x)=(y),(y)=(t))
void print_array(int a[], int n){
int i;
for (i = 0; i < n; i++)
printf("%d ", a[i]);
printf("\n");
}
void heapify(int A[], int k, int n)