How to do pls help

the question is:
Baechi and his friends enjoy playing Kart Rider games. The volleyball team and their friends decided to have a 4 to 4 race in the Kart Rider game.

Cart rider typically has two modes: item and speed. Bae Chi, who became the chief of the room, has to decide whether to make the room a speed game or an item game.

Each of the volleyball players and friends has a skill index, where the team with the best combination of skills wins the speed game, and the team with the highest skills wins the item match. In some cases, they will be tied if the two teams have the same combined skills, and in the case of an item match, the two teams will be tied if they have the same skills.

thirsty for victory, Bae Chi tries to make a room in a mode that can be won, depending on his friends’ skills. Let’s create a program that will tell you what mode the badge should use to build a room when you know the skills of all your friends, including yourself.

input format
An integer T is given on the first line to indicate the number of test cases.

Eighty-eight integers representing eight competencies for the next T-string are divided into spaces, the first four counts mean the skills of the person on the team to which the badge belongs, and the later four counts mean the skills of the opposing team. The integer representing ability is between 1 and 1000.

output format
For each test case, print S if you can’t win if you make a room with an item match on each line, or I if you have to make a room with a speed match, or I if you can win only by making a room with an item match, or I if you can’t win all of the rooms or R if you can’t win all of them. Here, the inability to win also includes a tie. In all three cases, print in uppercase letters.
Input Example
10 5 3 9 18 3 2 2
11 3 1 1 8 7 8 7
5 3 2 4 6 8 9 4
Output Example
and I set my code like this:
#include <stdio.h>
#include <limits.h>

int main() {
int max=INT_MIN;
int num1, num2,num3,num4,num5,num6,num7,num8;
printf(“say: “);
scanf(”%d %d %d %d %d %d %d %d”,&num1,&num2,&num3,&num4,&num5,&num6,&num7,&num8);

else if(num1==max||num2==max||num3==max||num4==max)

return 0;
if and else are working but else if isn’t working

Could you please format as code the source code and I/O examples (both blocks and inline) to make your post more readable (and to prevent code snippets being parsed as markdown syntax)?