#include <stdio.h> typedef struct Tree{ int begin; int end; }Node; int main(void){ int N; scanf("%d",&N); while(N>0){ int n; scanf("%d",&n); bool turn=true; Node node[n]; for(int i=0;i<n-1;i++){ scanf("%d %d",&node[i].begin,&node[i].end); } for(int i=n-2;i>=0;i--){ turn=turn^true; } if(turn==false) printf("Alice\n"); else printf("Bob\n"); } } /* Main.c: In function 'main': Main.c:12:3: error: unknown type name 'bool'; did you mean '_Bool'? bool turn=true; ^~~~ _Bool Main.c:12:13: error: 'true' undeclared (first use in this function); did you mean 'Tree'? bool turn=true; ^~~~ Tree Main.c:12:13: note: each undeclared identifier is reported only once for each function it appears in Main.c:20:12: error: 'false' undeclared (first use in this function); did you mean 'fclose'? if(turn==false) ^~~~~ fclose */ |
Double click to view unformatted code.