Code Submission Evaluation System Login

Datatähti 2018 alku

Start:2017-10-02 00:00:00
End:2017-10-16 00:00:00
 

Tasks | Messages | Scoreboard | Statistics


CSES - Datatähti 2018 alku - Results
History
2018-09-30 20:44:37100
2018-09-30 16:45:52100
2018-09-30 16:18:39100
2018-09-30 16:10:40100
2018-09-30 16:09:160
2018-09-27 12:33:25100
2018-09-26 20:39:27100
2018-09-26 17:10:48100
2017-10-02 09:14:19100
Task:Fraktaali
Sender:ollpu
Submission time:2017-10-02 09:14:19
Language:Ruby
Status:READY
Score:100

Feedback

groupverdictscore
#1ACCEPTED10
#2ACCEPTED10
#3ACCEPTED10
#4ACCEPTED10
#5ACCEPTED10
#6ACCEPTED10
#7ACCEPTED10
#8ACCEPTED10
#9ACCEPTED10
#10ACCEPTED10

Test results

testverdicttime (s)group
#1ACCEPTED0.06 / 1.001details
#2ACCEPTED0.05 / 1.002details
#3ACCEPTED0.06 / 1.003details
#4ACCEPTED0.07 / 1.004details
#5ACCEPTED0.04 / 1.005details
#6ACCEPTED0.06 / 1.006details
#7ACCEPTED0.09 / 1.007details
#8ACCEPTED0.07 / 1.008details
#9ACCEPTED0.05 / 1.009details
#10ACCEPTED0.10 / 1.0010details

Code

n = ARGF.readline.to_i - 1

popcount = ['#']
n.times do |i|
  (2**i).times do |j|
    popcount.push popcount[j] == '#' ? '.' : '#'
  end
end

(2**n).times do |i|
  tmp = ""
  (2**n).times do |j|
    tmp << popcount[i & j]
  end
  puts tmp
end

Test details

Test 1

Group: 1

Verdict: ACCEPTED

input
1
view   save

correct output
#
view   save

user output
#
view   save

Test 2

Group: 2

Verdict: ACCEPTED

input
2
view   save

correct output
##
#.
view   save

user output
##
#.
view   save

Test 3

Group: 3

Verdict: ACCEPTED

input
3
view   save

correct output
####
#.#.
##..
#..#
view   save

user output
####
#.#.
##..
#..#
view   save

Test 4

Group: 4

Verdict: ACCEPTED

input
4
view   save

correct output
########
#.#.#.#.
##..##..
#..##..#
####....
#.#..#.#
##....##
#..#.##.
view   save

user output
########
#.#.#.#.
##..##..
#..##..#
####....
#.#..#.#
##....##
#..#.##.
view   save

Test 5

Group: 5

Verdict: ACCEPTED

input
5
view   save

correct output
################
#.#.#.#.#.#.#.#.
##..##..##..##..
#..##..##..##..#
####....####....
#.#..#.##.#..#.#
##....####....##
#..#.##.#..#.##.
########........
#.#.#.#..#.#.#.#
##..##....##..##
#..##..#.##..##.
####........####
#.#..#.#.#.##.#.
##....##..####..
#..#.##..##.#..#
view   save

user output
################
#.#.#.#.#.#.#.#.
##..##..##..##..
#..##..##..##..#
####....####....
#.#..#.##.#..#.#
##....####....##
#..#.##.#..#.##.
########........
#.#.#.#..#.#.#.#
##..##....##..##
#..##..#.##..##.
####........####
#.#..#.#.#.##.#.
##....##..####..
#..#.##..##.#..#
view   save

Test 6

Group: 6

Verdict: ACCEPTED

input
6
view   save

correct output
##############################...
#.#.#.#.#.#.#.#.#.#.#.#.#.#.#....
##..##..##..##..##..##..##..##...
#..##..##..##..##..##..##..##....
####....####....####....####.....
#.#..#.##.#..#.##.#..#.##.#..#...
##....####....####....####.......
#..#.##.#..#.##.#..#.##.#..#.#...
########........########.........
#.#.#.#..#.#.#.##.#.#.#..#.#.#...
##..##....##..####..##....##.....
#..##..#.##..##.#..##..#.##..#...
####........########........##...
#.#..#.#.#.##.#.#.#..#.#.#.##....
##....##..####..##....##..####...
#..#.##..##.#..##..#.##..##.#....
################.................
#.#.#.#.#.#.#.#..#.#.#.#.#.#.#...
##..##..##..##....##..##..##.....
#..##..##..##..#.##..##..##..#...
...
view   save

