
-----------------------------------
t68
Tue Feb 26, 2013 5:37 pm

Ccc2013
-----------------------------------
is it difficult?

-----------------------------------
Panphobia
Tue Feb 26, 2013 6:27 pm

RE:Ccc2013
-----------------------------------
it was more difficult than past ones for me, havent you done it?

-----------------------------------
Unnamed
Tue Feb 26, 2013 6:50 pm

Re: Ccc2013
-----------------------------------
How did you guys do? I got pretty low :(

-----------------------------------
aldld
Tue Feb 26, 2013 7:15 pm

Re: Ccc2013
-----------------------------------
Did anybody else have problems with the online grader? I somehow failed every test case on the grader for S1, yet when I compared my solution to others' it always gave the exact same result as theirs, yet they somehow got that one.

Not to mention that it took over an hour for the solutions to be graded.

I'm not sure if I can go into detail right at this moment, but this combined with a whole bunch of other things going wrong resulted in me getting a really really low score :(

-----------------------------------
Halls McSmurfin
Tue Feb 26, 2013 7:20 pm

Re: Ccc2013
-----------------------------------
The grader doesn't even work.
0/10, would not use again.
Grade F--.

-----------------------------------
Unnamed
Tue Feb 26, 2013 7:28 pm

Re: Ccc2013
-----------------------------------
did anyone else have grader problems?

-----------------------------------
Panphobia
Tue Feb 26, 2013 7:34 pm

RE:Ccc2013
-----------------------------------
i got the first three right in java lol,and then the grade messed up for q5 worked for test data but got 0/15 on grader

-----------------------------------
coolgod
Tue Feb 26, 2013 7:40 pm

Re: Ccc2013
-----------------------------------
The grader worked in the morning and at lunch it was 20 min(according to notice) delay between feedback.
During the afternoon 20 min feedback delay turned in 90 (according to their notice on site.). In reality any solution after 3:20 (when we started) had no feedback provided.
Getting 1-4 perfect with feedback is much easier than without.

-----------------------------------
Panphobia
Tue Feb 26, 2013 8:04 pm

RE:Ccc2013
-----------------------------------
oh nice what did you do for q4? what algorithm did you use?

-----------------------------------
bbi5291
Tue Feb 26, 2013 9:45 pm

Re: Ccc2013
-----------------------------------
Please don't discuss the problems until the end of the week.

-----------------------------------
linuxp
Tue Feb 26, 2013 9:49 pm

Re: Ccc2013
-----------------------------------
Please don't discuss the problems until the end of the week.
can i discuss that freaking awesome judge system?
they used some advanced technology that made 90 minutes to 4 hours

-----------------------------------
aldld
Tue Feb 26, 2013 10:13 pm

Re: Ccc2013
-----------------------------------
I'll wait before giving details about the questions, but I hope I can discuss the grading system because this really needs to be addressed. There are more problems with the judging system than just the time.

The day before the competition I did some tests at home with the online grader (with the 2012 questions available). For Python, something as simple as adding a class that does nothing causes the program to fail. Compare these two screenshots:

http://i.imgur.com/qNcxPN4.png
http://i.imgur.com/Rly97ze.png

Honestly this is ridiculous. This competition shouldn't even play a role in scholarship or university admission decisions if they can't even have a working grader. It would probably at least be easier to maintain if their system was more like that of Project Euler or Google Code Jam, where you do the actual running of the program on your own system. https://code.google.com/codejam/quickstart.html

Edit: Another thing worth mentioning: The printed problem booklet allows for 1 minute per test case, however the online grader cuts it off at 1-2 seconds... (5s for problem S5)

-----------------------------------
linuxp
Tue Feb 26, 2013 10:53 pm

RE:Ccc2013
-----------------------------------
^ Agree
I got TLE on grader
but it's still inside 1 minute limit
What's the point to make such a online grader?
Witch one is the real instruction? 

Where is official explanation ?

-----------------------------------
lagingking
Wed Feb 27, 2013 12:01 am

RE:Ccc2013
-----------------------------------
Best CCC ever!!!
Not only does the grader not give any response in time, it also marks almost everything wrong !!!
Only if it happened to everyone, not just the people who used it later.
I mean, it would be unfair for those to suffer instant feedback because they are in different timezone, right?
Defnitely fair!
:D
10/10
would definitely come again!!!!

-----------------------------------
bbi5291
Wed Feb 27, 2013 1:03 am

Re: Ccc2013
-----------------------------------
Guys, cut them some slack. Writing an autograder is tough, and this was the first time they've used this system. It's also harder to grade interpreted languages like Python than compiled languages like C++ and Pascal (don't even get me started on Java). I have complete confidence that the CEMC will sort out these issues and that everyone will be graded fairly.

-----------------------------------
aldld
Wed Feb 27, 2013 1:52 am

Re: Ccc2013
-----------------------------------
this was the first time they've used this system.

Actually they used it last year too, and it had problems then. They new tons of students would be uploading programs all at the same time, they should have known to stress test the grader beforehand.

-----------------------------------
bbi5291
Wed Feb 27, 2013 2:19 am

Re: Ccc2013
-----------------------------------
this was the first time they've used this system.

Actually they used it last year too, and it had problems then. They new tons of students would be uploading programs all at the same time, they should have known to stress test the grader beforehand.Wow, I stand corrected. Still, autograders are tricky to get right, so yeah.

-----------------------------------
Halls McSmurfin
Wed Feb 27, 2013 3:56 am

Re: Ccc2013
-----------------------------------
this was the first time they've used this system.

Actually they used it last year too, and it had problems then. They new tons of students would be uploading programs all at the same time, they should have known to stress test the grader beforehand.

What was wrong with the grader last year?

-----------------------------------
calaveras
Wed Feb 27, 2013 12:03 pm

Re: Ccc2013
-----------------------------------
How about everybody's score by your school teacher initial grading ? 

My score is 62 in Senior Division. ody

Anybody could expect what kind of score will be the cut off for CCC stage 2 ?

Thanks for everybody's input.

Peter

-----------------------------------
nullptr
Wed Feb 27, 2013 12:04 pm

Re: Ccc2013
-----------------------------------
When are the test data released? Our school didn't get a grader (which looks like a good thing...).

-----------------------------------
calaveras
Wed Feb 27, 2013 12:07 pm

Re: Ccc2013
-----------------------------------
By the way, the online grader is extremely slow.

After each submission, we get feedback after 20-50 minutes. How about the response time at your school ?

 Our contest began at 12:00 yesterday, this might be the peak hour.

-----------------------------------
bbi5291
Wed Feb 27, 2013 12:57 pm

Re: Ccc2013
-----------------------------------
How about everybody's score by your school teacher initial grading ? 

My score is 62 in Senior Division. ody

Anybody could expect what kind of score will be the cut off for CCC stage 2 ?

Thanks for everybody's input.

PeterMy prediction (which is usually wrong) is that the cutoff this year will be around 63.

-----------------------------------
Halls McSmurfin
Wed Feb 27, 2013 2:10 pm

Re: Ccc2013
-----------------------------------
When are the test data released? Our school didn't get a grader (which looks like a good thing...).

Your teacher should have the test data. Ask him / her for it?
How can not using the grader be a good thing?

-----------------------------------
nullptr
Wed Feb 27, 2013 2:29 pm

Re: Ccc2013
-----------------------------------
When are the test data released? Our school didn't get a grader (which looks like a good thing...).

Your teacher should have the test data. Ask him / her for it?
How can not using the grader be a good thing?

It seemed like a big headache for a lot of people, and from the looks of it, it gave wrong answers sometimes too.

-----------------------------------
crossley7
Wed Feb 27, 2013 3:10 pm

RE:Ccc2013
-----------------------------------
The advantage of the grader is that you might be able ot get feedback during the contest while a teacher grading you only get marks after everything is done and basically get 1 submission.  In general onlin graders aren't great, but I'm pretty confident that they work fine but they check output character by character so hidden spaces can ruin a program and cause it to be wrong even though it looks right.

If it is any reference, last year you needed a 64 to make round 2 but I haven't looked at this year's problems to see how they compare.  But my guess is > 60 for sure if it is similar difficulty and 63 will be really tight.

The upside is that you wrote it.  I believe that a bunch of schools couldn't write it this year with the teacher's strike

-----------------------------------
Panphobia
Wed Feb 27, 2013 6:15 pm

RE:Ccc2013
-----------------------------------
The problem is that most of the people in my class, are idiots, no offence to them. So because they could not answer the questions they linked a random number generator to how many different answers there are and they submitted that program 50 times each, so imagine only  40 people in my class submitting 50 things to be graded per 4 questions.

-----------------------------------
bbi5291
Wed Feb 27, 2013 6:38 pm

Re: RE:Ccc2013
-----------------------------------
If it is any reference, last year you needed a 64 to make round 2
For further reference: http://www.wcipeg.com/wiki/Canadian_Computing_Competition#Historical_cutoff_values

-----------------------------------
Tony
Wed Feb 27, 2013 7:42 pm

RE:Ccc2013
-----------------------------------
It took DWITE a couple of years to run into and refine all of those issues. We previously saw crazy things along the lines of students submitting a zip file of their Visual Basic project as a "java" solution which made the compiler crash in very bad ways.

-----------------------------------
d310
Wed Feb 27, 2013 11:52 pm

Re: Ccc2013
-----------------------------------
They've started to regrade all solutions on the online grader.

-----------------------------------
Unnamed
Wed Feb 27, 2013 11:56 pm

Re: Ccc2013
-----------------------------------
They've started to regrade all solutions on the online grader.

Will it be regraded with a 1 minute time limit?

-----------------------------------
d310
Thu Feb 28, 2013 12:12 am

Re: Ccc2013
-----------------------------------
No, standard time limits of 1 second, and 6 seconds.

-----------------------------------
y4y
Thu Feb 28, 2013 12:45 am

RE:Ccc2013
-----------------------------------
I had an interesting idea.
I too wanted the test cases and thought that it's possible to extract them using the online grader.

idk how restricted the submissions are but my idea was to have python code that simply posts all the input to some page where you have code to log said data.

btw it's too late now.... and this I didn't really plan on doing it just a thought

-----------------------------------
bbi5291
Thu Feb 28, 2013 12:59 am

Re: RE:Ccc2013
-----------------------------------
I had an interesting idea.
I too wanted the test cases and thought that it's possible to extract them using the online grader.

idk how restricted the submissions are but my idea was to have python code that simply posts all the input to some page where you have code to log said data.

btw it's too late now.... and this I didn't really plan on doing it just a thought
Any unauthorized access, attempts to circumvent the security controls, or abuse of the system will result in DISQUALIFICATION from all contests.
Also, it probably won't work. It's straightforward to prevent processes from opening sockets.

-----------------------------------
Tony
Thu Feb 28, 2013 1:03 am

RE:Ccc2013
-----------------------------------
not that unique of an idea. DWITE prevents that by evaluating submissions from within a VM that blocks outbound network connections.

in CCC's case my understanding is that the handful of people that make the Stage 2 cutoff get their submissions reviewed; so such would simply get you disqualified.

-----------------------------------
y4y
Thu Feb 28, 2013 2:34 am

Re: RE:Ccc2013
-----------------------------------
not that unique of an idea. DWITE prevents that by evaluating submissions from within a VM that blocks outbound network connections.

in CCC's case my understanding is that the handful of people that make the Stage 2 cutoff get their submissions reviewed; so such would simply get you disqualified.

alright then, seems like a simple solution, I didn't even think that far ahead.
Like I said I wasn't planning on doing it and thought there might already be countermeasures against it.
It was just a thought that popped in my head, I don't even know python but knew that it had easy to use built in libraries for sockets/http requests. 

btw this system does interest me how did you build the dwite system or similar grading systems?
Is there some form of open source code for platforms like this?

and is it true that this is the system used at UW by compsci profs?

sorry if I'm going a bit off topic, just interested that's all.

-----------------------------------
Tony
Thu Feb 28, 2013 1:26 pm

RE:Ccc2013
-----------------------------------
Dan can better talk about DWITE's internals. In short, there's a front end that takes submissions and a backend that is running a queue of grading tasks. The grading happens in a controlled environment via the use of VMs.

UW does not use DWITE's tech, but some profs do use automated grading systems in class (this works very well for compiler courses). The name of the system escapes me at the moment.

-----------------------------------
linuxp
Thu Feb 28, 2013 6:29 pm

Re: Ccc2013
-----------------------------------
No, standard time limits of 1 second, and 6 seconds.

But rule No.11 on instruction booklet says: " The Senior problems be given one minute of execution time per test case on a Pentium-4 class computer running at 2GHz, and similarly, one minute of execution time on the on-line grader. "

 8-)

O_O

@_@  @_@  @_@

Liars?

-----------------------------------
coolgod
Thu Feb 28, 2013 7:23 pm

Re: Ccc2013
-----------------------------------
Anyone else's score went down during the remark on the online graded? Mine went down 7 marks for #4.

-----------------------------------
bbqchps
Thu Feb 28, 2013 7:37 pm

Re: Ccc2013
-----------------------------------
No, standard time limits of 1 second, and 6 seconds.

But rule No.11 on instruction booklet says: " The Senior problems be given one minute of execution time per test case on a Pentium-4 class computer running at 2GHz, and similarly, one minute of execution time on the on-line grader. "

 8-)

