← Back to topics
Topic

Serbian Regionals

t
turgond
How did you like the tasks, how well did you do, where can we find the results for your county :) ?
p
picsel
I didn't like them but I did well, you can find the results for my county on www.dms.org.yu xD
t
turgond
Yeah, I just saw there is everything there :)
I think A category was nice, not too easy but nice :) I also did well :)
p
picsel
First task for B category was super easy, just elementary maths, I have no idea how people made mistakes there. It was easy 100 points.
It took me about 90 minutes to totally solve and test all the tasks in B category... A category does seem harder tho :) But 'brojanje' task wasn't too hard either, so I think it was not a problem to get at least 100 points there either.
t
turgond
I did and tested everything in 3 hours, but it was far harder then last year :)
d
dimke
brojanje: I didn't read the task carefully, so i got TLE on 5 cases xD ( 50 points )
burici: Stupid mistake in declaring variables ( 0 points instead of 100 :D )
vojnici: I spend 2.5 h for solving this task xD ( 0 points xD )

So, in sum 50 and i hope that i'll go on national xD
t
tgudlek
Congrats to all that have passed :)

Vojnici is very nice task.

I don't know where are errors in my codes for Golf and Burici.
a
amuts09
actualy i can't fint what's wrong with my code:

#include <cstdio>
#include <cmath>



int main(){

double t1,t2,length1,length2;
double bx,by,sx,sy;;
double tx,ty;
int hles;
scanf("%lf %lf",&bx,&by);
scanf("%lf %lf",&sx,&sy);
scanf("%d",&hles);
for(int i=0;i<hles;i++){
scanf("%lf %lf", &tx,&ty);
length1=((tx-bx)*(tx-bx))+((ty-by)*(ty-by));
length2=((tx-sx)*(tx-sx))+((ty-sy)*(ty-sy));
length1=sqrt(length1);
length2=sqrt(length2);
if(length1<=length2*2){printf("%d\n",i+1);return 0;}
}
printf("Nadrljao je!\n");

return 0;
}


the
if(length1<=length2*2)
becouse stick is running twice as fast as ball
n
n.vilcins
You want to multiply by 2 length1 not length2. Yes, it passes all tests then.
m
matteo123
this is your mistaske
double bx,by,sx,sy;;
d
demjan0001
that is not mistake ...
you can have how many you like this (;) ...
you can code:
double bx,by,sx,sy;;;;;;; double tx,ty;;;;;;;;;;;;;;;;
A
Al3kSaNdaR
Yes, ; represents end of one line ( I think ) so you can have empty lines too so double bx, by, sx, sy;; isn't mistake.

Edit -> In pascal you must have only one ; but in C/C++ you can have as many as you want. :)
m
matteo123
sorry I didn't know thar
A
Asmirasmir
Actualy the ; sign represents the end of a command for most modern programming languages.
N
Nikola94
@Al3kSaNdaR

that's not true either. you can have a billion of ; in pascal, it doesn't make a difference :)
m
matteo123
@amuts09:
I test your code and your code works on second test but for first outputs 2.look at your if I think there is a mistake