Hi all,

During Round 1A I wasn't able to get the interactive judge to interact, so I'm 
hoping some kind person can tell me why before the next round. I don't recall 
having an issue with the Number Guessing practice problem, but didn't attempt 
the interactive problem from the qualifier round because I had a very busy time 
that week. 

I imagine this is one of those cases where I've done something obviously silly. 
I am using Java and reading through standard input using a Scanner. I can get 
code to complete if it doesn't try to read input after printing a list of 18 
numbers (but obviously this gets a wrong answer); this suggests to me that I am 
reading the initial parameters T, N, and M successfully.

Below is some minimal code to try to get some interaction, which receives TLE. 
Alternatively, does anyone have some Java code for the interaction that I could 
look at? Much thanks in advance!

---------------------------------------------------
import java.util.Scanner;

public class Solution{

        int caseNumber = 0;
        
        static Scanner sc = new Scanner(System.in);
        
    public static void main(String[] args){

        Solution sol = new Solution();
        
        int T = sc.nextInt();
        int N = sc.nextInt();
        int M = sc.nextInt();
        
        for (int i = 1; i <= T; i++){
                sol.caseNumber = i;
            
                for (int j = 0; j <= 6; j++){
                System.out.println("5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5");
                for(int k = 0; k < 18; k++){
                    sc.nextInt(); // If I comment out this line, the code 
completes
                }

            }
                
            System.out.println(5);
        }
        
        sc.close();
    }
    
    public Solution() {
        
    }
    
}
----------------------------------------------------
Cheers,
Geoff

-- 
You received this message because you are subscribed to the Google Groups 
"Google Code Jam" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-code/086a12e0-ca23-477a-9fba-c6dc8e04b21a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to