public static decimal NextDecimal(bool acceptAnyDecimalSeparator = true) { string token = Cin.NextToken(); if (acceptAnyDecimalSeparator) { token = token.Replace(',', '.'); decimal result = decimal.Parse(token, CultureInfo.InvariantCulture); return(result); } else { decimal result = decimal.Parse(token); return(result); } }
static void Main(String[] args) { r = Cin.NextInt(); c = Cin.NextInt(); int n = Cin.NextInt(); int[,] board = new int[r, c]; for (int i = 0; i < r; i++) { var line = Cin.NextToken(); for (int j = 0; j < c; j++) { if (line[j] == '.') { board[i, j] = 0; } else { board[i, j] = 4; } } } int[,,] buffer = new int[r, c, 2]; for (int i = 0; i < r; i++) { for (int j = 0; j < c; j++) { buffer[i, j, 0] = board[i, j]; } } n = (n - 2) % 4 + 2; int p = tick(buffer, 0, n); for (int i = 0; i < r; i++) { for (int j = 0; j < c; j++) { Cout.Write(buffer[i, j, p] == 0? '.': 'O'); } Cout.Print(""); } }
public static long NextLong() { string token = Cin.NextToken(); return(long.Parse(token)); }
public static int NextInt() { string token = Cin.NextToken(); return(int.Parse(token)); }