En windows 8.1 Cuando descargue un archivo .chm de internet me sale la ventana
Advertencia de seguridad de abrir archivo y cuando lo abro me lo bloquea el contenido
La solución:
Desmarcar la opcion de esa ventana: preguntar siempre antes de abrir el archivo.
Otra solución
Clic derecho en el archivo: Propiedades y en la ficha general hacer un check en desbloquear.
http://answers.microsoft.com/en-us/windows/forum/windows_8-files/windows-8-64bit-cant-open-chm-files/7dec5d51-f621-4753-ab13-ea3b59a07cb8?auth=1
https://social.technet.microsoft.com/Forums/en-US/20700886-2000-4c52-b706-aa1fb32d3dfb/cant-view-chm-file-contents?forum=W8ITProPreRel
Mostrando entradas con la etiqueta problemas. Mostrar todas las entradas
Mostrando entradas con la etiqueta problemas. Mostrar todas las entradas
martes, 28 de junio de 2016
martes, 31 de mayo de 2016
Problemas Programacion
CODEFORCES
Problema de numeracion bases cuidado con los overflows
http://www.codeforces.com/contest/602/problem/A
// SRM 590 DIV2-I
problema de string hallar alguna ocurrencia de 5 'o's consecutivos en linea vertical horizontal o diagonal \ o diagonal / (n no es menor que 5)
public class FoxAndGomoku
{
public string win(string [] b)
{
int n = b.Length;
char[][] bb = new char[n][];
for(int i = 0; i < n ; i++)
bb[i] = b[i].ToCharArray();
for(int i = 0; i < n ; i++)
if( b[i].IndexOf("ooooo")>=0)
return "found";
for(int j = 0; j < n ; j++)
{
for(int i = 0; i < n ; i++)
{
int r = i, s=j, count = 0;
while( r < n && s >=0)
{
if(bb[r][s]=='o')
count++;
else
break;
if(count>=5)
return "found";
r++;
}
}
}
for(int i = 0; i < n ; i++)
{
for(int j = 0; j < n ; j++)
{
int r = i, s=j, count = 0;
while( r < n && s < n)
{
if(bb[r][s]=='o')
count++;
else
break;
if(count>=5)
return "found";
r++;s++;
}
}
}
for(int i = 0; i < n ; i++)
{
for(int j = 0; j < n ; j++)
{
int r = i, s=j, count = 0;
while( r < n && s >=0)
{
if(bb[r][s]=='o')
count++;
else
break;
if(count>=5)
return "found";
r++;s--;
}
}
}
return "not found";
}
}
***************
Problema de numeracion bases cuidado con los overflows
http://www.codeforces.com/contest/602/problem/A
// SRM 590 DIV2-I
problema de string hallar alguna ocurrencia de 5 'o's consecutivos en linea vertical horizontal o diagonal \ o diagonal / (n no es menor que 5)
public class FoxAndGomoku
{
public string win(string [] b)
{
int n = b.Length;
char[][] bb = new char[n][];
for(int i = 0; i < n ; i++)
bb[i] = b[i].ToCharArray();
for(int i = 0; i < n ; i++)
if( b[i].IndexOf("ooooo")>=0)
return "found";
for(int j = 0; j < n ; j++)
{
for(int i = 0; i < n ; i++)
{
int r = i, s=j, count = 0;
while( r < n && s >=0)
{
if(bb[r][s]=='o')
count++;
else
break;
if(count>=5)
return "found";
r++;
}
}
}
for(int i = 0; i < n ; i++)
{
for(int j = 0; j < n ; j++)
{
int r = i, s=j, count = 0;
while( r < n && s < n)
{
if(bb[r][s]=='o')
count++;
else
break;
if(count>=5)
return "found";
r++;s++;
}
}
}
for(int i = 0; i < n ; i++)
{
for(int j = 0; j < n ; j++)
{
int r = i, s=j, count = 0;
while( r < n && s >=0)
{
if(bb[r][s]=='o')
count++;
else
break;
if(count>=5)
return "found";
r++;s--;
}
}
}
return "not found";
}
}
***************
string win(vector <string> board) { int d[4][2] = { {1,0}, {0,1}, {1,1}, {-1,1} }; int w = board[0].size(), h = board.size(); bool anygood = false; // For each starting cell: for (int i=0; i<w; i++) { for (int j=0; j<h; j++) { for (int k = 0; k < 4; k++) { // load (dx,dy) from array: int dx = d[k][0], dy = d[k][1]; // Is there a line with this direction? bool good = true; int x = i, y = j; for (int k = 0; k < 5; k++) { // make sure the new cell is within bounds: good = (good && (0 <= x && x < w ) && (0 <= y && y < h) ); // make sure it contains o good = (good && (board[y][x] == 'o') ); // Increase according to (dx,dy). x += dx; y += dy; } anygood = anygood || good; } } } return anygood? "found" : "not found";}********************class FoxAndGomoku:
def win(self, board):
h = len(board)
w = len(board[0])
# horizontal: For each (x,y) try: (x,y),(x+1,y),...,(x+4,y)
for x in range(w - 4):
for y in range(h):
c = 0
for i in range(5):
if board[y][x+i] == 'o':
c += 1
if c == 5:
return "found"
# vertical: For each (x,y) try: (x,y),(x,y+1),...,(x,y+4)
for x in range(w):
for y in range(h - 4):
c = 0
for i in range(5):
if board[y+i][x] == 'o':
c += 1
if c == 5:
return "found"
#diagonal \ : For each (x,y) try: (x,y),(x+1,y+1),...,(x+4,y+4)
for x in range(w - 4):
for y in range(h - 4):
c = 0
for i in range(5):
if board[y+i][x+i] == 'o':
c += 1
if c == 5:
return "found"
#diagonal / For each (x,y) try: (x,y),(x-1,y+1),...,(x-4,y+4)
for x in range(4, w):
for y in range(h - 4):
c = 0
for i in range(5):
if board[y+i][x-i] == 'o':
c += 1
if c == 5:
return "found"
return "not found"
Suscribirse a:
Entradas (Atom)