Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

sinh to hop c++

OK = false ;
while(!OK) {
	in();
	int t = k;
	while(a[t] == n + t - k) t--;
	if(t>0) {
		a[t]++;
		for(int i = t+1; i<= k ; i++) {
			a[i] = a[i-1] +1;
		}
	} else OK = true;
}	
 
PREVIOUS NEXT
Tagged: #sinh #hop
ADD COMMENT
Topic
Name
4+5 =