last day (14 days later) » 

10:03
I have to do this problem
I have done the code
but there are some test cases it is failing in
i have debugged it long enough still not able to guess where it is going wrong
it is giving correct answers to many test cases
still some are failing
Can someone ?
Anonymous
We don't do people's homework for them
No i have done it
#include<stdio.h>
#include<stdlib.h>
#include<string.h>




int main(){



   int test_cases;


   scanf("%d" , &test_cases);


   while(test_cases--){


   int length;
   int flips;

    scanf("%d %d" , &length , &flips);

    int string[length];
    int occurence[length+1];
    memset(occurence,0,sizeof(occurence));


    int i = 0;
    int way1 = 0;
    int way0= 0;
    int count1 = 1;
    int count0 = 0;
    int temp;
    int count = 1;

    int thatmax = 0;




    while(i<length){




        scanf("%1d" , &string[i]);
I have made the code
and it is working too
Some test cases are giving false and i have debugged for hours
and then asked for help
@Mego
Anonymous
10:19
We're not a homework help service or a code debugging service. If you can't figure out why your code is working, write a good question on SO.
Sir, @mego I saw your profile and it is there you solve programming challenges and puzzle , this is a math puzzle
it is just a string of 1's and 0's will be given
like
11000111000
And we are allowed k number of flips
a flip mean we can change 0 to 1 , or 1 to 0
Anonymous
@SurajJain I do like to solve programming challenges and puzzles, but your incessant pestering has convinced me not to do your programming work for you.
@suraj I'm willing to attempt the challenge on my own, but I won't give you the code.
It is ok, i Want test cases
in which my fails
nothing else
i have done the code
See there are 9 input files
each having 1000's of test cases
Anonymous
10:23
@SurajJain Please take this to another room. You're disrupting on-topic conversations.
and mine is giving correct answer for 5 of them
@Mego Here it says general discussion for codegolf.stackexchange.com
and mine comes under it
no, it doesn't. The challenge is posted elsewhere, for one, not on this site.
If i post it here, then
I am not saying do my homework or this , i do not even want your code, i was just asking why is mine failing which test cases
so that i could debug it
and nothing else
if you knew this problem from someelse site
then you'll be breaking copyright
please give me link i would see there myself, but i am not able to find such a simple problem on other competetive sight
no i wont be
You can't just post someone else's challenge here
I would make it min
just it just a string of 1's and 0's will be given
like
11000111000
And we are allowed k number of flips
a flip mean we can change 0 to 1 , or 1 to 0
that it all
Anonymous
54 messages moved from The Nineteenth Byte
@Mego Thanks
, output a single line containing a single integer, which is the minimum possible size of maximum block of consecutive days of the same status achievable.
@JanDvorak
10:29
Mego has removed Mego from the list of this room's owners.
@Leo Can you help me?
Anonymous
3 messages moved from The Nineteenth Byte
Can someone help me
Leo
Leo
Sounds complicated, I don't have the time right now... Though, I think that if you take this idea and use it to write a challenge for this site it could entertain many people :) Just be sure not to simply copy the problem and to post the challenge on the sandbox first, for improvements.
It is not really compliacted
I will try to make a challenge out of it
11:03
Yeah if you make a good challange BUT DO NOT limit it to C or whatever. If you give a bonus for using languages such as C/++ Ruby and other more real languages you may get a C language. Define real as languages in the first tab of TIO tio.run/nexus
Give a 10-15% byte count reducer

last day (14 days later) »