user output
##############################...
#.#.#.#.#.#.#.#.#.#.#.#.#.#.#....
##..##..##..##..##..##..##..##...
#..##..##..##..##..##..##..##....
####....####....####....####.....
#.#..#.##.#..#.##.#..#.##.#..#...
##....####....####....####.......
#..#.##.#..#.##.#..#.##.#..#.#...
########........########.........
#.#.#.#..#.#.#.##.#.#.#..#.#.#...
##..##....##..####..##....##.....
#..##..#.##..##.#..##..#.##..#...
####........########........##...
#.#..#.#.#.##.#.#.#..#.#.#.##....
##....##..####..##....##..####...
#..#.##..##.#..##..#.##..##.#....
################.................
#.#.#.#.#.#.#.#..#.#.#.#.#.#.#...
##..##..##..##....##..##..##.....
#..##..##..##..#.##..##..##..#...
...
view   save

Test 7

Group: 7

Verdict: ACCEPTED

input
7
view   save

correct output
##############################...
#.#.#.#.#.#.#.#.#.#.#.#.#.#.#....
##..##..##..##..##..##..##..##...
#..##..##..##..##..##..##..##....
####....####....####....####.....
#.#..#.##.#..#.##.#..#.##.#..#...
##....####....####....####.......
#..#.##.#..#.##.#..#.##.#..#.#...
########........########.........
#.#.#.#..#.#.#.##.#.#.#..#.#.#...
##..##....##..####..##....##.....
#..##..#.##..##.#..##..#.##..#...
####........########........##...
#.#..#.#.#.##.#.#.#..#.#.#.##....
##....##..####..##....##..####...
#..#.##..##.#..##..#.##..
view   save

user output
##############################...
#.#.#.#.#.#.#.#.#.#.#.#.#.#.#....
##..##..##..##..##..##..##..##...
#..##..##..##..##..##..##..##....
####....####....####....####.....
#.#..#.##.#..#.##.#..#.##.#..#...
##....####....####....####.......
#..#.##.#..#.##.#..#.##.#..#.#...
########........########.........
#.#.#.#..#.#.#.##.#.#.#..#.#.#...
##..##....##..####..##....##.....
#..##..#.##..##.#..##..#.##..#...
####........########........##...
#.#..#.#.#.##.#.#.#..#.#.#.##....
##....##..####..##....##..####...
#..#.##..##.#..##..#.##..
view   save

Test 8

Group: 8

Verdict: ACCEPTED

input
8
view   save

correct output
##############################...
#.#.#.#.#.#.#.#.#.#.#.#.#.#.#....
##..##..##..##..##..##..##..##...
#..##..##..##..##..##..##..##....
####....####....####....####.....
#.#..#.##.#..#.##.#..#.##.#..#...
##....####....####....####.......
#..#.##.#..#.##.#..#.##.#..#.#...
view   save

user output
##############################...
#.#.#.#.#.#.#.#.#.#.#.#.#.#.#....
##..##..##..##..##..##..##..##...
#..##..##..##..##..##..##..##....
####....####....####....####.....
#.#..#.##.#..#.##.#..#.##.#..#...
##....####....####....####.......
#..#.##.#..#.##.#..#.##.#..#.#...
view   save

Test 9

Group: 9

Verdict: ACCEPTED

input
9
view   save

correct output
##############################...
#.#.#.#.#.#.#.#.#.#.#.#.#.#.#....
##..##..##..##..##..##..##..##...
#..##..##..##..##..##..##..##....
view   save

user output
##############################...
#.#.#.#.#.#.#.#.#.#.#.#.#.#.#....
##..##..##..##..##..##..##..##...
#..##..##..##..##..##..##..##....
view   save

Test 10

Group: 10

Verdict: ACCEPTED

input
10
view   save

correct output
##############################...
#.#.#.#.#.#.#.#.#.#.#.#.#.#.#....
view   save

user output
##############################...
#.#.#.#.#.#.#.#.#.#.#.#.#.#.#....
view   save