사용자 랭킹

랭킹 사용자 한마디 푼 문제↓ 출제 답안 수 정답 비율
3746 kth3321 11 0 21 11 (52%)
3746 uwangg 11 0 55 12 (21%)
3746 includex //CONCERT #include <stdio.h> #include <string.h> #include <vector> using namespace std; int getLastV(vector<int>& vlist, int _nVMax, int _nV, int _Vpos){ int nP = _nV + vlist[_Vpos]; int nM = _nV - vlist[_Vpos]; if(nP <= _nVMax){ if(vlist.size() > _Vpos + 1){ nP = getLastV(vlist, _nVMax, nP, _Vpos + 1); } }else{ nP = -1; } if(nM >= 0){ if(vlist.size() > _Vpos + 1){ nM = getLastV(vlist, _nVMax, nM, _Vpos + 1); } }else{ nM = -1; } if(nP > nM){ return nP; }else{ return nM; } return -1; } int main(){ char dumy[64]; int nCase = 0; scanf("%d", &nCase); gets(dumy); for(int i = 0; i < nCase; i++){ unsigned int nVCount = 0; unsigned int nVStart = 0; unsigned int nVMax = 0; scanf("%d %d %d", &nVCount, &nVStart, &nVMax); gets(dumy); vector<int> vlist; unsigned int nV = 0; for(int iV = 0; iV < nVCount; iV++){ scanf("%d", &nV); vlist.push_back(nV); } gets(dumy); printf("%d\n", getLastV(vlist, nVMax, nVStart, 0)); } return 0; } 11 0 41 12 (29%)
3746 kilo32 11 0 44 12 (27%)
3746 boooooom 11 0 30 11 (36%)
3746 dhchoi 11 0 49 26 (53%)
3746 hjazz 할룽 11 0 30 24 (80%)
3746 astralhpi 11 0 68 15 (22%)
3746 mobumcy 11 0 20 14 (70%)
3746 jincreator 11 0 34 11 (32%)
3746 tlawo0113 11 0 50 12 (24%)
3746 lhw0772 11 0 53 11 (20%)
3746 inknights 11 0 17 11 (64%)
3746 rachael 11 0 48 12 (25%)
3746 oppab 11 0 36 11 (30%)
3746 nedin12 11 0 68 18 (26%)
3746 wowrupi CAC(Chosun ACM-ICPC CLUB) 11 0 95 15 (15%)
3746 lhaeuk 11 0 46 11 (23%)
3746 namhyung 11 0 29 11 (37%)
3746 stchuck 11 0 41 11 (26%)