number of testcase not given

 

problem

The number of testcases are not given. BOJ 10951

solution

  1. Detect EOF and break when found.
    while(!cin.eof()){
     ...
    }
    
  2. Use cin as conditional.
    while(cin >> ...){
     ...
    }