This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <cmath> | |
#include <algorithm> | |
#include <iostream> | |
#include <string> | |
#include <vector> | |
#define REP(i, n) for ( int i = 0; i < n; i++ ) | |
using namespace std; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// clear time: 00:30 | |
#include <iostream> | |
#include <string> | |
#include <vector> | |
#define REP(i, n) for ( int i = 0; i < n; i++ ) | |
using namespace std; | |
void dump(vector<string> f, int x = -1, int y = -1) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
001: 3-d | |
** ** ** ** ** ** | |
/** /** /** /** /** /** | |
/** /** ***** /** /** ****** *** ** ****** ****** /** /** | |
/********** **///** /** /** **////** //** * /** **////**//**//* /** ****** | |
/**//////**/******* /** /**/** /** /** ***/**/** /** /** / /** **///** | |
/** /**/**//// /** /**/** /** /****/****/** /** /** /**/** /** | |
/** /**//****** *** ***//****** ***/ ///**//****** /*** ***//****** | |
// // ////// /// /// ////// /// /// ////// /// /// ////// |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
M=-1,v=y=0,1,0;a,N=Array,gets.to_i;D=N*N;x,f=N-1,a.new(N) {a.new};D.times{|i|f[y][x]="%*d"%[D.to_s.size,D-i,c=x+M[v],d=y+M[3-v]];v=c*d<0||c==N||d==N||f[d][c]?(v+1)%4:v;x+=M[v];y+=M[3-v]};f.map{|y|puts y*' '} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// start: 21:57 | |
// AC: 00:12 | |
#include <cstdio> | |
#include <climits> | |
#include <iostream> | |
#include <vector> | |
#include <queue> | |
#define REP(i, n) for ( int i = 0; i < n; i++ ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// start: 21:57 | |
// AC: 00:12 | |
#include <cstdio> | |
#include <climits> | |
#include <iostream> | |
#include <vector> | |
#include <queue> | |
#define REP(i, n) for ( int i = 0; i < n; i++ ) | |
#define INF INT_MAX |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@mixin fizzbuzz_content($n) { | |
$fb: '', '', Fizz, '', Buzz, Fizz, '', '', Fizz, Buzz, '', Fizz, '', '', FizzBuzz; | |
$cont: ''; | |
@for $i from 1 through $n { | |
@if nth($fb, ($i - 1) % 15 + 1) == '' { | |
$cont: $cont + $i + ' ' | |
} @else { | |
$cont: $cont + nth($fb, ($i - 1) % 15 + 1) + ' '; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@mixin fizzbuzz_nth($fs: 18px) { | |
li { | |
font-size: $fs; | |
display: inline-block; | |
} | |
li:nth-child(3n), li:nth-child(5n) { | |
font-size: 0; | |
} | |
li:nth-child(3n):before { | |
font-size: $fs; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@mixin fizzbuzz_content($n: 100) { | |
$fb: '', '', Fizz, '', Buzz, Fizz, '', '', Fizz, Buzz, '', Fizz, '', '', FizzBuzz; | |
$cont: ''; | |
@for $i from 1 through $n { | |
@if nth($fb, ($i - 1) % 15 + 1) == '' { | |
$cont: $cont + $i + ' ' | |
} @else { | |
$cont: $cont + nth($fb, ($i - 1) % 15 + 1) + ' '; | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@mixin fizzbuzz_not_remainder($n: 100) { | |
$fb: '', '', Fizz, '', Buzz, Fizz, '', '', Fizz, Buzz, '', Fizz, '', '', FizzBuzz; | |
$cont: ''; | |
@for $i from 1 through $n { | |
$tmp: $i; | |
@while $tmp > 15 { | |
$tmp: $tmp - 15; | |
} | |
@if nth($fb, $tmp) == '' { | |
$cont: $cont + $i + ' '; |