# 位运算的简单应用

## 基本概念

• int a = 1; 变量a实际的表示为0000…0001，共32位
• 右移>>n位：去掉二进制后的n位
• 左移<<n位：在二进制数后面填上n个0，$(1 << n = 2^n)$
• 按位与或非

# 山东大学（威海）程序设计竞赛2020新星赛（线上模拟赛）题解

## factorial（数论，简单模拟）

In many applications very large integers numbers are required. Some of these applications are using keys for secure transmission of data, encryption, etc. In this problem you are given a number, you have to determine the number of digits in the factorial of the number.

# Prime Path-POJ3126广搜

## 题目描述

hh学长酷爱素数，他经常自娱自乐，随机挑选两个四位的素数a，b。

# Ctach That Cow-一维广搜

## 题目描述

Farmer John has been informed of the location of a fugitive cow and wants to catch her immediately. He starts at a point N (0 ≤ N ≤ 100,000) on a number line and the cow is at a point K (0 ≤ K ≤ 100,000) on the same number line. Farmer John has two modes of transportation: walking and teleporting.

# Dungeon Master-POJ2251三维广搜

## 题目描述

You are trapped in a 3D dungeon and need to find the quickest way out! The dungeon is composed of unit cubes which may or may not be filled with rock. It takes one minute to move one unit north, south, east, west, up or down. You cannot move diagonally and the maze is surrounded by solid rock on all sides.