ENG  RUS Timus Online Judge
Online Judge
Problems
Authors
Online contests
Site news
Webboard
Problem set
Submit solution
Judge status
Guide
Register
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1007. Code Words

Tests are weak.
Posted by Teacher30 1 Oct 2008 20:53

#include <stdio.h>

int main()
{
int i, k, N = 999;

printf("%d\n", N);
for (k = 0; k < 2001; k++)
{
for (i = 1; i <= N - 1; i++)
if (i == 997 || i == 503)
putc('0', stdout);
else
putc('1', stdout);
puts("");
}
return 0;
}

#include <stdio.h>

int main()
{
int i, k, N = 999;

printf("%d\n", N);
for (k = 0; k < 2001; k++)
{
for (i = 1; i <= N; i++)
if (i == 501)
putc('0', stdout);
else
putc('1', stdout);
puts("");
}
return 0;
}

#include <stdio.h>

int main()
{
int i, k, N = 999;

printf("%d\n", N);
for (k = 0; k < 2001; k++)
{
for (i = 1; i <= N + 1; i++)
if (i == 997 || i == 503)
putc('0', stdout);
else
putc('1', stdout);
puts("");
}
return 0;
}

#include <stdio.h>
#include <string.h>

int main()
{
int i, k, N = 999;

printf("%d\n", N);
for (k = 0; k < 2001; k++)
{
for (i = 1; i <= N - 1; i++)
if (i == 1 || i == 497)
putc('0', stdout);
else
putc('1', stdout);
puts("");
}
return 0;
}

#include <stdio.h>

int main()
{
int i, k, N = 999;

printf("%d\n", N);
for (k = 0; k < 2001; k++)
{
for (i = 1; i <= N; i++)
if (i == 499)
putc('0', stdout);
else
putc('1', stdout);
puts("");
}
return 0;
}

#include <stdio.h>

int main()
{
int i, k, N = 999;

printf("%d\n", N);
for (k = 0; k < 2001; k++)
{
for (i = 1; i <= N + 1; i++)
if (i == 2 || i == 500)
putc('0', stdout);
else
putc('1', stdout);
puts("");
}
return 0;
}

Edited by author 01.10.2008 20:53

Edited by author 01.10.2008 20:53