답안 #16800

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
16800 2015-09-30T05:24:23 Z gs14004 카드 (tutorial6) C++14
컴파일 오류
0 ms 0 KB
void jeehak(int A[]){
	int ret = 0;
	for(int i=0; i<5; i++) ret ^= A[i];
	send(ret / 2 + 1, ret % 2);
}
void friends(int A[], int N, int X[], int Y[]){
	int ret = 0;
	for(int i=0; i<5; i++) if(A[i] != -1) ret ^= A[i];
	int tmp = (X[0] - 1) * 2 + Y[0];
	guess(ret ^ tmp);
}

Compilation message

jeehak.cpp: In function ‘void jeehak(int*)’:
jeehak.cpp:4:27: error: ‘send’ was not declared in this scope
  send(ret / 2 + 1, ret % 2);
                           ^

friends.cpp: In function ‘void friends(int*, int, int*, int*)’:
friends.cpp:6:17: error: ‘guess’ was not declared in this scope
  guess(ret ^ tmp);
                 ^
grader_friends.c: In function ‘int main()’:
grader_friends.c:46:15: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
 scanf("%d",&t);
               ^
grader_friends.c:52:26: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
 scanf("%d",&__listn__[i]);
                          ^
grader_friends.c:53:68: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
 for(j=1;j<=__listn__[i];j++)scanf("%d%d",&__X__[i][j],&__Y__[i][j]);
                                                                    ^
grader_friends.c: At global scope:
grader_friends.c:18:12: warning: ‘__now__’ defined but not used [-Wunused-variable]
 static int __now__;
            ^