Bill is trying to plan a meal to meet specific nutritional goals. He wants to prepare a meal containing rice, tofu, and peanuts that will provide 283 grams of carbohydrates, 391 grams of fat, and 197 grams of protein. He knows that each cup of rice provides 50 grams of carbohydrates, 0 grams of fat, and 1 grams of protein. Each cup of tofu provides 4 grams of carbohydrates, 13 grams of fat, and 20 grams of protein. Finally, each cup of peanuts provides 35 grams of carbohydrates, 73 grams of fat, and 31 grams of protein. How many cups of rice, tofu, and peanuts should he eat?