제출 #742231

#제출 시각아이디문제언어결과실행 시간메모리
742231angels친구 (IOI14_friend)C++14
16 / 100
1 ms212 KiB
#include <bits/stdc++.h> using namespace std; int N,*C,*H,*P; int subtask2() { int zbir=0; for (int i=0; i<N; i++) zbir+=C[i]; return zbir; } int subtask3() { int maxx=-1; for (int i=0; i<N; i++) { if(C[i]>maxx) maxx=C[i]; } return maxx; } int findSample(int n, int confidence[], int host[], int protocol[]) { int i; N=n; C=confidence; H=host; P=protocol; for(i=2; i<N; i++) if(protocol[i-1]!=protocol[i]) break; if(i>=N) { if(protocol[1]==1) { return subtask2(); } if(protocol[1]==2) return subtask3(); } return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...