O_O

@_@  @_@  @_@

Liars?
I was wondering if anyone had clarification on this as well  :|

-----------------------------------
Panphobia
Thu Feb 28, 2013 11:29 pm

RE:Ccc2013
-----------------------------------
Is this strange or not? I just handed in the exact program for question 2, on the post contest, and I got 15/15, but when I did it on Tuesday, I got 6/15?

-----------------------------------
dnkywin
Fri Mar 01, 2013 10:30 am

RE:Ccc2013
-----------------------------------
Has anyone heard of anyone who's gotten 75/75 yet? #5 was pretty difficult :/

-----------------------------------
Halls McSmurfin
Fri Mar 01, 2013 11:10 am

Re: RE:Ccc2013
-----------------------------------
Is this strange or not? I just handed in the exact program for question 2, on the post contest, and I got 15/15, but when I did it on Tuesday, I got 6/15?

Check your submissions during the contest again; they were rejudged.

-----------------------------------
crossley7
Fri Mar 01, 2013 1:26 pm

RE:Ccc2013
-----------------------------------
For the 1 minute problem, if it is taking your solution a minute to run, I can guarantee you are not doing it properly or you are using a language with ridiculous amounts of overhead.

Also, if you take the computer they are referencing, that is about 1-6 seconds on the waterloo computers which is where I suspect they are running them off of.  Might be a bit more time but you really aren't losing much.  The number of operations performed in 1 second is enormous.

