| Показать все ветки Спрятать все ветки Показать все сообщения Спрятать все сообщения |
| WA 12 | MOPDOBOPOT (USU) | 1768. Кольцевые струны | 2 дек 2014 20:42 | 2 |
WA 12 MOPDOBOPOT (USU) 15 авг 2012 20:37 My algo is to check that: 1) all spins done in same side 2) all sides are equal 3) all angles are equal 4) in any comparsions precision equals 0.000001 (I tried many variants of precision but got WA12 in any case) It's hard for me to find tests in this problem :( What the hell is 12 test? Edited by author 04.10.2012 12:13 make sure every edge longer than 1e-6 |
| more example plz? | Faruk | 1290. Саботаж | 2 дек 2014 10:52 | 1 |
|
| WA4 | Ekaterina_Pogodina | 1470. НЛО | 1 дек 2014 21:58 | 1 |
WA4 Ekaterina_Pogodina 1 дек 2014 21:58 |
| how shall i get 150000 integers in an array,what the prblm with this code! | Faruk | 1100. Таблица результатов | 1 дек 2014 21:10 | 1 |
#include <stdio.h> int main() { long int n, id[150000], m[150000], max, x, i, j; while(scanf("%ld", &n)==1) { for(i=0; i<n; i++) { scanf("%ld %ld", &id[i], &m[i]); } for(i=0; i<n; i++) { max=0; for(j=0; j<n; j++) { if(m[j]>max) { max=m[j]; x=j; } } printf("%ld %ld\n", id[x], max); m[x]=0; } } return 0; } |
| Can anybody explain the sample please? | WinTokk | 1373. Pictura ex Machina | 1 дек 2014 08:38 | 6 |
I don't understand the sample. Or I should say I don't understand the meaning of the problem... :( First brushstroke has a point of turn in (0, 1), second - in (2, 1), thrid - in (1, -1), fourth - in (2.5, 0.5). Hope, now you will understand. Thank you very much! I've got accepted with this knowledge:) Why can't the third brushstroke be in (1, 1)? In this case the frame will be smaller, won't be? Why can't the third brushstroke be in (1, 1)? In this case the frame will be smaller, won't be? It said, "90 degrees clockwise". And it would have been much harder. =) Edited by author 01.12.2014 08:39 |
| Help Please, WA test 7 | Malarg | 1005. Куча камней | 1 дек 2014 01:58 | 2 |
[code deleted] Edited by moderator 29.01.2022 19:09 Try this test case: 5 5 8 13 14 15 correct answer = 1 split = 5 8 14 | 13 15 sum = 27 | 28 |
| HELP ME!!! What's wrong with it? (C++) | lem_TOJ | 1001. Обратный корень | 1 дек 2014 01:51 | 2 |
#include <iostream> #include <math.h> #include <vector> #include <stdio.h> using namespace std; int main() { unsigned long long a; vector<unsigned long long> b; cin.clear(); while(cin>>a,!cin.eof()) { b.push_back(a); } for(vector<unsigned long long>::iterator it = b.begin() ; it != b.end(); ++it) { printf("%.4lld\n", sqrt(*it)); } return 0; } Edited by author 23.05.2014 07:23 Edited by author 23.05.2014 07:23 It seems that you print numbers to right order, you should print them to reverse order. Like this: for (vector<...> : reverse_iterator it = b.rbegin(); it != b.rend(); ++t) ... |
| has nothing to do with convex hull | Ade | 1883. День рождения энта | 30 ноя 2014 20:13 | 1 |
|
| Output limit exceeded | Faruk | 1243. Развод семи гномов | 30 ноя 2014 19:46 | 1 |
what's that means? Output limit exceeded. |
| how to prove the answer is NO when k > 20 | panyong0202 | 1669. Универсальное слово | 30 ноя 2014 18:19 | 1 |
I have got ac by return NO when k > 20, but how to prove it? |
| solution by gladoff | DavidРЕМШgladoff#c++ | 1030. Титаник | 30 ноя 2014 11:35 | 1 |
#include <iostream> #include <math.h> using namespace std; const long double D=6875; const long double pi=3.1415926535897932384626433; struct postype{ long double x,y,z; }; int x1,x2,x3,yy1,y2,y3; int sx1,sx2,sx3,syy1,sy2,sy3; char str[100000]; char xstr[10],ystr[10],sxstr[10],systr[10]; postype ship,ice; long double angle1,angle2;
long double dis(double a,double b,double c,double d,double e,double f){ a-=d; b-=e; c-=f; return sqrt(a*a+b*b+c*c); }
int main(){ for (int i=1;i<=3;++i) gets(str); scanf("%d^%d'%d\" %s\n",&x1,&x2,&x3,&xstr); scanf("and %d^%d'%d\" %s\n",&yy1,&y2,&y3,&ystr); gets(str); scanf("%d^%d'%d\" %s\n",&sx1,&sx2,&sx3,&sxstr); scanf("and %d^%d'%d\" %s\n",&syy1,&sy2,&sy3,&systr); gets(str);
double a=x1,b=x2,c=x3; angle1=a*3600+b*60.0+c; angle1/=3600.0*180; angle1*=pi; if (xstr[0]=='S') angle1=-angle1; a=yy1;b=y2;c=y3; angle2=a*3600+b*60.0+c; angle2/=3600.0*180; angle2*=pi; if (ystr[0]=='W') angle2=-angle2; ship.x=D/2*cos(angle1)*cos(angle2); ship.y=D/2*cos(angle1)*sin(angle2); ship.z=D/2*sin(angle1);
a=sx1,b=sx2,c=sx3; angle1=a*3600+b*60+c; angle1/=3600.0*180; angle1*=pi; if (sxstr[0]=='S') angle1=-angle1; a=syy1;b=sy2;c=sy3; angle2=a*3600+b*60+c; angle2/=3600.0*180; angle2*=pi; if (systr[0]=='W') angle2=-angle2; ice.x=D/2*cos(angle1)*cos(angle2); ice.y=D/2*cos(angle1)*sin(angle2); ice.z=D/2*sin(angle1);
long double linedis=dis(ship.x,ship.y,ship.z,ice.x,ice.y,ice.z); linedis/=2; long double AA=asin(linedis*2/D)*2; long double ans=AA; ans=ans*D/2;
printf("The distance to the iceberg: "); cout.precision(2); cout<<fixed; cout<<ans; printf(" miles.\n"); if (100.00-ans>0.005) printf("DANGER!"); } |
| To admins. Please rejudge | Ilya Filippov (Petrozavodsk SU) | 1348. Пусти козла в огород 2 | 29 ноя 2014 23:34 | 2 |
I got accepted, but my program dont work on test: 1 1 3 3 2 2 1 correct answer - 0 0.41 my program write - 0.41 0.41 please rejudge Edited by author 21.08.2008 16:27 Edited by author 12.07.2009 05:14 Thanks, your test helps me to get AC :) |
| Never print "NO" | Ade | 1647. Раздел острова | 29 ноя 2014 21:09 | 1 |
|
| how to solve in java | Sherxon WIUT | 1902. Нео-Венеция | 29 ноя 2014 18:38 | 1 |
|
| IIIIISSSSOOOOOPPPPP accepted | D05T0N | 1607. Такси | 29 ноя 2014 17:41 | 2 |
kodini yozmiman o'zlaringiz toping Accepted Edited by author 29.11.2014 20:35 |
| WA4 | Amandosov | 2015. Женя переезжает из общежития | 29 ноя 2014 15:07 | 1 |
WA4 Amandosov 29 ноя 2014 15:07 Please give me some tests this is my code: #include <iostream> using namespace std; int main() { long sj,prj1,prj2,n,k,sd[256],prd[256],kom[256],sh[256],prh[256]; cin>>sj>>prj1>>prj2>>n; for(int i=0;i<n;i++) cin>>sd[i]>>prd[i]; cin>>k; for(int i=0;i<k;i++) cin>>kom[i]>>sh[i]>>prh[i];
long max=-1,nh=0,nd=0;
for(int i=0;i<k;i++) if(kom[i]==1) { if(sh[i]<=sj&&(prj1+prh[i]>max)) {max=prj1+prh[i];nh=i+1;nd=0;}} else { if(sh[i]<=sj&&(prj2+prh[i]>max)) {max=prj2+prh[i];nh=i+1;nd=0;} for(int j=0;j<n;j++) if(sh[i]<=int(double(sj)/2.0+double(sd[j])/2.0)&&(prh[i]+prd[j]>max)) {max=prh[i]+prd[j];nh=i+1;nd=j+1;} }
if(nd==0) {if(nh==0) cout<<"Forget about apartments. Live in the dormitory."<<endl; else cout<<"You should rent the apartment #"<<nh<<" alone."<<endl; } else cout<<"You should rent the apartment #"<<nh<<" with the friend #"<<nd<<"."<<endl;
return 0; } Edited by author 29.11.2014 15:08 |
| wr #11 - Time limit exceed. Help me...!!! | Bakhodir Boydedaev | 1100. Таблица результатов | 29 ноя 2014 11:15 | 1 |
import java.util.Scanner; /** * Created by Coder on 25.11.2014. */ public class FinalStandings1100_ { public static void main(String[] args) { Scanner x = new Scanner(System.in); int n = x.nextInt(); int a[][] = new int[n][2]; for (int i = 0; i < n; i++) { for (int j = 0; j < 2; j++) { a[i][j] = x.nextInt(); } } int k = 1; int d = 0 for (int i = 0; i < n; i++) { for (int j = 0; j < n - 1; j++) { if (a[j][k] < a[j + 1][k]) { int v = a[j][d]; a[j][d] = a[j + 1][d]; a[j + 1][d] = v; int c = a[j][k]; a[j][k] = a[j + 1][k]; a[j + 1][k] = c; } } } for (int i = 0; i < n; i++) { for (int j = 0; j < 2; j++) { System.out.print(a[i][j] + " "); } System.out.println(); } } } |
| Pascal 1001 Sqrt | Hawook | 1001. Обратный корень | 29 ноя 2014 10:44 | 2 |
var a: array [0..10] of real; i: integer; begin for i:=0 to 10 do read(a[i]); for i:=0 to 10 do writeln(sqrt(a[10-i]):0:4); end. Why is my answer wrong& Because there are not only 11 numbers. |
| Some Test Case: | Adhambek | 1970. 皇后像廣場 | 29 ноя 2014 07:09 | 1 |
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 2 2 1 1 1 1 2 2 2 2 3 3 3 3 3 3 3 3 3 3 3 3 4 4 4 4 4 4 4 4 4 4 4 4 1 1 1 1 4 4 4 1 5 5 5 2 5 5 5 2 5 5 5 2 3 6 6 6 3 6 6 6 3 6 6 6 2 5 5 5 7 7 4 4 7 7 4 4 7 7 4 4 7 7 4 4 5 5 8 8 5 5 8 8 5 5 8 8 4 4 7 7 9 9 9 8 9 9 9 8 6 6 6 5 6 6 6 5 ans : 1 1 1 1 2 2 2 3 3 3 1 1 1 1 2 2 2 3 3 3 1 1 1 1 2 2 2 3 3 3 1 1 1 1 2 2 2 3 3 3 4 4 4 4 5 5 5 6 6 6 4 4 4 4 5 5 5 6 6 6 4 4 4 4 5 5 5 6 6 6 4 4 4 4 5 5 5 6 6 6 7 7 7 7 8 8 8 9 9 9 7 7 7 7 8 8 8 9 9 9 Edited by author 29.11.2014 07:09 |
| For those who get WA @ Test #16 | TestKiller | 1775. Космический боулинг | 28 ноя 2014 22:25 | 2 |
Test 16 contains the special case, where n = k = 1. The answer is obviously 0.000000. I don't understand why the author has put this special case on test 16, I didn't ever think, that it could be a special case. It rather costs me lots of time to debug. |