KakaoTalk_20190606_001802318.png
  • 246x0w
Welcome
Curriculum
Install&Go
Board
실제 작동 상태를 확인하려면 라이브 사이트로 이동하세요.
  • 카테고리
  • 전체 게시물
  • 내 게시물
minjukim3p
2020년 7월 16일

200716

게시판: 소스 코드 제출

/*

#include <stdio.h>

int main()

{

int a[10000],i,j,n,temp;

scanf("%d",&n);

for(i=1;i<=n;i++){

scanf("%d",&a[i]);

}

for(i=1;i<n;i++){

for(j=1;j<n;j++){

if(a[j]>a[j+1]){

temp=a[j];

a[j]=a[j+1];

a[j+1]=temp;

}

}

}

for(i=1;i<=n;i++){

printf("%d ",a[i]);

}


}

*/

/*

#include <stdio.h>

int main()

{

int i,t,n;

int a[24]={};

scanf("%d",&n);

for(i=1;i<=n;i++){

scanf("%d",&t);

a[t]++;

}

for(i=1;i<=23;i++){

printf("%d ",a[i]);

}

}

*/

/*

#include <stdio.h>

int main()

{

int i,j,t,n,cnt;

int a[100001]={};

scanf("%d",&n);

for(i=1;i<=n;i++){

scanf("%d",&t);

a[t]=a[t]+1;

}

for(i=0;i<=100000;i++){


for(j = 1 ; j <= a[i] ; j++)

{

printf("%d ",i);

}

}


return 0;

}

*/

/*

#include <stdio.h>


void swap(int a[],int id1,int id2)

{

int temp=a[id1];

a[id1]=a[id2];

a[id2]=temp;

}

int partition(int a[],int left,int right)

{

int pivot=a[left];

int low=left+1;

int high=right;


while(low<=high){

while(pivot>=a[low]&&low<=right){

low++;

}

while(pivot<=a[high]&&high>=left+1){

high--;

}

if(low<=high){

swap(a,low,high);

}

}

swap(a,left,high);

return high;

}

void quicksort(int a[],int left,int right)

{

if(left<=right){


int pivot=partition(a,left,right);

quicksort(a,left,pivot-1);

quicksort(a,pivot+1,right);

}

}

int main(void)

{

int a[100000],i,n;

scanf("%d",&n);

for(i=0;i<n;i++){

scanf("%d",&a[i]);

}

quicksort(a,0,n-1);


for(i=0;i<n;i++){

printf("%d\n",a[i]);

}

}

*/



댓글 0개
0
댓글
댓글 0개
유사 게시물
  • 200716
  • 200716
  • 200716
주소 : 경기도 용인시 광교중앙로 302 블루 스퀘어 602호
연락처 : 031) 216 - 1546
사업자등록번호 : 465-92-00916
​학원 등록 제 4603호