|
|
Показать все ветки Спрятать все ветки Показать все сообщения Спрятать все сообщения | I tried this but got wrong answer any idea?? | sharada lakshmanan | 1694. Слова-убийцы | 29 июн 2011 18:55 | 1 | #include <iostream> using namespace std; int main() { int m,n,k; cout<<"enter m n k "; cin >> m >> n >> k; if ( m>0 && m<19 ) { if ( k>1 && k<6 ) { if ( n>0 && n<23 ) { cout<<(m+k+n); } else cout<<"enter n between 0 and 23"<<endl; } else cout<<"enter k between 1 and 6"<<endl; } else cout<<"enter m between 0 and 19"<<endl; return 0; } | Test 12 | bsu.mmf.team | 1694. Слова-убийцы | 11 янв 2010 23:16 | 2 | Test 12 bsu.mmf.team 27 ноя 2009 06:18 What the answer to test: m k n 12 3 2 18 I got 53 and WA | WA 20 | Cat36 | 1694. Слова-убийцы | 12 июн 2009 11:33 | 1 | WA 20 Cat36 12 июн 2009 11:33 Maybe, someone knows, what is it? | 2 ADMINS: Weak tests!!! | Vedernikoff Sergey (HSE: АОП) | 1694. Слова-убийцы | 19 мар 2009 08:16 | 6 | I'm pretty sure that testset for this problem doesn't contain maxitests with k=2 and n=22. Otherwise how could program that works about 20sec. on my computer get AC on timus??? Then what supercomputers does timus use??? =) I have Pentium Duo Centrino 3.2 Or you want to say that the whole difference is due to compilers? (I use MSVS C++ 8.0) you can easily test how fast it works on timus online judge.... dont read data from input , run your program when m = 18, k = 2 , and n = 22. I'm sure your solution is fast enough , for example, when I'm using STL classes, program works on my PC 10 times slower than on online judge... use Release option in your compiler Site news contain information about testing computer: Core 2 Quad Q6600 (frequency 2400 MHz, L2 cache 8 MB, bus frequency 1066 MHz). | what is wrong?????????(hahahaha :-)!!! ) | arhats | 1694. Слова-убийцы | 14 мар 2009 13:56 | 1 | #include<iostream> using namespace std; int main() { int n,k,m,b; cin>>m; cin>>k; cin>>n; b=m+k+n; cout<<b; return 0; } |
|
|
|