| Show all threads Hide all threads Show all messages Hide all messages |
| Test for WA5 | Vladimir Plyashkun [USU] | 1930. Ivan's Car | 24 Jul 2020 17:15 | 2 |
try this: 3 2 1 3 2 3 1 2 answear: 1 You realy snooze a lot my code have wrong in test5 and the ansear this test is correct:( Please do not waste the rest of your time Edited by author 25.07.2020 15:37 Edited by author 25.07.2020 15:37 |
| TLE18? | Михаил | 2062. Ambitious Experiment | 23 Jul 2020 19:51 | 1 |
TLE18? Михаил 23 Jul 2020 19:51 |
| How do you solve this problem? | Alex Tolstov (Vologda STU) | 1670. Asterisk | 23 Jul 2020 04:12 | 2 |
Let's construct the resulting sequence from N to 1 by keeping merged segments in stack. What is the condition for merging two segments? They are touching by one of the sides (r_1+1=l_2 or r_2+1=l_1). The last part of the solution is trivial (make a tree of merges, ...). |
| solve by bitmask | Namjmus Sakib Rashid | 1005. Stone Pile | 22 Jul 2020 19:32 | 1 |
|
| No subject | Yuzhen | 1930. Ivan's Car | 22 Jul 2020 05:25 | 1 |
can someone please provide test #6? |
| WA 62 hint | UstinovG`~ | 1593. Square Country. Version 2 | 21 Jul 2020 21:42 | 1 |
check if answer = 2 (Ferma-Euler theorem) |
| Runtime error (access violation)?? | Anup Ghosh | 1001. Reverse Root | 21 Jul 2020 19:21 | 1 |
Why i am getting Runtime error (access violation) in test case 9? Edited by author 21.07.2020 19:22 Edited by author 21.07.2020 19:22 |
| I don't understand the problem | Dmitry Rudenko | 1207. Median on the Plane | 21 Jul 2020 14:24 | 2 |
Why do they want me to do? How to understand "equal-sized parts"? Same amount of dots on both sides Edited by author 21.07.2020 14:25 |
| leading zeroes allowed?? | Debagnik Roy | 1044. Lucky Tickets. Easy! | 20 Jul 2020 03:02 | 2 |
are leading zeroes allowed? for example... will 0110 be counted as a valid 4 digit lucky number? |
| Very Easy Solution Using C++,brute force...! | Shahariar | 1197. Lonesome Knight | 19 Jul 2020 22:00 | 1 |
#include<bits/stdc++.h> using namespace std; //input section #define si1(x) scanf("%d",&x) //one integer #define si2(x,y) scanf("%d%d",&x,&y) //two integers #define si3(x,y,z) scanf("%d%d%d",&x,&y,&z) //three integers #define sl(x) scanf("%lld",&x) //long long int #define sul(x) scanf("%llu",&x) //unsigned long long #define ss(x) scanf("%s",s) //string #define sd(x) scanf("%lf",&x) //double //output section #define pf printf #define pfi(x) printf("%d\n",x) #define pfl(x) printf("%lld\n",x) #define pfd(x) printf("%lf\n",x) #define nl printf("\n") //data type #define ll long long int #define ld long double #define ull unsigned long long //general #define pb push_back #define mp make_pair #define f first #define s second #define all(x) x.begin( ),x.end( ) #define sv(x) memset(x, 0, sizeof(x)) #define PI 3.1415926535897932384626 #define mod 1000000007 //loop #define lp(a,b) for(int i=a;i<b;i++) //assending order #define lpr(a,b) for(int i=b;i>=a;i--) //decending order #define pl(a) pair<ll, ll>a #define ppi(a) pair<int,int>a #define vec(v) vector<int>v #define vi(v,itr) vector<int>::iterator itr=v.begin( ); void solve( ) { int cnt=0; char s,h; cin>>s>>h; int p,q; p=(int)s-96; q=(int)h-48; if((p+1)>=1 && (p+1)<=8 && (q-2)>=1 && (q-2)<=8) ++cnt; if((p-1)>=1 && (p-1)<=8 && (q+2)>=1 && (q+2)<=8) ++cnt; if((p-1)>=1 && (p-1)<=8 && (q-2)>=1 && (q-2)<=8) ++cnt; if((p+1)>=1 && (p+1)<=8 && (q+2)>=1 && (q+2)<=8) ++cnt; if((p+2)>=1 && (p+2)<=8 && (q-1)>=1 && (q-1)<=8) ++cnt; if((p-2)>=1 && (p-2)<=8 && (q+1)>=1 && (q+1)<=8) ++cnt; if((p-2)>=1 && (p-2)<=8 && (q-1)>=1 && (q-1)<=8) ++cnt; if((p+2)>=1 && (p+2)<=8 && (q+1)>=1 && (q+1)<=8) ++cnt; cout<<cnt<<endl; } int main( ) { //code by noob coder BD (Shahariar,CSE,RUET-19)
ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
//freopen("input.txt","r",stdin); //freopen("output.txt","w",stdout); int t=1; cin>>t; while(t--) { solve( ); } return 0; } |
| Hint? | fantasy | 1560. Elementary Symmetric Functions | 18 Jul 2020 16:50 | 10 |
Hint? fantasy 24 Sep 2007 17:27 Could you please give me some hints? All my submissions get the same answer "time limit exceeded". Cumulative Frequency Tables Can you explain it more concretly?With me, "Cumulative Frequency Tables" looks strange. Re: Hint? Vedernikoff Sergey 25 Sep 2007 18:09 I think it is more usual to use Fenwick trees Now I confirmed Cumulative Frequency Tables and ideas of http://www.chiark.greenend.org.uk/~sgtatham/algorithms/cumulative.htmlpractically having AC 1.37 not very bad because used iostream. Tables better than Fenwick trees because they used only arrays. For adopting the method I used formulas a[k]=f(t0,t1,t2,...,tk) where tk=sum of A[i]^k and is additive contrary to a[k]. During a long time had WA7 because forgotten that abs does't work in __int64 and we must build our own abs for __int64. After cosmetic modifications have 0,843 Ac ant 3-th. Edited by author 27.09.2007 14:24 Edited by author 27.09.2007 14:31 Edited by author 27.09.2007 14:51 Edited by author 27.09.2007 14:52Re: Hint? Vedernikoff Sergey 29 Sep 2007 03:25 For using Fenwick trees you also need only array, and, moreover, only one array! I used 4 interval trees. One having Ai, another having Ai^2, another Ai^3 and the last one Ai^4. This way you can compute Al^k + ... + Ar^k in log(N) for k=1..4. This info is enough to calculate S(L..R, K). It can be easily done using Segment tree. Try to store this s[0...4] for each node in segment tree. Now you can find a nice formula using convolution to merge two nodes. |
| Checker failed | defntvdm | | 16 Jul 2020 21:07 | 1 |
|
| Таблица | EagIe | | 15 Jul 2020 12:09 | 1 |
Есть ли скрипт, позволяющий сравнивать пользователей в виде таблицы по задачам с "+"("АС") - решена, "-"(WA5, TL12 ...) - не решена, " " - не пробовал? Или что-то в этом духе? Простите, за мои плохие знания английского языка. Is there a script that allows you to compare users in the form of a table for tasks with "+" ("as") - solved, "- "(WA5, TL12 ...) - not solved, "" - not tried? Or something like that? Sorry for my poor English skills. |
| Wrong answer on 6th test. Please help:) | Georgi_georgiev | 1119. Metro | 12 Jul 2020 13:24 | 14 |
Edited by author 04.06.2009 17:47 Edited by author 04.06.2009 17:47 I found my stupid mistake but here are some tests: 2 2 1 1 2 2 2 2 1 2 2 1 2 2 2 1 1 2 2 2 2 2 2 1 2 2 6 6 1 6 1 6 6 1 1 6 6 6 18 1 2 1 3 1 4 1 5 1 6 2 3 2 4 2 5 2 6 3 4 3 5 3 6 4 5 2 1 3 2 4 3 5 4 6 5 6 6 6 1 6 2 5 3 4 4 3 5 2 6 1 1 1 1 1 1 1 1 0 10 1 1 1 1 10 1 5 1 1 2 1 3 1 10 1 5 1 10 6 8 5 2 1 5 2 1 4 5 1 6 10 1 10 2 10 4 10 5 20 5 4 3 2 1 4 6 5 2 3 2 1 9 3 7 4 10 2 2 5 9 2 8 4 9 1 8 1 3 3 5 2 7 5 4 5 9 5 6 1 10 5 20 10 1 1 1 1 3 9 3 7 1 6 3 4 4 9 2 7 3 5 5 4 2 4 3 9 4 3 2 6 1 1 2 3 1 3 3 10 4 7 5 Can you figure out where you are wrong? Would you please print the test's result out? Answer to above test 1) 341 2) 341 3) 283 4) 341 5) 1141 6) 1141 7) 907 8) 1141 9) 141 10)200 11)1041 12)1041 13)1424 14)1266 15)1266 Hope that helps :) Prabhjot Singh No subject [TH2011/03]Ho Vo Thanh Trong 22 Nov 2012 15:32 10 6 8 5 2 1 5 2 1 4 5 1 6 10 1 10 2 10 4 For this case, there can be only 2 diagonal crossings ((2,1) & (5, 2)), right? but the answer (1424) says 3. Edited by author 05.12.2012 16:23 Thank you wery much, there are very good tests, I got AC :) tanhk you the test are graet thank you very much for tests!!! Thanks! You are breathtaking) |
| All forum test passed, by wa21 | MassterMax🤔`~ | 1346. Intervals of Monotonicity | 12 Jul 2020 07:04 | 2 |
It can help you: Test: 1 13 0 -10 -7 -10 1 -5 6 -10 -8 -8 -7 -10 1 Answer: 6 Edited by author 04.04.2018 15:40 |
| Hint WA7 | Vladimir [SPbETU] | 1588. Jamaica | 11 Jul 2020 01:28 | 3 |
Hint WA7 Vladimir [SPbETU] 18 Oct 2013 00:01 Use printf("%.0lf\n", floor(answer + .5)); for output answer ;) |
| wa#7, some tests, plz | Megatron | 1523. K-inversions | 10 Jul 2020 21:08 | 9 |
I know where I am wrong. AC: 0.078 681 KB remember to % Edited by author 14.03.2011 13:05 This test is going to kill me. I know that I should do % but it doesn't help anyway. I'm not strong in module algebra is (a + b + c) % 10^9 ?== (((a % 10^9 + b) % 10^9 + c) % 10^9 ? Excuse me, can you tell me where you were wrong? 40 20 40 39 38 37 36 35 34 33 32 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 ans: 846528820 your ans is correct , but k <= 10... try this test case : 40 10 40 39 38 37 36 35 34 33 32 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 ans : 847660528 |
| WA task1263 | AlexStrong | 1263. Elections | 9 Jul 2020 23:16 | 1 |
I don’t understand what is the mistake here. Help pls string[] val = Console.ReadLine().Split(' '); double[] k = new double[10000]; for(int i = 0; i < Convert.ToInt32(val[1]); i++) { string s = Console.ReadLine(); k[Convert.ToInt32(s) - 1]++; } double swap = 0; for(int i = 0; i < k.Length-1; i++) { for(int j = i + 1; j < k.Length - i - 1; j++) { if (k[j+1] > k[j]) { swap = k[j+1]; k[j+1] = k[j]; k[j] = swap; } } } for (int i = 0; i < Convert.ToInt32(val[0]); i++) {
Console.WriteLine(string.Format(CultureInfo.InvariantCulture, "{0:N2}", (100 * k[i]) / Convert.ToDouble(val[1]))+"%"); }
|
| bug in checker | 🐲Moysenko🐲 | 1474. About Frogs | 9 Jul 2020 00:07 | 1 |
In python 3.6 extra print() in the end of the program gives you WA2. Therefore you should output "8 1 3 4 2 0 1 3 2" instead of "8 1 3 4 2 0 1 3 2 " |
| помогите пожалуйста | andrew354 | 1000. A+B Problem | 6 Jul 2020 14:00 | 2 |
a = int(input()) b = int(input()) print(a+b) вы считываете данные из двух строк. А надо из одной. Т.е. первые две строки надо заменить на одну строку "a, b = map(int, input().split())". |