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 1434. Buses in Vasyuki

Big test if you've got TLE!
Posted by Petr Huggy (Pskov) 25 Nov 2010 12:13
Here is test generator that helped me beat TLE!

-------------------
#include <stdio.h>

void test1()
{
    FILE* stream = freopen ("BusRoutes.big", "w", stdout);
    const int n = 1000;
    const int endp = 100000;
    int cur = endp;
    printf ("%d 100000\n", n);
    for (int i = 0; i < n; ++i) {
        int cnt = (cur == 100) ? 100 : 200;
        printf ("%d ", cnt);
        for (int j = 0; j < cnt; ++j) {
             printf ("%d ", cur--);
        }
        printf ("\n");
        cur += 100;
    }
    printf ("1 %d\n", endp);
    fclose (stream);
}

int main()
{
    test1();
    return 0;
}
-------------------
Re: Big test if you've got TLE!
Posted by DarksideCoder 6 Apr 2022 11:52
It didn't work

Although my solution finish in the time limit,it get TLE in the test32