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
| int maxMagtd = -1; | |
| /* | |
| * ■ □ □ | |
| * ■ □ □ | |
| * ■ □ □ | |
| */ | |
| for (int i = 0; i < height; i++) | |
| { | |
| int now = rgbToY(image.GetPixel(0, i)); |
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> | |
| #define MAX_ELEMENT 10 | |
| using namespace std; | |
| typedef struct{ | |
| int key; | |
| }element; |
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
| #pragma warning(disable:4996) | |
| #include<iostream> | |
| #include<string> | |
| #include<cstdio> | |
| #include<vector> | |
| #include<queue> | |
| #include<algorithm> | |
| using namespace std; | |
| vector<vector<int> > 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
| 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; |
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> | |
| using namespace std; | |
| int sum = 0; | |
| void func(int n,bool one,int val){ | |
| if (n == 0){ | |
| sum+=val; | |
| return; |
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
| // 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); |
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
| // 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); |
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> | |
| using namespace std; | |
| void swap(int* a, int* b) | |
| { | |
| int* temp; | |
| temp = a; | |
| a = 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 <iostream> | |
| using namespace std; | |
| void swap(int* a, int* b) | |
| { | |
| int* temp; | |
| temp = a; | |
| a = 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<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) |