Arnob's blog

By Arnob, history, 14 months ago, In English

অদ্ভুত coders of Codeforces!!! (অদ্ভুত is a commonly used word in KUET meaning amazing)

We are thrilled to invite you to to participate in Replay of Ostad Presents Intra KUET Programming Contest 2023 which will be held on Tuesday, October 10,2023 at 19:00 (UTC+6).

You will have 5 hours to solve 13 problems. It is a beginner friendly contest. Teams preferred.

Thanks to the setters and testers of the contest: Mohaimin66, RUDRA_DAS, Likhon5, AngryBaymax, BrehamPie, Arnob, MinhazIbnMizan, weavile, Parvej, Noctambulant, Sabbir1807070, ShorifulSoumic, NM_Mehedy, Emon72, Creeping_Death_, brute__force__, _return_void_, Rafi, UmSuperNoob.

We hope you will enjoy the problemset.

UPD: Editorial

  • Vote: I like it
  • +41
  • Vote: I do not like it

| Write comment?
»
13 months ago, # |
  Vote: I like it +8 Vote: I do not like it

There's a typing mistake. It will be "Tuesday, October 10,2023"

  • »
    »
    13 months ago, # ^ |
      Vote: I like it +1 Vote: I do not like it

    Updated. Thanks for spotting. Sorry for the inconvenience.

»
13 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Auto comment: topic has been updated by Arnob (previous revision, new revision, compare).

»
13 months ago, # |
  Vote: I like it 0 Vote: I do not like it

I can't see any register button

  • »
    »
    13 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Registration will start at 1:00 pm.

»
13 months ago, # |
  Vote: I like it 0 Vote: I do not like it

How to solve problem I???

  • »
    »
    13 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Put 'a' on every leaf and 'b' on every non-leaf or vice versa. It was out solution but it is not correct. You can create more optimal solutions using other characters. And I have no idea how to solve it. One case where our solution fails:

    case
»
13 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Will we get any editorial?

  • »
    »
    13 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Unfortunately no, You can ask for solution ideas of some particular problem here, We'll try respond.

  • »
    »
    13 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Editorial of the contest has been posted. Check it out.

»
13 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Code of problem k is provided below can anyone tell me why it shows wrong answer on test 2 .i have observed if sum of digits is divisible by 3 then that number is divisibld by 3 .so i make an digits array then count number of subarrays having digitsum 3 .#include

include

include

using namespace std;

int solution(vector arr, int n, int k) { int ans = 0; map<int, int> map; map[0] = 1; int sum = 0; int rem = 0; for (int i = 0; i < n; i++) { sum += arr[i]; rem = sum % k; if (rem < 0) { rem += k; } if (map.find(rem) != map.end()) { ans += map[rem]; } map[rem]++; } return ans; }

int main() { int t; cin >> t; while(t--){ int m,n; cin >> m>>n; vectorarr(m); string str = to_string(n); // int arr[m]; for (int i = 0; i < m; i++) { arr[i]=str[i]-'0'; } int k; k=3; cout << solution(arr, m, k) << endl; } return 0; }

  • »
    »
    13 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    The input $$$n$$$ cannot be stored in a 32 bit integer.

»
13 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Update

Editorial of the contest will be posted soon.

»
13 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Auto comment: topic has been updated by Arnob (previous revision, new revision, compare).

»
12 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Arnob Brother, in L. not-incomplete question, why x constraint in 12 to 14?

question link: https://codeforces.me/gym/104663/problem/L?fbclid=IwAR3ZRc0KoevcYUKfBj2CT8GCs1kCBvxSsvfzXzGn6xo8jUCP_tK1o8IWTJI

  • »
    »
    12 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    We tried to keep it realistic. Each semester normally consists of 12 to 14 weeks.