Esempio n. 1
0
int main() {
	int t;
	scanf("%d",&t);
	while(t--) {
		int a,b;
		scanf("%d %d",&a,&b);
		printf("\n");
		int min=a<b?a:b;
		if((a%2==0)&&(b%2==0)) {
			if(b!=2*a) {
			  int k=pf(a/2,b);
			  printf("%d",k);
		    }
			else {
				int k=pf(a/2,b);
			  printf("%d",k+1);
			}
		}
		else if(min%2!=0) {
			if(b!=2*a){
		    int k=pfk(a,b);
		    printf("%d",k);
		}
		    else {
		    int k=pfk(a,b);
		    printf("%d",k+1);
			}
	}
	
}
}
Esempio n. 2
0
char		*grp_fork(int id_player)
{
  t_player	ref;

  ref.player_id = id_player;
  return (pfk(NULL, &ref));
}
Esempio n. 3
0
File: gfx_pfk.c Progetto: kube/zappy
void			notify_all_gfx_pfk(t_env *e, t_bot *bot)
{
	t_iterator		iter;
	t_gfx			*gfx;

	iter = NULL;
	while ((gfx = (t_gfx *)ft_lst_iter_next_content(e->gfx_lst, &iter)))
		pfk(e, gfx->fd, bot);
}