사용자 랭킹

랭킹 사용자 한마디 푼 문제↓ 출제 답안 수 정답 비율
3823 hdseo 11 0 92 26 (28%)
3823 InHongHan 11 5 59 16 (27%)
3823 hdlee27 11 0 16 11 (68%)
3823 Kyungmin.lee 11 0 82 23 (28%)
3823 ptc113 11 0 33 13 (39%)
3823 kkk1234 11 0 39 21 (53%)
3823 이상국 11 0 27 14 (51%)
3823 wordfish 11 0 50 11 (22%)
3823 gnoom 11 0 16 11 (68%)
3823 lqez 11 1 33 11 (33%)
3823 mjg11880 11 0 45 18 (40%)
3823 abh0518 11 0 107 21 (19%)
3823 shjohw12 https://www.acmicpc.net/user/shjohw12 11 0 20 14 (70%)
3823 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%)
3823 xogud02 11 0 39 11 (28%)
3823 rhaos 11 0 48 17 (35%)
3823 blackin77 11 0 42 12 (28%)
3823 Choi-mina 11 0 16 13 (81%)
3823 arduinocc04 11 0 37 13 (35%)
3823 thleord89 11 0 71 17 (23%)