#include "jeehak.h"
void jeehak (int A[]) {
int i, s=0; for(i=1; i<=5; i++) s^=A[i];
if(s%5 > 0) send(s%5, 0);
if(s/5 > 0) send(s/5, 1);
}
#include "friends.h"
void friends(int A[],int N,int X[],int Y[]) {
int s = 0, x = 0;
for(int i = 1; i <= N; i++) if(Y[i] == 0) s += X[i]; else s += X[i] * 5;
for(int i = 1; i <= 5; i++) if(A[i] > 0) x ^= A[i];
guess(s ^ x);
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
392 ms |
43280 KB |
Output is correct - 최대 카드수 : 2 |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
400 ms |
43280 KB |
Output is correct - 최대 카드수 : 2 |