ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 2171. Two Progressions 2

WA46
Posted by __Andrewy__ 11 Dec 2023 23:29
i think my algo is right but i have problem with overflow in C++.
who can give me good test?

PS: on Pypy i have TL50 using the same algo( And it's very strange because on test
1000000000 18
1 1
2 1
3 1
4 1
5 1
6 1
7 1
8 1
9 1
10 1
11 1
12 1
13 1
14 1
15 1
16 1
17 1
18 1

my algo works <300ms




PS: AC in C++ after many hacking with overflow. I hate this problem because spent a lot of time to fix problem with arighmetic (not algo)

Edited by author 12.12.2023 00:41