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

200523

게시판: 소스 코드 제출

//#include<stdio.h>

//

//struct jh

//{

// char name[11];

// int sc1;

// int sc2;

// int sc3;

//};

//

//int main()

//

//{

// struct jh tg[100] = {};

// int a, i, j = 0, k, b = 0, c = 0;

//

// scanf("%d", &a);

//

// for(i=0; i<a; i++)

// {

// scanf("%s", tg[i].name);

//

// scanf("%d", &tg[i].sc1);

//

// scanf("%d", &tg[i].sc2);

//

// scanf("%d", &tg[i].sc3);

// }

//

// for(i=0; i<a; i++)

// {

// if(j<tg[i].sc1)

// {

// j = tg[i].sc1;

// k=i;

// }

// }

//

// for(i=0; i<a; i++)

// {

// if(tg[k].sc2<tg[i].sc2)

// {

// b++ ;

// }

//

// if(tg[k].sc3<tg[i].sc3)

// {

// c++ ;

// }

// }

//printf("%s %d %d", tg[k].name, b+1, c+1);

//

//return 0;

//}


//#include <stdio.h>

//

//struct ao

//{

// int cr;

// int nb;

// int score;

//};

//

//

//int main()

//{

// struct ao jb[100];

// int i, j, k, a, b, c;

//

// scanf("%d", &a);

//

// for(i=0; i<a; i++)

// {

// scanf("%d %d %d", &jb[i].cr, &jb[i].nb, &jb[i].score);

// }

//

//

// for()

//

//

//

//}

//

//




#include<stdio.h>



struct ap


{


int cn;

int st;

int score;


};



int main()


{


int i, d, n, a, k;


int max,mi;


struct ap s[1000] = {};



scanf("%d", &n);


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


{

scanf("%d %d %d", &s[i].cn, &s[i].st, &s[i].score);


}


for(i=1; i<=3; i++)

{

max = 0;

for(d=1; d<=n; d++)

{

if(s[d].score > max)

{

max = s[d].score;


mi = d;

}

}

printf("%d %d\n", s[mi].cn, s[mi].st);

s[mi].score = 0;

}

return 0;

}



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