-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbidding.c
76 lines (57 loc) · 1.39 KB
/
bidding.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
#include <stdio.h>
int main(void) {
int t;
int a[1000];
int b[1000];
int c[1000];
printf("");
scanf("%d", &t);
for (int i = 0; i < t; i++)
{
printf("");
scanf("%d %d %d", &a[i], &b[i], &c[i]);
}
for (int i = 0; i < t; i++)
{
if (a > b && a > c) {
printf(" Alice ");
}
else if (b > a && b > c) {
printf(" Bob ");
}
else if (c > a && c > b) {
printf(" Charlie ");
}
else if (a == b && a > c) {
printf(" Alice ");
}
else if (a == b && b > c) {
printf(" Bob ");
}
else if (a == b && c > a) {
printf(" Charlie ");
}
else if (a == c && a > b) {
printf(" Alice ");
}
else if (a == c && b > a) {
printf(" Bob ");
}
else if (a == c && c > b) {
printf(" Charlie ");
}
else if (b == c && b > a) {
printf(" Bob ");
}
else if (b == c && a > b) {
printf(" Alice ");
}
else if (b == c && c > a) {
printf(" Charlie ");
}
else {
printf(" Tie ");
}
}
return 0;
}