Waterloo profs use a system called marmoset which is very similar to the CCC system but it is a different one.

-----------------------------------
linuxp
Fri Mar 01, 2013 4:17 pm

Re: RE:Ccc2013
-----------------------------------
For the 1 minute problem, if it is taking your solution a minute to run, I can guarantee you are not doing it properly or you are using a language with ridiculous amounts of overhead.

Also, if you take the computer they are referencing, that is about 1-6 seconds on the waterloo computers which is where I suspect they are running them off of.  Might be a bit more time but you really aren't losing much.  The number of operations performed in 1 second is enormous.

Waterloo profs use a system called marmoset which is very similar to the CCC system but it is a different one.

I don't know am i using a pro algorithm, but my solution get 75/75 in 1 minute limit, but only 65 in 1/6s limit.
The problem is they gave us wrong information.
Just imagine if your teacher gave you an essay and told you 800 words minimum.
But after you hand it in, your teacher tells you, OMG sorry bro, it was 2000 words minimum, you all lose 20% mark for that.
What's your feelings?

-----------------------------------
ttm
Fri Mar 01, 2013 5:20 pm

Re: Ccc2013
-----------------------------------
I didn't use the online grader but my solution to S5 ran in  40 seconds for the larger cases. I'd have no idea how to solve 4 if I was using Turing (but I suppose that counts as a language with ridiculous amounts of overhead).

