ENG
RUS
Timus Online Judge
Online Judge
Задачи
Авторы
Соревнования
О системе
Часто задаваемые вопросы
Новости сайта
Форум
Ссылки
Архив задач
Отправить на проверку
Состояние проверки
Руководство
Регистрация
Исправить данные
Рейтинг авторов
Текущее соревнование
Расписание
Прошедшие соревнования
Правила
Обсуждение задачи
1933
. Пушки к бою!
Показать все ветки
Спрятать все ветки
Показать все сообщения
Спрятать все сообщения
java AC (to speed it up you might want to add a fastscanner)
esbybb
1933
. Пушки к бою!
16 сен 2015 04:47
3
java AC (to speed it up you might want to add a fastscanner)
esbybb
13 сен 2015 07:24
Edited by author 13.09.2015 07:34
Re: java AC (to speed it up you might want to add a fastscanner)
esbybb
13 сен 2015 07:25
3
0 2 3 4 5 6 7
2 0 4 5 6 7 1
3 4 0 6 7 1 2
4 5 6 0 1 2 3
5 6 7 1 0 3 4
6 7 1 2 3 0 5
7 1 2 3 4 5 0
Re: java AC (to speed it up you might want to add a fastscanner)
esbybb
16 сен 2015 04:47
package timus;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.Scanner;
public class p1933 {
public static void main(String[] args) {
InputStream is = System.in;
Scanner sc = new Scanner(new InputStreamReader(is));
int k = 2 * sc.nextInt() + 1;
for (int i = 0; i < k; i++) {
int inx = i;
for (int j = 0; j < k; j++) {
inx++;
if (i == j) {
System.out.print("0 ");
continue;
}
if (inx > k) inx=1;
System.out.print(inx + " ");
}
System.out.println();
}
}
}
No subject
esbybb
1933
. Пушки к бою!
13 сен 2015 07:07
2
No subject
esbybb
13 сен 2015 07:04
Edited by author 13.09.2015 07:35
Re: java AC top 10 solution
esbybb
13 сен 2015 07:07
1
0 1 2
1 0 3
2 3 0
2
0 1 2 3 4
1 0 3 4 5
2 3 0 5 1
3 4 5 0 2
4 5 1 2 0
solution keeps getting marked as incorrect...
noob dev
1933
. Пушки к бою!
31 дек 2014 10:51
1
solution keeps getting marked as incorrect...
noob dev
31 дек 2014 10:51
My solution for "guns for battle" keeps getting marked as wrong and I don't know why. Any ideas?
import java.util.*;
import java.io.*;
public class Gunner{
public static void main(String[] args) throws Exception{
StreamTokenizer in = new StreamTokenizer(new BufferedReader(new InputStreamReader(System.in)));
PrintWriter out = new PrintWriter(System.out);
in.nextToken();
int n = (int)in.nval;
int x = (2 * n) + 1;
int r = 1, c=1;
while( r <= x)
{
while(c <= x){
if(r == c) out.print(0+" ");
else out.print((r-1) + (c-1))+" ");
out.flush();
++c;
}
out.println();
out.flush();
c = 1;
++r;
}
}
}
To admin: wrong English version
ASK
1933
. Пушки к бою!
25 янв 2014 05:05
1
To admin: wrong English version
ASK
25 янв 2014 05:05
"gunners" must be "guns" in "one integer n that is the number of gunners on board"
Hint
Alexey Dergunov [Samara SAU]
1933
. Пушки к бою!
19 ноя 2013 14:10
2
Hint
Alexey Dergunov [Samara SAU]
16 ноя 2012 14:16
This may help you:
http://en.wikipedia.org/wiki/Round-robin_tournament
Re: Hint
Smilodon_am [Obninsk INPE]
19 ноя 2013 14:10
Thanks, it was very useful to getting AC.
What the **** is so simple?
zarfaz
1933
. Пушки к бою!
24 мар 2013 13:19
1
What the **** is so simple?
zarfaz
24 мар 2013 13:19
How come i can write very simple counter to be AC this without any algorithm?
O((2*n+1)*(2*n+1))
Sunnat
1933
. Пушки к бою!
13 ноя 2012 18:23
1
O((2*n+1)*(2*n+1))
Sunnat
13 ноя 2012 18:23
mystery sign '?'
Bekbolot
1933
. Пушки к бою!
10 ноя 2012 18:56
2
mystery sign '?'
Bekbolot
10 ноя 2012 17:24
Guys what does '?' mean?
Re: mystery sign '?'
[SSAU] Igor Szamaszow
10 ноя 2012 18:56
Question mark means that you have submitted something, but since standings are "frozen", no one (except you and your monkey, if one exists) knows verdict of this submit (AC, WA or whatever).
Edited by author 23.12.2012 15:45
Новая тема
Вид форума:
плоский
|
древовидный
|
классический
Сортировка веток:
всплывающая
|
фиксированная
© 2000–2025
Timus Online Judge Team
. Все права защищены.