题目 真不想说什么,,,这神题真讨厌,,,多校的.. //又是一道神题... #include<stdio.h> #include<string.h> //最大公约数 int gcd(int a, int b) { ? a : gcd(b, a % b); } int main() { int n,m,c; while(scanf("%d%d",&n,&m)!=EOF) { &&m==)break; n+=;m+=; c=gcd(…
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=6229 转载: https://blog.csdn.net/Anna__1997/article/details/78494788 题目大意 N * N的区域内,有K个格子不能到达,机器人从(0, 0)出发有均等的该概率留在原地和到达上下左右可到达的区域,问无穷远的时间以后有多大概率到达 x + y >= n - 1 的区域. 思路 计算除了不能到达的格子之外的格子能通往多少方向d,则格子的权值为d…
题目链接:https://www.nowcoder.com/acm/contest/207/D 题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5985 时间限制:C/C++ 1秒,其他语言2秒空间限制:C/C++ 262144K,其他语言524288K64bit IO Format: %lld题目描述 Bob has collected a lot of coins in different kinds. He wants to know which…
D - Joyful Time Limit:1000MS Memory Limit:65536KB 64bit IO Format:%I64d & %I64u Submit Status Description Sakura has a very magical tool to paint walls. One day, kAc asked Sakura to paint a wall that looks like an $M \times N$ matrix. The wal…
A - Play the DiceTime Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://acm.hust.edu.cn/vjudge/contest/view.action?cid=87326#problem/A Description There is a dice with n sides, which are numbered from 1,2,...,n and have the equal possibility to show up…
Robot Time Limit: 8000/4000 MS (Java/Others) Memory Limit: 102400/102400 K (Java/Others)Total Submission(s): 158 Accepted Submission(s): 46 Problem Description Michael has a telecontrol robot. One day he put the robot on a loop with n cells. Th…
L - House Building Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://acm.hdu.edu.cn/showproblem.php?pid=5538 Description Have you ever played the video game Minecraft? This game has been one of the world's most popular game in recent years. The wor…