ZOJ1005: jugs 灌水定理

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

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.

Avatar_small
full time maids in d 说:
2023年8月21日 20:26

It is especially true which will cleanliness is together with godliness. The proclamation is relatively simple though keeping your private home and home office clean is without a doubt pretty troublesome. Most amongst us are as a result busy earning a living and find it difficult to care good enough about maintaining. On the additional hand, some many people would think that should be a very sometimes complicated process and the most of times you aren't going to willing to pay out that much wedding ceremony cleaning.

Avatar_small
monthly maid service 说:
2023年8月21日 20:32

It is somewhat true who cleanliness is almost godliness. The survey is attractive simple and yet keeping your dwelling and clinic clean might be pretty complex. Most sufferers are which means busy working hard and simply cannot care an adequate amount of about vacuuming. On the other one hand, some families would think that it can be a very long-drawn-out process a great number of times an individual willing to take that much time and energy cleaning.


登录 *


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