Many developing countries are having a large population that does not have access to computers/laptops. In such cases, what are the innovative ideas to teach and select students who like to study computer science and programming further?
I am not experienced in this area so these may be naive ideas so take this with a grain of salt:
Study the limits of computers: "What can computers do? what can't they do?" We need citizens to understand the difference between what Hollywood movies say computers can do and what they actually can do (myths vs. reality).
Teach algorithmic thinking: When I was little I helped my mother with the laundry. I learned to match socks using various algorithms: linear search, grouping by size then searching within groups, etc. I feel this experience helped me greatly when I was old enough to have access to a computer and needed to be able to describe tasks algorithmically.
Teach that computers are literal: "do what I say, not what I want". An exercise like "the exact instructions challenge" can help younger students : https://www.youtube.com/watch?v=Ct-lOOUqmyY
Share the computers they do have: When I learned to code my school could only afford 1 computer for every 3 students in the class. The teacher created instructions based around this. We had to take turns, time how long we were using the computer, etc.
Do it on the phone: Maybe there are programming assignments that can be done on their phones? They might not have laptops but they might have Android or iPhones.
I have two suggestions. The first is open to everyone, but the second depends on some local conditions and doesn't scale.
First learn about Computational Thinking and especially CS Unplugged. Quite a lot of educators have been thinking about this for a while, though mostly about teaching young students some principles with the expectation that they might be involved with programming at a later time.
Second, though it requires a lot of work. I was once involved in social service projects (student days) in poor areas in Mexico. The group I was involved with had some success in exploiting local resources on behalf of poor people in the local area. Quite frankly we put a guilt trip on some of the rich folks around about doing more to advance conditions in their own community. We didn't do it quite like that sounds, but by giving example as well as talking to people with resources about the work we were doing they just, sort of naturally, decided to help. Our own "sacrifice" of working with the poor helped those who could help see that they, too, could do something.
Perhaps someone local would donate some equipment when they upgrade. Perhaps local business would be willing to assist your students.
Note, however, that this doesn't always work. One project I was part of was much less successful than another in this, but it was mostly due to local demographic features. Some places just don't have any resources beyond sweat.
Along with local wealthy individuals, we also explored what governmental resources were available and taught the local poorer people how to effectively exploit them. Quite a lot was available if you only knew how to find it. So, we acted as a resource for finding resources.
On Dec. 8, 2021, the New York Times published an article on how some people in the tech industry are starting to address this: https://www.nytimes.com/2021/12/08/us/politics/safety-net-apps-tech.html (may be paywalled)
Here is a possible solution. The school can put up a Linux server, which supports a multiuser environment. In fact, it's the best environment in which to learn to program. Ubuntu Server is free software. A wireless network in a lab equipped with Chromebooks could be set. up for a relatively small expense. A package manager can be used to obtain all of the compilers you need.
Then students could shell in with an inexpensive Chromebook. The server would hold their work and accounts are protected via login authentication. While it's not ideal, it cuts the cost a lot.