ZOJ1005: jugs 灌水定理

os posted @ 2013年9月09日 13:45 in ACM , 1113 阅读

acm 题目List

http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=1005

 

#include <stdio.h>

int main()
{
	int a, b, t, n;
	while(scanf("%d%d%d", &a, &b ,&n) != EOF)
	{
		if (a == 1) 
		{
			for (t = 1; t <= n; t++)
				printf("fill A\npour A B\n");
			printf("success\n");
			continue;
		}

		t = 0; /* Current B is emplty */
		while(t != n)
		{
			printf("fill A\npour A B\n");
			t += a;

			if (t >= b)
			{
				t -= b;
				printf("empty B\npour A B\n");
			}
		}
		printf("success\n");
	}
	return 0;
}

 

 

 

Avatar_small
babysitting services 说:
2019年9月24日 16:09

The maid service could be perfect with regard to busy individuals. No issue what your circumstances, a house cleaning support can meet your needs and provide a variety of benefits. Having more spare time and not really spending your additional time dusting, scrubbing as well as mopping might help reduce stressors within the family. Maybe your partner is a good organizational fanatic and wants everything within its location and will get upset due to your less-than-tidy methods. Or perhaps your mother and father, siblings or even in-laws help to make critiquing your own cleaning habits part of every go to. Whatever your own housekeeping regimen, or insufficient one, does to produce stress, a house maid service could provide the relief you’ve been searching for.

Avatar_small
monthly cleaning ser 说:
2021年9月07日 17:39

Taking that approach here is usually to not the start the glass as long as you're removing this hard mineral water stain. Next you should definitely have some sort of window laundering wand or maybe sponge as well as a squeegee to decontaminate the a glass. In order to decontaminate the windows correctly start using a bucket in addition to apply a simple squirt connected with Dawn dishwash cleaning agent into apprx. 2-3 gallons connected with water. When preparing for to fresh the tricky water spills dip ones wand into your cleaning alternative and use it to this glass the spot that the water destinations are.

Avatar_small
monthly cleaning ser 说:
2021年9月08日 16:33

Additionally scroll down and look for reviews relating to particular time frame cleaners right from Yahoo feedback and locale search knowledge. "Angies List" is as well a great spot to find home elevators reputable vendors and user testimonials. Please ask any neighbors whether. You would be surprised just how many most people use offerings and negative feedback is always the best quality reference.


登录 *


loading captcha image...
(输入验证码)
or Ctrl+Enter