
-----------------------------------
gvc
Sat Aug 13, 2005 11:09 am

IOI Online Contest
-----------------------------------
Do you want to know what it's like to do the IOI?

From the IOI organizers:

This year's IOI will be accompanied by an online, electronic contest
hosted at http://sio.mimuw.edu.pl/ioi2005/.

Posted tasks will be exactly the ones used during the real competition and
will be graded using the same test data. Everybody is welcome to
participate and compare his algorithmic skills with the best students
competing in Nowy Sacz, Poland.

Please forward this message to as many people as you can.

Good luck for everybody - online and onsite competitors,
IOI 2005 Organizers



-----------------------------------
Tony
Sat Aug 13, 2005 2:44 pm


-----------------------------------

IOI 2005 Internet Contest schedule

    * Fri, 19 Aug 2005, 7:15 GMT (world time) - Practice Session tasks published,
    * Fri, 19 Aug 2005, 19:00 GMT (world time) - end of Practice Session,
    * Sat, 20 Aug 2005, 10:00 GMT (world time) - Practice Session results published, 

    * Sat, 20 Aug 2005, 13:00 GMT (world time) - First Day tasks published,
    * Sun, 21 Aug 2005, 13:00 GMT (world time) - end of First Day session,
    * Sun, 21 Aug 2005, 21:00 GMT (world time) - First Day results published, 

    * Mon, 22 Aug 2005, 13:00 GMT (world time) - Second Day tasks published,
    * Tue, 23 Aug 2005, 13:00 GMT (world time) - end of Second Day session,
    * Tue, 23 Aug 2005, 21:00 GMT (world time) - final results published. 


Available languages are C, C++ and Pascal. Solutions are compiled serverside and you get a report with your score back. Check out the website.

-----------------------------------
bugzpodder
Sat Aug 13, 2005 4:58 pm


-----------------------------------
interesting...  I'll take the first day!!  (five hours is a bit demanding on a weekday)

tc google jam is on the same (second) day i think :S

practice problems are up.  I must say, their qualities are very good.

-----------------------------------
bugzpodder
Sun Aug 21, 2005 10:03 am


-----------------------------------
lol all of these problems have a limit of 1000000000 each... crazy!
is it just me or is the third problem in day 1 trivial? (~40 lines?)
I think #2 is pretty simple once you get the idea of whats going on from those nice pictures they have :)  [and I am not showing off by saying how easy i find the problems to be... but they are, in actuality, quiet simple as I am sure zylum will agree with me once he looks at them]

-----------------------------------
bugzpodder
Sun Aug 21, 2005 10:51 am


-----------------------------------
omg so gay... I compiled two questions for day 1 but they told me I can't submit anymore because it ended 13:00 GMT today, whenever that was :S

-----------------------------------
bugzpodder
Sun Aug 21, 2005 11:09 am


-----------------------------------

//mea.cpp
#include
#include
using namespace std;

int main()
{
	int N;
	scanf("%d", &N);
	int cnt=0;
	long long lo,hi,p,q,k,tmp;
	scanf("%lld %lld", &p, &q);
	lo = 2*p-q;
	hi = p;
	N-=2;
	p = 2*p - hi;
	k = q;
	while(N-->0)
	{
		tmp=2*k-q;
		q=2*k-p;
		p = tmp;	
		scanf("%lld", &k);
		if (q>k) {
			if (N%2==1)
				lo+=q-k;
			else
				hi-=q-k;
			q=k;
			if (hi=lo) 
		printf("%lld\n",hi-lo+1);
	else 
		printf("0\n");
	return 0;
}

//mou.cpp
#include
#include
using namespace std;

struct line{
	line (int _a=0, int _b=0, int _m=0) {a=_a; b=_b;m=_m;}
	int a,b,m;
};

list  ll;

int main(){
	int a,b,m,N,cnt;
	scanf("%d\n", &N);
	list::iterator I, I2;
	line l,l1;
	bool flag;
	l.a=0; l.b=N; l.m=0;
	ll.push_back(l);
	char c;
	while(1){
		scanf("%c", &c);
		if (c=='E') break;
		if (c=='Q') 
		{
			a=0;
			scanf(" %d\n", &b);
			cnt=0;
			for (I=ll.begin();I!=ll.end() && b>=a;I++)
			{
				m = I->b;
				m -= I->a;
				if ((I->m)>0)
					cnt+=min(m,(b-a)/(I->m));
				else
					cnt+=m;
				a += m*(I->m);
			}
			printf("%d\n", cnt);
		}
		else
		{
			scanf(" %d %d %d\n", &l.a, &l.b, &l.m);
			l.a--;
			flag = true;
			for (I=ll.begin();I!=ll.end();)
			{

				if (I->ba>=l.b) break;
				if (l.a>I->a)
				{
					ll.insert(I, line(I->a, l.a, I->m));
				}
				if (l.b < I->b)
				{
					I2 = I;
					I2 ++;
					ll.insert(I2, line(l.b, I->b, I->m));
				}

				if (flag)
				{
					flag = false;
					I->a = l.a; I->b = l.b; I->m = l.m;
					I++;
				}
				else
				{
					I2 = I;
					I++;
					ll.erase(I2);		
				}
			}
		}
	}
	return 0;
}
100 on the first and 76 on the second.

-----------------------------------
thegoose
Mon Aug 22, 2005 8:55 am


-----------------------------------
lol all of these problems have a limit of 1000000000 each... crazy!
is it just me or is the third problem in day 1 trivial? (~40 lines?)
I think #2 is pretty simple once you get the idea of whats going on from those nice pictures they have :)
Hi, this is Richard, we just finished day 2 of the IOI.
Problem 3 is indeed quite simple. For mountain, the solution that's required to get full points is actually O((#E+#Q)logNlogN).

By the way, the score of the Canadian team (both days tallied) are 523, 421, 350~ish and 320~ish.
Good luck with day 2.

-----------------------------------
bugzpodder
Mon Aug 22, 2005 7:58 pm


-----------------------------------
well I am guessing that you got 523 lol... vns, thats definitely a gold. 

meh I dont have time for day two
