public static int solve(int[] s, int[] t) {
		Interval[] intervals = new Interval[s.length];
		
		for(int i = 0; i < s.length; i++) {
			intervals[i] = new Interval(s[i], t[i]);
		}
		
		Arrays.sort(intervals);
		
		int last = 0; //last selection's end time
		int relt = 0;// the result 
		for(int i = 0; i < s.length; i++) {
			if(last < intervals[i].start) {
				relt++;
				last = intervals[i].end;
			}
		}
		
		return relt;
	}