Tags » Brute Force

Hacker Earth The Wealthy Landlord

This is a brute force problem. I solved it using 2D array and brute force calculation.

1) Declare 2 Two dimensional arrays, land[][] and vis[][]. 125 more words

Competitive Programming

DCP-418: Can You Answer Me? [solved]

/******************************************
          Mobarak Hosen Shakil
        ICE, Islamic University
     ID: mhiceiuk(all), 29698(LOJ)
   E-mail: mhiceiuk @ (Gmail/Yahoo/FB)
 Blog: https://iuconvergent.wordpress.com
*******************************************/

#include
using namespace std;
#define IOS ios_base::sync_with_stdio(0);cin.tie(0)
#define LL long long int
#define ULL unsigned LL

const int inf=1<<30;
const int MOD=1e9+7;

int main()
{
    int n, tn, cn=0;
    scanf("%d", &tn);
    while(tn--)
    {
        scanf("%d", &n);
        int a, b;
        memset(b, 0, sizeof b);
        for(int i=1; i<=n; i++)
        {
            scanf("%d", &a);
            b[a]++;
        }

        LL tot=0;

        for(int i=1; i<=100; i++)
        {
            tot+=(b[i]*(b[i]-1)/2);
            for(int j=i+1; j<=100; j++)
            {
                int c=sqrt(i*j);
                if(c*c==i*j)
                {
                    tot+=(b[j]*b[i]);
                }
            }
        }

        printf("%lld\n", tot);

    }

    return 0;
}
Devskill Solution

An alternative to data masking

Dynamic data masking is a neat new feature in recent SQL Server versions that allows you to protect sensitive information from non-privileged users by masking… 1,000 more words

T-SQL

Wordpress, You Are Not So Strong!

(출처: medium.com)

얼마 전 WordPress가 공격을 당했다는 기사를 읽어 그에 관련한 글을 더 찾아보려 WordPress를 쳤다가 생각보다 WordPress에 관한 보안 이슈가 굉장히 많다는 것을 알게되었다. 그래서 최근 기사 몇개를 골라 짧게 정리를 해봤다. 312 more words

Attack/vulnerability

916A

Problem:

A. Jamie and Alarm Snooze

time limit per test: 2 seconds

memory limit per test: 256 megabytes

input: standard input

output: standard output

Jamie loves sleeping. 322 more words

APS

Nearest Neighbour Search (NNS) - part 1

Nearest Neighbour Search (NNS) – part 1

This blog series discusses a class of N-body problems in scientific computing. N-body problems are common in statistical computations and data science. 1,358 more words

Sklearn

How to make all of the permutations of a password for brute force?

So I was trying to make a program that brute forces passwords.

Firstly, I made a program for a password of length 1:

password = input('What is your password?\n')
chars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'

def brute_force():
    for char in chars:
        if char == password:
            return char

print(brute_force())
… 830 more words
Python