/in/Main.java:1: error: illegal character: '#'
#include <stdio.h>
^
/in/Main.java:1: error: class, interface, enum, or record expected
#include <stdio.h>
^
/in/Main.java:2: error: illegal character: '#'
#include <stdlib.h>
^
/in/Main.java:3: error: illegal character: '#'
#include <string.h>
^
/in/Main.java:5: error: illegal character: '#'
#define MAX_SIZE 500007
^
/in/Main.java:6: error: illegal character: '#'
#define INF 100000
^
/in/Main.java:10: error: class, interface, enum, or record expected
long long key;
^
/in/Main.java:11: error: class, interface, enum, or record expected
} nodeH;
^
/in/Main.java:13: error: class, interface, enum, or record expected
typedef struct _nodeQ{
^
/in/Main.java:15: error: class, interface, enum, or record expected
long long status;
^
/in/Main.java:16: error: class, interface, enum, or record expected
int step;
^
/in/Main.java:17: error: class, interface, enum, or record expected
} nodeQ;
^
/in/Main.java:19: error: class, interface, enum, or record expected
nodeH *hash[MAX_SIZE];
^
/in/Main.java:20: error: class, interface, enum, or record expected
nodeQ *head, *tail;
^
/in/Main.java:21: error: class, interface, enum, or record expected
int cards[14];
^
/in/Main.java:23: error: class, interface, enum, or record expected
void addToHash(long long key);
^
/in/Main.java:24: error: class, interface, enum, or record expected
int isInHash(long long key);
^
/in/Main.java:25: error: class, interface, enum, or record expected
void addToQueue(long long status, int step);
^
/in/Main.java:26: error: class, interface, enum, or record expected
long long changeStatus(long long status, int cardType, int numCard);
^
/in/Main.java:27: error: class, interface, enum, or record expected
void DFS(long long status, int step, int index, int numLeft);
^
/in/Main.java:28: error: class, interface, enum, or record expected
int BFS(long long initStatus);
^
/in/Main.java:30: error: class, interface, enum, or record expected
int main(){
^
/in/Main.java:32: error: class, interface, enum, or record expected
int i;
^
/in/Main.java:33: error: class, interface, enum, or record expected
long long status;
^
/in/Main.java:35: error: class, interface, enum, or record expected
memset(cards, 0, sizeof(cards));
^
/in/Main.java:36: error: class, interface, enum, or record expected
memset(hash, 0, sizeof(hash));
^
/in/Main.java:37: error: class, interface, enum, or record expected
status = 0;
^
/in/Main.java:38: error: class, interface, enum, or record expected
scanf("%s", line);
^
/in/Main.java:39: error: class, interface, enum, or record expected
for(i=0; line[i]!='\0'; i++){
^
/in/Main.java:39: error: class, interface, enum, or record expected
for(i=0; line[i]!='\0'; i++){
^
/in/Main.java:39: error: class, interface, enum, or record expected
for(i=0; line[i]!='\0'; i++){
^
/in/Main.java:42: error: class, interface, enum, or record expected
i++;
^
/in/Main.java:43: error: class, interface, enum, or record expected
}else if(line[i] == 'A'){
^
/in/Main.java:45: error: class, interface, enum, or record expected
}else if(line[i] == 'D' || line[i] == 'X'){
^
/in/Main.java:47: error: class, interface, enum, or record expected
}else if(line[i] == 'J'){
^
/in/Main.java:49: error: class, interface, enum, or record expected
}else if(line[i] == 'K'){
^
/in/Main.java:51: error: class, interface, enum, or record expected
}else if(line[i] == 'Q'){
^
/in/Main.java:53: error: class, interface, enum, or record expected
}else{
^
/in/Main.java:55: error: class, interface, enum, or record expected
}
^
/in/Main.java:57: error: class, interface, enum, or record expected
for(i=0; i<=13; i++)
^
/in/Main.java:57: error: class, interface, enum, or record expected
for(i=0; i<=13; i++)
^
/in/Main.java:59: error: class, interface, enum, or record expected
printf("%d\n", BFS(status));
^
/in/Main.java:61: error: class, interface, enum, or record expected
return 0;
^
/in/Main.java:62: error: class, interface, enum, or record expected
}
^
/in/Main.java:66: error: class, interface, enum, or record expected
p = (nodeH)malloc(sizeof(nodeH));
^
/in/Main.java:67: error: class, interface, enum, or record expected
p->key = key;
^
/in/Main.java:68: error: class, interface, enum, or record expected
p->next = hash[key % MAX_SIZE];
^
/in/Main.java:69: error: class, interface, enum, or record expected
hash[key % MAX_SIZE] = p;
^
/in/Main.java:70: error: class, interface, enum, or record expected
}
^
/in/Main.java:73: error: class, interface, enum, or record expected
while(p != NULL){
^
/in/Main.java:76: error: class, interface, enum, or record expected
p = p->next;
^
/in/Main.java:77: error: class, interface, enum, or record expected
}
^
/in/Main.java:79: error: class, interface, enum, or record expected
}
^
/in/Main.java:83: error: class, interface, enum, or record expected
tail->status = status;
^
/in/Main.java:84: error: class, interface, enum, or record expected
tail->step = step;
^
/in/Main.java:85: error: class, interface, enum, or record expected
tail->next = (nodeQ)malloc(sizeof(nodeQ));
^
/in/Main.java:86: error: class, interface, enum, or record expected
tail = tail->next;
^
/in/Main.java:87: error: class, interface, enum, or record expected
tail->next = NULL;
^
/in/Main.java:88: error: class, interface, enum, or record expected
}
^
/in/Main.java:92: error: class, interface, enum, or record expected
return (status & tmp) | ((long long)numCard << (3*(13-cardType)));
^
/in/Main.java:93: error: class, interface, enum, or record expected
}
^
/in/Main.java:96: error: class, interface, enum, or record expected
if(numLeft == 0){
^
/in/Main.java:98: error: class, interface, enum, or record expected
return;
^
/in/Main.java:99: error: class, interface, enum, or record expected
}
^
/in/Main.java:100: error: class, interface, enum, or record expected
for(i=index; i<=14-numLeft; i++){
^
/in/Main.java:100: error: class, interface, enum, or record expected
for(i=index; i<=14-numLeft; i++){
^
/in/Main.java:103: error: class, interface, enum, or record expected
DFS(changeStatus(status, i, cards[i]), step, i, numLeft-1);
^
/in/Main.java:104: error: class, interface, enum, or record expected
cards[i]++;
^
/in/Main.java:105: error: class, interface, enum, or record expected
}
^
/in/Main.java:110: error: class, interface, enum, or record expected
long long status, newStatus;
^
/in/Main.java:111: error: class, interface, enum, or record expected
int step, i, j, k;
^
/in/Main.java:113: error: class, interface, enum, or record expected
tail = (nodeQ*)malloc(sizeof(nodeQ));
^
/in/Main.java:114: error: class, interface, enum, or record expected
head = tail;
^
/in/Main.java:116: error: class, interface, enum, or record expected
addToQueue(initStatus, 0);
^
/in/Main.java:117: error: class, interface, enum, or record expected
while(head != tail){
^
/in/Main.java:119: error: class, interface, enum, or record expected
step = head->step;
^
/in/Main.java:120: error: class, interface, enum, or record expected
if(status == 0)
^
/in/Main.java:123: error: class, interface, enum, or record expected
for(i=0; i<=13; i++) //get num of each card
^
/in/Main.java:123: error: class, interface, enum, or record expected
for(i=0; i<=13; i++) //get num of each card
^
/in/Main.java:123: error: class, interface, enum, or record expected
for(i=0; i<=13; i++) //get num of each card
^
/in/Main.java:126: error: class, interface, enum, or record expected
for(i=0; i<=13; i++){
^
/in/Main.java:126: error: class, interface, enum, or record expected
for(i=0; i<=13; i++){
^
/in/Main.java:126: error: class, interface, enum, or record expected
for(i=0; i<=13; i++){
^
/in/Main.java:128: error: class, interface, enum, or record expected
for(j=1; j<=cards[i]; j++)
^
/in/Main.java:128: error: class, interface, enum, or record expected
for(j=1; j<=cards[i]; j++)
^
/in/Main.java:130: error: class, interface, enum, or record expected
}
^
/in/Main.java:131: error: class, interface, enum, or record expected
for(i=1; i<=13; i++){
^
/in/Main.java:131: error: