rizzgod_tourist's blog

By rizzgod_tourist, history, 4 months ago, In English

Do you know any resources or techniques for visualizing recursion? I'm struggling to understand the backtracking process, especially in problems like bracket generation. I want to know exactly how the function calls are being made under the hood, what's being added, and when backtracking occurs.

I'd appreciate any suggestions and advice on resources and techniques to help me better understand recursion and backtracking. Thank you!"

Full text and comments »

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

By rizzgod_tourist, history, 4 months ago, In English

Hello Codeforces community,

I'm reaching out for help with a Rust programming issue that's been frustrating me for a while. As a beginner in Rust, I'm struggling to understand how to read complex inputs, especially when it comes to competitive programming.

I've been trying to learn Rust, but I'm finding it challenging to grasp the concept of input/output handling. I've watched YouTube tutorials, but they only cover basic examples like "Hello, World!" or reading simple integers , also i have tried exploring some of the udemy courses but they are teaching all the complex stuff but they are not telling how to read input . However, when it comes to more complex inputs, such as reading multiple test cases with varying input formats, I'm lost.

I've tried to convert my C++ code to Rust using AI-powered tools like Blackbox AI and ChatGPT, but the generated code doesn't work as expected. I've also used C++ to Rust converters, but the resulting code doesn't produce any output.

Here's my C++ code that I'm trying to convert to Rust:

c++ Code

The AI-generated Rust code is:

rust Code

However, this code is giving me an "idleness limit" error, which I've never seen before in C++ or Java.

If someone could provide guidance on how to read complex inputs in Rust or share a working code for this problem without using templates, I would greatly appreciate it. I'm eager to learn and understand the underlying concepts, rather than just copying and pasting code.I don't want to use templates , first i want to write the raw code i don't care about writing some more line of code but i want to know everything from scratch also when i will become somewhat decent then i will write my own template i don't want to blindly follow some template and simply say that reading input and output is complicated in rust.

I've searched for Rust submissions for this problem (https://codeforces.net/contest/1876/problem/A), but out of nearly 7,000 submissions, I only found 6-7 in Rust, and they were all using templates for reading inputs.

Please help me overcome this hurdle, and I'll be grateful for any resources or explanations that can aid my learning journey in Rust.

Full text and comments »

  • Vote: I like it
  • 0
  • Vote: I do not like it