| Show all threads Hide all threads Show all messages Hide all messages |
| This problem is simpler than the rating he has )) | KostyaRychkov`~ | 1091. Tmutarakan Exams | 31 Jul 2020 21:31 | 1 |
The most important thing is that you shouldn't keep finding sets when you've already found 10,000. Then you can optimize a little simple search and you get ACC. Good luck! |
| INPUT | Berdnikov Sergey | 1242. Werewolf | 31 Jul 2020 21:16 | 2 |
INPUT Berdnikov Sergey 26 Jan 2017 04:10 To enter variables correctly is more difficult then solve this problem. I think, it isn't very good idea to issue input like this. |
| What is test 5? | mr.erfan | 1930. Ivan's Car | 31 Jul 2020 21:05 | 1 |
please help me. i have some problems in test 5. please help me! |
| Very Simple Only a DFS!! | Pooya | 1039. Anniversary Party | 31 Jul 2020 13:58 | 10 |
Why not BFS? Maigo Akisame (maigoakisame@yahoo.com.cn) 10 Jun 2004 04:07 my DFS is TLE does DFS don't TLE? can someone give me some help? ppsxy you should write DP of course. what's more my program doesn't TLE.Instead it WAs on #12 ناموسا ایرانی هستی؟ ای کلک |
| Easy Approach HINT | Sai Teja Chokkarapu | 1353. Milliard Vasya's Function | 31 Jul 2020 12:42 | 1 |
-> think of doing this problem first -> count of n digits numbers whose sum is equal to x. ->First try to think for smaller numbers less than 1000 i.e from 1 to 999. -> Create the tree for the same i.e numbers less than 999. -> after finding f(n,sum)(n is the number of digits and sum is the required sum). -> you can find f(9,sum)for all numbers less than 1000000000. -> now finally you need to handle for one number 1000000000. Cheers Edited by author 31.07.2020 12:43 |
| #WA 3 | LaVuna [KHNURE] | 2148. Insane Shot | 30 Jul 2020 14:25 | 2 |
#WA 3 LaVuna [KHNURE] 28 Jun 2020 20:06 I calculated two points of intersection from line that go through two points((x_mid, y_mid) and (x_circle,y_circle)) and then picked nearest two given two points.But this gives me WA3. What should i do? Re: #WA 3 Kairom `Ekexity 💻 30 Jul 2020 14:25 You need to check the possibility of a shot. The enemy may be out of your sight. |
| Rating | kostan3 | | 29 Jul 2020 23:41 | 1 |
Rating kostan3 29 Jul 2020 23:41 Is it possible to return my profile to the rating and under what conditions? Edited by author 04.08.2020 00:40 |
| I don't under the meaning of this problem.Could somebody explain? | Yuanming YU, Frank | 1261. Tips | 28 Jul 2020 19:57 | 5 |
A programmer has a set of banknotes valued 1, 3, 9 ..., 3^k,... one each. He has to pay N in a restaurant (provided) He must pay that much M so: M can be paid with banknotes the programmer has, i.e. he cannot pay 5, because he does not have 2 bank notes with value of 1; and M-N must be represented the same way, i.e. if N is 4, M cannot be 9, because 5 cannot be represented as a sum of 3^K, one or less for each K. So if asked 4, a programmer must pay 13, 13=9+3+1, 13-4=9. I hope you will understand this clumsy explanation. Thanks for the explanation. here 4 can be represented as 1+3^1 . why i have to pay 13 ? I failed to understand the problem ? |
| Step to solve this | rayhan28 | 1079. Maximum | 26 Jul 2020 04:49 | 1 |
1.declare an array.size 1000000 2.genarate all number according the problem description. 3.input the value n. 4.declare a container and take the value of the array .vector<int>v(a,a+n); 5.sort the container. 5.at last print v[n]; Edited by author 26.07.2020 04:57 Edited by author 26.07.2020 04:58 |
| TLE #17 - Hint | LaVuna [KHNURE] | 1846. GCD 2010 | 25 Jul 2020 14:27 | 1 |
If you have TLE on 17-th test , try to use clang compiler. For me it worked)) |
| 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 (SPb SPU) | 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 | Hardes1`~ | 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; } |