Hey so I just finished a leetcode type question (https://dmoj.ca/problem/lkp18c2p1 if you want to take a look). The question regarded taking 2 lines of input from user, ex:
3 4
3 2 5
In my answer, since I ever only really used the getline function to put input strings into variables, then stoi(variable) to make it an integer, I was just wondering if there was a different way of doing this (with less code). In the book that i am going through, the author writes his answer in C, and uses the scanf function, but ever since starting c++ ive never seen that
After many years of continuous warfare, the country of Collea was left in shambles. This has caused food shortages and famines all across the country. In an attempt to distribute the little food that was produced and prevent food hoarding, the Collean government limited the amount of food that any one person can buy. Soon, Collean citizens are f...