Yes, Turing has a ridiculous amount of overhead.  Haskell/C/C++/Java are the ones I was mainly considering.  I don't know anything about ruby, but even python which is popular is much slower than the other ones I mentioned.  Turing should not be used for the senior contest by anyone imo since a) it doesn't get used outside of a high school classroom and even then it's rarely used there, b) it is about a bazillion times slower than any decent language, and c) if the goal is to move to the next round you need to use something else that is drastically different anyways so you may as well qualify and practice with the allowed language.

I won't say Turing doesn't have uses, the thing is that none of those uses apply to contests.

Also, I have not seen test cases for any question nor have I seen the actual questions (I've got enough University schoolwork keeping me busy enough as is... though practice would be smart) I know what it is like for the time limit and my solution for S4 last year timed out on 3 of 5 cases given a minute (though not on the grader) but the other 2 were done in under 5 seconds.

-----------------------------------
ishiney
Sat Mar 02, 2013 8:43 am

Re: Ccc2013
-----------------------------------
Guide to getting high scores on CCC.
learn c and use c inputs instead of C++. This is the only contest I've seen where a c++ solution does not run in time but a c one does.
Then you haven't seen a lot of contests.

I personally think there's nothing inherently unfair with the fact that i/o with scanf/printf is faster than their cin/cout counterparts, or BufferedReader vs. Scanner, or just Python, etc. Though it would have been nice if there were a note about this on the instructions somewhere on the site. In comparison, USACO tells you bluntly that C-styled i/o is faster than C++ streams; to use BufferedReader rather than Scanner; and that Python should not be used for large inputs. I guess this is just something that comes with experience. :(

-----------------------------------
ishiney
Sat Mar 02, 2013 9:55 am

RE:Ccc2013
-----------------------------------
Are we allowed to talk about the problems/solutions yet?

-----------------------------------
linuxp
Sat Mar 02, 2013 11:02 am

Re: RE:Ccc2013
-----------------------------------
Are we allowed to talk about the problems/solutions yet?

mmhs.ca already posted solution for s1-4 in python
The funny thing is python cannot solve s4 perfectly no matter what :P

-----------------------------------
nullptr
Sat Mar 02, 2013 12:02 pm

Re: RE:Ccc2013
-----------------------------------
Are we allowed to talk about the problems/solutions yet?

mmhs.ca already posted solution for s1-4 in python
The funny thing is python cannot solve s4 perfectly no matter what :P

Do you mean http://access.mmhs.ca/ccc/index.htm ? Cause I can't find it anywhere..

-----------------------------------
ishiney
Sat Mar 02, 2013 12:25 pm

Re: RE:Ccc2013
-----------------------------------
Are we allowed to talk about the problems/solutions yet?

mmhs.ca already posted solution for s1-4 in python
The funny thing is python cannot solve s4 perfectly no matter what :P

That seems to be true. I re-coded S4 in Python, with all the optimizations I know - can't get more than 8/15. Python really need an efficient vector or ArrayList equivalent ... but since it's dynamically typed, it probably wouldn't :P

-----------------------------------
azneye
Sat Mar 02, 2013 12:52 pm

Re: RE:Ccc2013
-----------------------------------
Are we allowed to talk about the problems/solutions yet?

mmhs.ca already posted solution for s1-4 in python
The funny thing is python cannot solve s4 perfectly no matter what :P

Do you mean http://access.mmhs.ca/ccc/index.htm ? Cause I can't find it anywhere..

My school website was moved here: http://mmhs.ca/ccc/index.htm

-----------------------------------
Raknarg
Sat Mar 02, 2013 1:04 pm

RE:Ccc2013
-----------------------------------
Did you guys do the junior or senior questions?

-----------------------------------
nullptr
Sat Mar 02, 2013 1:25 pm

Re: RE:Ccc2013
-----------------------------------
Are we allowed to talk about the problems/solutions yet?

mmhs.ca already posted solution for s1-4 in python
The funny thing is python cannot solve s4 perfectly no matter what :P

Do you mean http://access.mmhs.ca/ccc/index.htm ? Cause I can't find it anywhere..

My school website was moved here: http://mmhs.ca/ccc/index.htm

Thanks a lot!! Any reason why there's no S5 solution?

-----------------------------------
linuxp
Sat Mar 02, 2013 1:27 pm

Re: RE:Ccc2013
-----------------------------------
Are we allowed to talk about the problems/solutions yet?

mmhs.ca already posted solution for s1-4 in python
The funny thing is python cannot solve s4 perfectly no matter what :P

That seems to be true. I re-coded S4 in Python, with all the optimizations I know - can't get more than 8/15. Python really need an efficient vector or ArrayList equivalent ... but since it's dynamically typed, it probably wouldn't :P

NO! you are wrong. The real suck point of S4 is input.
CCC should consider some languages have slow input.
for example: python input(), c++ cin, turing, ruby etc...
Python solution only need less than 0.1 second for solving largest cases 
But it took more than 5s to get input.
It's just ridiculous.

Log files:
unknown
case: s4.6-1.in
reading :5.623000
solving: 0.088000
all: 5.711000

unknown
case: s4.6-2.in
reading :5.722000
solving: 0.054000
all: 5.776000

yes
case: s4.6-3.in
reading :5.691000
solving: 0.214000
all: 5.905000

no
case: s4.6-4.in
reading :5.753000
solving: 0.094000
all: 5.847000

no
case: s4.6-5.in
reading :5.656000
solving: 0.272000
all: 5.928000

-----------------------------------
bbi5291
Sat Mar 02, 2013 2:33 pm

Re: Ccc2013
-----------------------------------
So what do you expect them to do? Give you a longer time limit for C++ than for C? That would be ridiculous, because then you could just use C input functions in C++, and then you'd have an unfair advantage over the C people.

Giving all programming languages equal execution time is the least evil of all choices.

Also, did any of you actually bother to test your programs on huge cases, to be sure they wouldn't time out? If you had, you would've known that cin wouldn't cut it.

-----------------------------------
ishiney
Sat Mar 02, 2013 5:13 pm

Re: Ccc2013
-----------------------------------
So what do you expect them to do? Give you a longer time limit for C++ than for C? That would be ridiculous, because then you could just use C input functions in C++, and then you'd have an unfair advantage over the C people.

Giving all programming languages equal execution time is the least evil of all choices.

Also, did any of you actually bother to test your programs on huge cases, to be sure they wouldn't time out? If you had, you would've known that cin wouldn't cut it.

I agree. Besides, Python/Java had lots of other "unfair" advantages*, one might say, in their standard libraries. Should we allow C++ contestants to use the Boost libraries or such as well? It's a slippery slope...

Edit: advantages such as BigInteger, built-in Geometry libraries (for Java at least), regex, even GregorianCalendar, HASHMAPS/SETS ... it's actually unfair. D:

-----------------------------------
ishiney
Sat Mar 02, 2013 5:30 pm

RE:Ccc2013
-----------------------------------
So, maybe some actual discussions about the questions now?

I think S1 and 2 were adhoc, 3 was a simulation/complete search, 4 was a simple DFS/BFS, and 5 was a DP + Dijkstra (I only got 13/15 even after optimizing like crazy though =__=)

I know 1 person who did get a perfect score on S5. I'll ask for his code/algorithm....

-----------------------------------
linuxp
Sat Mar 02, 2013 5:37 pm

RE:Ccc2013
-----------------------------------
My friend got perfect on S5 using Java.
He said its some kind of Math approach.
For 5000000 his program only used 0.x second.

-----------------------------------
Unnamed
Sat Mar 02, 2013 5:40 pm

Re: Ccc2013
-----------------------------------
S5: I know someone with a 15/15 C++ solution that runs in 0.00X s or 0 s for all cases.

-----------------------------------
Halls McSmurfin
Sat Mar 02, 2013 5:43 pm

Re: Ccc2013
-----------------------------------
I know someone with a < 1.7s run time for the largest cases in S4 with Python, too bad it doesn't pass the grader. lol...

-----------------------------------
Panphobia
Sat Mar 02, 2013 5:45 pm

RE:Ccc2013
-----------------------------------
S4 wasn't difficult, it was a simple graph search problem, gotta love breadth first search. S5 you could use recursion, but a dynamic solution would be better.

-----------------------------------
coolgod
Sat Mar 02, 2013 9:13 pm

Re: Ccc2013
-----------------------------------
So what do you expect them to do? Give you a longer time limit for C++ than for C? That would be ridiculous, because then you could just use C input functions in C++, and then you'd have an unfair advantage over the C people.

Giving all programming languages equal execution time is the least evil of all choices.

Also, did any of you actually bother to test your programs on huge cases, to be sure they wouldn't time out? If you had, you would've known that cin wouldn't cut it.

How exactly did u bother to test your program on huge cases? Remember most of us were given no feedback.
Generate millions of numbers and write it in a text file? 
Suppose our computer c++ with cin could run under 1 second, that doesn't mean online grader can. Did anyone get a 15/15 without using c style inputs?

-----------------------------------
ttm
Sat Mar 02, 2013 9:14 pm

Re: Ccc2013
-----------------------------------
For 5 you could use DP but that's still pretty slow. I solved it like so:
[code]
#include 
int bestprime[] = { [huge list of pre-calculated values] };
int primes[] = { [huge list of pre-calculated values] };
int main() {
	freopen("s5.in", "r", stdin);
	int n, acc = 0; std::cin >> n;
	for (int pn = 0; n != 1; ++pn) while (n % primes[pn] == 0) n /= primes[pn], acc += bestprime[pn];
	std::cout > N >> M;
	memset(hist,0,N*sizeof(int));
	memset(from,0,N*sizeof(int));
	for(int i = 0; i < M; i++) {
		cin >> data[i][0] >> data[i][1];
		data[i][0]--;
		data[i][1]--;
		hist[data[i][0]]++;
	}
	for(int i = 1; i < N; i++)
		from[i] = from[i-1]+hist[i-1];
	from[N] = M;
	for(int i = 0; i < M; i++) {
		cf = data[i][0];
		store[from[cf]+(--hist[cf])] = data[i][1];
	}
	cin >> p >> q;
	p--;
	q--;
	memset(visited,0,N);
	target = q;
	dfs(p);
	pq = visited[q];
	memset(visited,0,N);
	target = p;
	dfs(q);	
	qp = visited[p];
	if(pq && !qp)
		cout 